From ea96c5c31d90cbda793e912efdd5784902a6f067 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Wed, 6 Mar 2024 15:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=85=92=E9=81=93=E9=A6=86=E7=AE=A1=E7=90=86=E5=91=98=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=97=B6=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20=E5=AF=BC=E8=87=B4=E6=9F=A5=E8=AF=A2=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/service/StoreServiceRepository.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/common/repositories/store/service/StoreServiceRepository.php b/app/common/repositories/store/service/StoreServiceRepository.php index 1c7bc44..ba593e7 100644 --- a/app/common/repositories/store/service/StoreServiceRepository.php +++ b/app/common/repositories/store/service/StoreServiceRepository.php @@ -197,15 +197,17 @@ class StoreServiceRepository extends BaseRepository // 获取当前用户的员工信息 public function getServices($uid, array $where = [],$is_sys = 1){ // $where['uid'] = $uid; - // 商户类别:0=普通商户,1=酒道馆,2=供应商 + // 商户类别(merchant_type):0=普通商户,1=酒道馆,2=供应商 + // is_sys:0=商户管理,1=平台管理,2=酒道馆管理 $list = $this->dao->getSearch([]) ->when(isset($where['appoint_mer_id']) && $where['appoint_mer_id'] !== '',function($query) use ($where, $is_sys, $uid){ // 存在指定商户ID 并且为酒道馆 $query->hasWhere('merchant',function($query){ - $query->where('is_del', 0); - })->where('StoreService.mer_id', $where['appoint_mer_id']) - ->when($is_sys == 1,function($query){ - $query->where('StoreService.is_manage', 1); + $query->where('is_del',0); + }) + ->where('StoreService.mer_id',$where['appoint_mer_id']) + ->when($is_sys == 2,function($query){ + $query->where('StoreService.is_manage',1); },function($query) use ($uid){ $query->where('StoreService.uid',$uid); });