Compare commits
6 Commits
a5b791f007
...
3f252fa669
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f252fa669 | ||
|
|
f1f4256fc9 | ||
|
|
328a59f6b4 | ||
|
|
6e5a0df70b | ||
|
|
e9fa387e02 | ||
|
|
29e3f9ebc5 |
@@ -167,20 +167,19 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
roleNames.add("分店商户");
|
||||
List<String> headShopPromissionList = sysMenuMapper.selectByRoleId(2L).stream().map(SysMenu::getPermission).filter(StrUtil::isNotBlank).toList();
|
||||
List<String> branchShopPromissionList = sysMenuMapper.selectByRoleId(3L).stream().map(SysMenu::getPermission).filter(StrUtil::isNotBlank).toList();
|
||||
promissionList.removeAll(headShopPromissionList);
|
||||
// promissionList.removeAll(headShopPromissionList);
|
||||
promissionList.addAll(branchShopPromissionList);
|
||||
}
|
||||
StpKit.USER.addRoleList(roleNames);
|
||||
StpKit.USER.addPermissionList(promissionList);
|
||||
String platformType = ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType");
|
||||
if (PlatformTypeEnum.PC_CLIENT.getValue().equals(platformType)) {
|
||||
if (PlatformTypeEnum.PC_CLIENT.getValue().equals(platType)) {
|
||||
// 初始化交班记录
|
||||
HandoverRecord entity = getHandoverRecord(isStaff, shopInfo, shopStaff);
|
||||
handoverRecordService.initHandoverRecord(entity);
|
||||
}
|
||||
|
||||
redisService.del(RedisCst.LOGIN_CODE + loginDTO.uuid());
|
||||
return new LoginVO(StpKit.USER.getTokenInfo(), new ArrayList<>(), loginDTO.loginType(), shopInfo, shopStaff);
|
||||
return new LoginVO(StpKit.USER.getTokenInfo(), promissionList, loginDTO.loginType(), shopInfo, shopStaff);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -254,14 +254,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
||||
BeanUtil.copyProperties(roleEditDTO, role);
|
||||
boolean b = updateById(role);
|
||||
if (b) {
|
||||
sysRolesMenusService.updateChain().eq(SysRolesMenus::getRoleId, role.getId()).remove();
|
||||
|
||||
if (roleEditDTO.getAdminMenuIdList() != null && !roleEditDTO.getAdminMenuIdList().isEmpty()) {
|
||||
addMenu(role.getId(), roleEditDTO.getAdminMenuIdList(), true);
|
||||
sysRolesMenusService.updateChain().eq(SysRolesMenus::getRoleId, role.getId()).eq(SysRolesMenus::getType, 0).remove();
|
||||
|
||||
addMenu(role.getId(), roleEditDTO.getAdminMenuIdList().stream().distinct().toList(), true);
|
||||
}
|
||||
|
||||
if (roleEditDTO.getCashMenuIdList() != null && !roleEditDTO.getCashMenuIdList().isEmpty()) {
|
||||
addMenu(role.getId(), roleEditDTO.getCashMenuIdList(), false);
|
||||
sysRolesMenusService.updateChain().eq(SysRolesMenus::getRoleId, role.getId()).eq(SysRolesMenus::getType, 1).remove();
|
||||
addMenu(role.getId(), roleEditDTO.getCashMenuIdList().stream().distinct().toList(), false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user