|
|
@@ -212,15 +212,22 @@ class Entrust extends Backend
|
|
|
if (empty($ids)) {
|
|
|
$this->error(__('Parameter %s can not be empty', 'ids'));
|
|
|
}
|
|
|
- $row = $this->model->get($ids);
|
|
|
- if (!empty($row['gather_id'])){
|
|
|
- $tab = $row['gather_tab'] == 'gather_txt_check_gc'?'gather_txt_gc':'gather_txt_gcms';
|
|
|
- $id = $row['gather_id'];
|
|
|
- $res = Db::name($tab)->where('id',$id)->find();
|
|
|
- if ($res['status'] == 1){
|
|
|
- $this->error('检测数据已确认,无法删除!');
|
|
|
+ $idList = explode(',',$ids);
|
|
|
+ $canDel = true;
|
|
|
+ foreach ($idList as $key => $value){
|
|
|
+ $row = $this->model->get($ids);
|
|
|
+ if (!empty($row['gather_id'])){
|
|
|
+ $tab = $row['gather_tab'] == 'gather_txt_check_gc'?'gather_txt_gc':'gather_txt_gcms';
|
|
|
+ $id = $row['gather_id'];
|
|
|
+ $res = Db::name($tab)->where('id',$id)->find();
|
|
|
+ if ($res['status'] == 1){
|
|
|
+ $canDel = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ if ($canDel === false){
|
|
|
+ $this->error('检测数据已确认,无法删除!');
|
|
|
+ }
|
|
|
$pk = $this->model->getPk();
|
|
|
$adminIds = $this->getDataLimitAdminIds();
|
|
|
if (is_array($adminIds)) {
|