小组批量标志权限修改

This commit is contained in:
anhc 2022-07-13 17:35:07 +08:00
parent 8056617943
commit 960a62dd8c
2 changed files with 12 additions and 8 deletions

View File

@ -1727,15 +1727,19 @@ public class CooperationWeb extends ActionWeb {
//处理隐藏角色的权限复制
CoeCooperationRoleModel originHideRole = api.queryCooperationTeamHideRole(teamId, userid);
api.removeCooperationRolePerms(teamId,originHideRole.getId());
CoeCooperationRoleModel targetHideRole = api.queryCooperationTeamHideRole(teamId, targetUserid);
List<CoeCooperationRolePermModel> targetRolePerms = api.queryCooperationRoleDataPermList(teamId, targetHideRole.getId());
List<CoeCooperationRolePermModel> permModelList = new ArrayList<>();
for (CoeCooperationRolePermModel targetRolePerm : targetRolePerms) {
CoeCooperationRolePermModel permModel = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, originHideRole.getId(), targetRolePerm.getPalVersionId(), targetRolePerm.getActionPerm());
permModelList.add(permModel);
if (null != originHideRole){
CoeCooperationRoleModel targetHideRole = api.queryCooperationTeamHideRole(teamId, targetUserid);
if (null != targetHideRole){
api.removeCooperationRolePerms(teamId,originHideRole.getId());
List<CoeCooperationRolePermModel> targetRolePerms = api.queryCooperationRoleDataPermList(teamId, targetHideRole.getId());
List<CoeCooperationRolePermModel> permModelList = new ArrayList<>();
for (CoeCooperationRolePermModel targetRolePerm : targetRolePerms) {
CoeCooperationRolePermModel permModel = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, originHideRole.getId(), targetRolePerm.getPalVersionId(), targetRolePerm.getActionPerm());
permModelList.add(permModel);
}
api.createCooperationRolePerms(permModelList);
}
}
api.createCooperationRolePerms(permModelList);
return ro.toString();
}