提交 616c3731 作者: 方治民

feat: 新增权限和角色时默认启用

上级 421f6bdd
...@@ -168,6 +168,7 @@ public class PermissionController { ...@@ -168,6 +168,7 @@ public class PermissionController {
private void save(Permission entity, PermissionParam param) { private void save(Permission entity, PermissionParam param) {
BeanUtils.copyProperties(param, entity, Permission.Fields.meta); BeanUtils.copyProperties(param, entity, Permission.Fields.meta);
entity.setTree(getTreeNode(param.getPid())); entity.setTree(getTreeNode(param.getPid()));
entity.setEnable(true);
permissionRepository.saveAndFlush(entity); permissionRepository.saveAndFlush(entity);
} }
} }
...@@ -65,6 +65,7 @@ public class RoleController { ...@@ -65,6 +65,7 @@ public class RoleController {
} }
Role entity = new Role(); Role entity = new Role();
entity.setEnable(true);
BeanUtils.copyProperties(param, entity); BeanUtils.copyProperties(param, entity);
roleRepository.saveAndFlush(entity); roleRepository.saveAndFlush(entity);
return Result.ok(); return Result.ok();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论