diff --git a/app/admin/library/traits/Backend.php b/app/admin/library/traits/Backend.php index 817be345..f96392cb 100644 --- a/app/admin/library/traits/Backend.php +++ b/app/admin/library/traits/Backend.php @@ -167,14 +167,17 @@ trait Backend $this->error(__('Parameter error')); } + $where = []; $dataLimitAdminIds = $this->getDataLimitAdminIds(); if ($dataLimitAdminIds) { - $this->model->where($this->dataLimitField, 'in', $dataLimitAdminIds); + $where[] = [$this->dataLimitField, 'in', $dataLimitAdminIds]; } - $pk = $this->model->getPk(); - $data = $this->model->where($pk, 'in', $ids)->select(); + $pk = $this->model->getPk(); + $where[] = [$pk, 'in', $ids]; + $count = 0; + $data = $this->model->where($where)->select(); $this->model->startTrans(); try { foreach ($data as $v) {