修复:烟酒店、超市、省公司门店在移动端登录商户管理后台时,查询的是该用户的员工身份而不是管理员的员工身份,导致该用户无有效员工身份时直接报错,不能正常进行管理
This commit is contained in:
parent
af04c1e269
commit
83dc234e26
|
|
@ -222,7 +222,7 @@ class StoreServiceRepository extends BaseRepository
|
|||
$query->where('is_del',0);
|
||||
})
|
||||
->where('StoreService.mer_id',$where['appoint_mer_id'])
|
||||
->when($is_sys == 2,function($query){
|
||||
->when(in_array($is_sys,[2,3,4,5]),function($query){
|
||||
$query->where('StoreService.is_manage',1);
|
||||
},function($query) use ($uid){
|
||||
$query->where('StoreService.uid',$uid);
|
||||
|
|
@ -230,11 +230,11 @@ class StoreServiceRepository extends BaseRepository
|
|||
},function($query) use ($is_sys, $uid){
|
||||
// 不存在指定商户id
|
||||
$query->hasWhere('merchant',function($query) use ($is_sys){
|
||||
// 商户类别(merchant_type):0=普通商户,1=酒道馆,2=供应商,3=烟酒店
|
||||
// is_sys:0=商户管理,1=平台管理,2=酒道馆管理,3=烟酒店
|
||||
$merchantType = 0;
|
||||
// 商户类别(merchant_type):0=普通商户,1=酒道馆,2=供应商,3=烟酒店,4=超市,5=省公司门店
|
||||
// is_sys:0=商户管理,1=平台管理,2=酒道馆管理,3=烟酒店,4=超市,5=省公司门店
|
||||
$merchantType = $is_sys;
|
||||
if($is_sys == 2) $merchantType = 1;
|
||||
else if($is_sys == 3) $merchantType = 3;
|
||||
else if($is_sys == 1) $merchantType = 0;
|
||||
$query->where('is_del', 0)->where('merchant_type', $merchantType);
|
||||
})->where('StoreService.mer_id',$is_sys == 1 ? '=' : '>',0)
|
||||
->where('StoreService.uid',$uid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue