6 Commits

Author SHA1 Message Date
张松
3f252fa669 交班报错修复 2025-09-01 15:57:39 +08:00
张松
f1f4256fc9 测试 2025-09-01 15:45:30 +08:00
张松
328a59f6b4 测试 2025-09-01 14:49:56 +08:00
张松
6e5a0df70b Merge remote-tracking branch 'origin/master' into prod 2025-09-01 11:40:37 +08:00
张松
e9fa387e02 菜单修改接口调整 2025-09-01 10:50:55 +08:00
张松
29e3f9ebc5 菜单修改接口调整 2025-07-03 15:19:35 +08:00
2 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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;
}