chengwl 5 年之前
父节点
当前提交
b80cb375de
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      controllers/SiteController.php

+ 2 - 2
controllers/SiteController.php

@@ -133,9 +133,9 @@ class SiteController extends Controller
         $id = $request->post('id');   
         if(is_array($id)){
             $ids=implode(',',$id);
+            $model = new Orderreturn(); 
+            $model->deleteAll('id in (' . $ids . ')');
         }
-        $model = new Orderreturn(); //你要批量删除的表
-        $model->deleteAll('id in (' . $ids . ')');
         return $this->redirect(['index']);
     }
     public function actionExport(){