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

Loading…
Cancel
Save