<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## **數據刪除自動處理** 數據刪除同樣也只需要一行代碼`$this->_delete('表名');` 前端只需要傳入數據表的主鍵就可以了,不需要做額外處理。 ### **1. 硬刪除** 如果數據表中不存在`is_deleted`字段,則為硬刪除。 ### **2. 軟刪除** 當前數據表中存在`is_deleted`字段時,`$this->_delete`則自動為軟刪除操作, 在列表操作時加上條件過濾下就可以正常操作。 #### 數據回調處理 對于數據刪除的結果,可以進行自定義處理,回調函數規則如:`[_ACTION]_delete_result` 下面提供一個完整的demo: ```php /** * 刪除系統權限 * @auth true */ public function remove() { $this->applyCsrfToken(); $this->_delete($this->table); } /** * 刪除結果處理 * @param boolean $result * @throws \think\Exception * @throws \think\exception\PDOException */ protected function _remove_delete_result($result) { if ($result) { $where = ['auth' => $this->request->post('id')]; Db::name('SystemAuthNode')->where($where)->delete(); $this->success("權限刪除成功!", ''); } else { $this->error("權限刪除失敗,請稍候再試!"); } } ``` 如果是在 ThinkAdmin 后臺基于 admin.js 的情況下,可臺使用 data-action 來與 $this->_delete 配合使用。 前端提交上來的主鍵值支持多個,以英文逗號分隔。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看