fix 修复 新增角色使用内置管理员标识符问题

2.X
疯狂的狮子Li 2023-07-07 11:49:04 +08:00
parent 9e971d024d
commit 9a27808375
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ public class SysRoleController extends BaseController {
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping
public R<Void> add(@Validated @RequestBody SysRoleBo role) {
roleService.checkRoleAllowed(role);
if (!roleService.checkRoleNameUnique(role)) {
return R.fail("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
} else if (!roleService.checkRoleKeyUnique(role)) {