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(){