权限相关bug修改

master
anthonywj 2 years ago
parent 4df9ca7662
commit 4a058dc0ff

@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@Validated
@RequiredArgsConstructor
@ -64,7 +65,7 @@ public class SysRoleController extends BaseController {
*/
@PostMapping
public BaseResponse add(@Validated @RequestBody SysRole role) {
role.setRoleKey(UUID.randomUUID() + "");
if (Constant.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
return ResultVOUtils.error(500, "新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
} else if (Constant.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {

Loading…
Cancel
Save