切换店铺统计 √
下单选择会员 √ 注册会员 √ 完善手机号 √ 会员流水信息同步 √
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -154,6 +155,15 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
if (user.getIsAdmin()) {
|
||||
roleNames.add("admin");
|
||||
}
|
||||
Long headShopId = StpKit.USER.getHeadShopId(shopInfo.getId());
|
||||
if (headShopId.equals(shopInfo.getId())) {
|
||||
} else {
|
||||
boolean isEnableSync = StpKit.USER.isEnableSync(headShopId);
|
||||
if (isEnableSync && CollUtil.contains(roleNames, "商户")) {
|
||||
roleNames.remove("商户");
|
||||
roleNames.remove("分店商户");
|
||||
}
|
||||
}
|
||||
StpKit.USER.addRoleList(roleNames);
|
||||
// 权限赋予
|
||||
List<String> promissionList = sysMenuMapper.selectByUserId(user.getId(), null).stream().map(SysMenu::getPermission).filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||
@@ -210,6 +220,15 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
if (sysUser.getIsAdmin()) {
|
||||
roleNames.add("admin");
|
||||
}
|
||||
Long headShopId = StpKit.USER.getHeadShopId(shopInfo.getId());
|
||||
if (headShopId.equals(shopInfo.getId())) {
|
||||
} else {
|
||||
boolean isEnableSync = StpKit.USER.isEnableSync(headShopId);
|
||||
if (isEnableSync && CollUtil.contains(roleNames, "商户")) {
|
||||
roleNames.remove("商户");
|
||||
roleNames.remove("分店商户");
|
||||
}
|
||||
}
|
||||
StpKit.USER.addRoleList(roleNames);
|
||||
// 权限赋予
|
||||
List<String> promissionList = sysMenuMapper.selectByUserId(sysUser.getId(), null).stream().map(SysMenu::getPermission).filter(StrUtil::isNotBlank).toList();
|
||||
|
||||
Reference in New Issue
Block a user