切换店铺统计 √
下单选择会员 √ 注册会员 √ 完善手机号 √ 会员流水信息同步 √
This commit is contained in:
@@ -229,6 +229,19 @@ public class MyStpLogic {
|
|||||||
return shopId;
|
return shopId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主店id
|
||||||
|
* @param shopId 店铺id
|
||||||
|
* @return 主店id
|
||||||
|
*/
|
||||||
|
public Long getHeadShopId(Long shopId) {
|
||||||
|
Long mainId = DbChain.table("tb_shop_config").select("main_id").where("id = ?", shopId).objAs(Long.class);
|
||||||
|
if (mainId != null) {
|
||||||
|
return mainId;
|
||||||
|
}
|
||||||
|
return shopId;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验是否为管理端登录
|
* 校验是否为管理端登录
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -197,7 +197,11 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
// 主店铺切换子店铺
|
// 主店铺切换子店铺
|
||||||
if ((headId == null && !shopInfo.getMainId().equals(shopId)) || (!sysUser.getId().equals(headId) && shopInfo.getMainId() == null) ||
|
if ((headId == null && !shopInfo.getMainId().equals(shopId)) || (!sysUser.getId().equals(headId) && shopInfo.getMainId() == null) ||
|
||||||
(headId != null && !sysUserId.equals(headId) && !shopInfo.getMainId().equals(headId))) {
|
(headId != null && !sysUserId.equals(headId) && !shopInfo.getMainId().equals(headId))) {
|
||||||
throw new ApiNotPrintException("目标店铺非登录账号所有");
|
Long headShopId = StpKit.USER.getHeadShopId();
|
||||||
|
Long changeHeadShopId = StpKit.USER.getHeadShopId(sysUserId);
|
||||||
|
if (!changeHeadShopId.equals(headShopId)) {
|
||||||
|
throw new ApiNotPrintException("目标店铺非登录账号所有");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询角色
|
// 查询角色
|
||||||
|
|||||||
Reference in New Issue
Block a user