|
|
@@ -336,6 +336,7 @@ public class RoleServiceImpl extends SuperService {
|
|
|
if (role == null) {
|
|
|
return ResultContent.buildFail("角色不存在");
|
|
|
}
|
|
|
+
|
|
|
var roleGroup = roleService.getRoleGroup(role.getRoleGroupId()).getContent();
|
|
|
com.github.microservice.auth.client.model.RoleModel roleModel;
|
|
|
if (roleGroup.getRoleId() == null || CollectionUtils.isEmpty(roleGroup.getRoleId())) {
|
|
|
@@ -362,8 +363,13 @@ public class RoleServiceImpl extends SuperService {
|
|
|
if (CollectionUtils.isEmpty(auth)) {
|
|
|
auth = new HashSet<>();
|
|
|
}
|
|
|
+ if (param.getType() == null) {
|
|
|
+ param.setType(EditType.Add);
|
|
|
+ }
|
|
|
|
|
|
if (param.getType() == EditType.Add) {
|
|
|
+ // 最后提交的为准
|
|
|
+ auth = new HashSet<>();
|
|
|
auth.addAll(param.getAuths());
|
|
|
} else {
|
|
|
auth.removeAll(param.getAuths());
|