作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

equipment

@@ -118,7 +118,7 @@ class AdminEquipmentController extends AdminBaseController{ @@ -118,7 +118,7 @@ class AdminEquipmentController extends AdminBaseController{
118 //批量导出 118 //批量导出
119 public function batch_export(){ 119 public function batch_export(){
120 $ids=$this->request->param('ids/a'); 120 $ids=$this->request->param('ids/a');
121 - $data= Db::name('equipment')->where('id','in',$ids)->select(); 121 + $data= Db::name('equipment')->where(['id' => ['in', $ids]])->select();
122 122
123 // 导出Exl 123 // 导出Exl
124 vendor("VENDOR_PATH/phpoffice/phpexcel/Classes/PHPExcel"); 124 vendor("VENDOR_PATH/phpoffice/phpexcel/Classes/PHPExcel");
@@ -202,6 +202,7 @@ class AdminEquipmentController extends AdminBaseController{ @@ -202,6 +202,7 @@ class AdminEquipmentController extends AdminBaseController{
202 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); 202 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
203 $objWriter->save('php://output'); //文件通过浏览器下载 203 $objWriter->save('php://output'); //文件通过浏览器下载
204 // END 204 // END
  205 + $this->success('success');
205 } 206 }
206 207
207 //生成二维码 208 //生成二维码