mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-13 14:57:16 +08:00
style: 优化部分代码格式
This commit is contained in:
@@ -82,7 +82,7 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, DeptDO, DeptRes
|
||||
String oldName = oldDept.getName();
|
||||
DisEnableStatusEnum newStatus = req.getStatus();
|
||||
Long oldParentId = oldDept.getParentId();
|
||||
if (oldDept.getIsSystem()) {
|
||||
if (Boolean.TRUE.equals(oldDept.getIsSystem())) {
|
||||
CheckUtils.throwIfEqual(DisEnableStatusEnum.DISABLE, newStatus, "[{}] 是系统内置部门,不允许禁用", oldName);
|
||||
CheckUtils.throwIfNotEqual(req.getParentId(), oldParentId, "[{}] 是系统内置部门,不允许变更上级部门", oldName);
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, RoleDO, RoleRes
|
||||
RoleDO oldRole = super.getById(id);
|
||||
DataScopeEnum oldDataScope = oldRole.getDataScope();
|
||||
String oldCode = oldRole.getCode();
|
||||
if (oldRole.getIsSystem()) {
|
||||
if (Boolean.TRUE.equals(oldRole.getIsSystem())) {
|
||||
CheckUtils.throwIfEqual(DisEnableStatusEnum.DISABLE, req.getStatus(), "[{}] 是系统内置角色,不允许禁用",
|
||||
oldRole.getName());
|
||||
CheckUtils.throwIfNotEqual(req.getCode(), oldCode, "[{}] 是系统内置角色,不允许修改角色编码", oldRole.getName());
|
||||
@@ -152,7 +152,7 @@ public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, RoleDO, RoleRes
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return new ArrayList<>(0);
|
||||
}
|
||||
return list.stream().map(r -> new LabelValueResp<>(r.getName(), r.getId())).collect(Collectors.toList());
|
||||
return list.stream().map(r -> new LabelValueResp<>(r.getName(), r.getId())).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user