From 5ee0ba3a5ec1ae7454f332d3148c2a9484dd813a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Wed, 12 Jul 2023 17:23:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E5=9F=BA=E7=B1=BB=20del=20=E6=96=B9=E6=B3=95=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9D=83=E9=99=90=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/library/traits/Backend.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) {