|
...
|
...
|
@@ -90,15 +90,17 @@ class ProjectWhiteHatAffixController extends BaseController |
|
|
|
*/
|
|
|
|
public function del(){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>'required',
|
|
|
|
'ids'=>'required',
|
|
|
|
],[
|
|
|
|
'id.required' => '项目id不能为空',
|
|
|
|
'ids.required' => '项目id不能为空',
|
|
|
|
]);
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
foreach ($this->param['ids'] as $id){
|
|
|
|
$info = $this->model->read(['id'=>$id]);
|
|
|
|
if($info['project_id'] == 0){
|
|
|
|
$this->response('当前前后缀为公共前后缀,不允许删除',Code::USER_ERROR);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$data = $this->model->del(['id'=>$this->param['id']]);
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
$this->model->del(['id'=>$id]);
|
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|