From 1fd34350ea68fe820c4b62881b13c9f01082e6c0 Mon Sep 17 00:00:00 2001
From: fuyongxin <110568259@qq.com>
Date: Wed, 03 Jun 2026 14:56:12 +0800
Subject: [PATCH] 修改ruoyi-改为sgd
---
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
index 4513ebf..b016d04 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
@@ -1,7 +1,7 @@
package com.ruoyi.system.controller;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -12,7 +12,6 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -85,11 +84,11 @@
@PostMapping
public AjaxResult add(@Validated @RequestBody SysRole role)
{
- if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
+ if (!roleService.checkRoleNameUnique(role))
{
return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
- else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
+ else if (!roleService.checkRoleKeyUnique(role))
{
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
@@ -108,11 +107,11 @@
{
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
- if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
+ if (!roleService.checkRoleNameUnique(role))
{
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
- else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
+ else if (!roleService.checkRoleKeyUnique(role))
{
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
--
Gitblit v1.9.3