Merge branch 'prod' into test

This commit is contained in:
2025-12-20 15:46:52 +08:00
5 changed files with 25 additions and 12 deletions

View File

@@ -101,8 +101,8 @@ public class RoleController {
@SaAdminCheckPermission(parentName = "角色管理接口", value = "role:remove", name = "角色删除")
@DeleteMapping
public CzgResult<Boolean> remove(@RequestBody @Validated RoleRemoveDTO roleRemoveDTO) {
if (roleRemoveDTO.id() == 1L || roleRemoveDTO.id() == 2L) {
return CzgResult.failure("超级管理员角色不可删除");
if (roleRemoveDTO.id() == 1L || roleRemoveDTO.id() == 2L || roleRemoveDTO.id() == 3L) {
return CzgResult.failure("默认角色不可删除");
}
return CzgResult.success(roleService.removeById(roleRemoveDTO.id()));
}