From 919e138e02df8d7134b72cb5bea09e80f67ada7b Mon Sep 17 00:00:00 2001 From: "HDM58\\hdm58" Date: Thu, 3 Aug 2023 16:25:46 +0800 Subject: [PATCH] =?UTF-8?q?#I7P8VW=20=E4=BF=AE=E5=A4=8D=E9=94=80=E5=94=AE?= =?UTF-8?q?=E6=9C=BA=E4=BC=9A=E5=BD=92=E5=B1=9E=E4=BA=BA=E7=AD=9B=E9=80=89?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/customer/controller/Chance.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/customer/controller/Chance.php b/app/customer/controller/Chance.php index ec20909..8d356b9 100644 --- a/app/customer/controller/Chance.php +++ b/app/customer/controller/Chance.php @@ -38,21 +38,19 @@ class Chance extends BaseController $uid = $this->uid; $auth = isAuth($uid,'customer_admin'); - if($auth==0){ - $dids = get_department_role($this->uid); - if(!empty($dids)){ - $whereOr[] =['c.belong_did', 'in', $dids]; - if (!empty($param['uid'])) { - $where[] = ['c.belong_uid', '=', $param['uid']]; + + if (empty($param['uid'])) { + if($auth==0){ + $dids = get_department_role($this->uid); + if(!empty($dids)){ + $whereOr[] =['c.belong_did', 'in', $dids]; } + $whereOr[] =['c.belong_uid', '=', $uid]; + $whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',c.share_ids)")]; } - $whereOr[] =['c.belong_uid', '=', $uid]; - $whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',c.share_ids)")]; } else{ - if (!empty($param['uid'])) { - $where[] = ['c.belong_uid', '=', $param['uid']]; - } + $where[] = ['a.belong_uid', '=', $param['uid']]; } $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];