切换店铺 无权限问题
角色模板 关闭却新增问题 会员加入 时间
This commit is contained in:
@@ -208,7 +208,8 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
Long headId = StpKit.USER.getHeadId();
|
||||
long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
ShopInfo currentInfo = shopInfoService.getById(shopId);
|
||||
if (headId != null && currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
|
||||
// if (headId != null && currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
|
||||
if (currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
|
||||
throw new CzgException("登录账号无权限切换");
|
||||
}
|
||||
|
||||
@@ -217,7 +218,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
throw new CzgException("用户不存在");
|
||||
}
|
||||
|
||||
ShopInfo shopInfo = shopInfoService.getById(sysUser.getId());
|
||||
ShopInfo shopInfo = shopInfoService.getById(sysUserId);
|
||||
if (shopInfo == null) {
|
||||
throw new CzgException("店铺信息不存在");
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean saveByTemplate(long shopId, RoleSaveTemplateDTO dto) {
|
||||
roleTemplateService.list(new QueryWrapper().eq(SysRoleTemplate::getPid, dto.getId())).forEach(item -> {
|
||||
roleTemplateService.list(new QueryWrapper().eq(SysRoleTemplate::getPid, dto.getId()).eq(SysRoleTemplate::getIsEnable, 1)).forEach(item -> {
|
||||
SysRole role = getById(item.getRoleId());
|
||||
role.setShopId(shopId);
|
||||
role.setCreateUserId(shopId);
|
||||
|
||||
Reference in New Issue
Block a user