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); });