From bedd0a1cef215538df64470df6b8d4a022189136 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 28 八月 2024 14:05:16 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
index 49907eb..6593999 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
@@ -34,7 +34,7 @@
/**
* 瑙掕壊淇℃伅
- *
+ *
* @author ruoyi
*/
@RestController
@@ -91,7 +91,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:add')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
public AjaxResult add(@Validated @RequestBody SysRole role)
{
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
@@ -112,7 +112,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/edit")
public AjaxResult edit(@Validated @RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
@@ -126,7 +126,7 @@
return error("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹叉潈闄愬凡瀛樺湪");
}
role.setUpdateBy(getUsername());
-
+
if (roleService.updateRole(role) > 0)
{
// 鏇存柊缂撳瓨鐢ㄦ埛鏉冮檺
@@ -147,7 +147,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping("/dataScope")
+ @PostMapping("/dataScope")
public AjaxResult dataScope(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
@@ -160,7 +160,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping("/changeStatus")
+ @PostMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
@@ -174,7 +174,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:remove')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.DELETE)
- @DeleteMapping("/{roleIds}")
+ @GetMapping("/remove/{roleIds}")
public AjaxResult remove(@PathVariable Long[] roleIds)
{
return toAjax(roleService.deleteRoleByIds(roleIds));
@@ -219,7 +219,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT)
- @PutMapping("/authUser/cancel")
+ @PostMapping("/authUser/cancel")
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
{
return toAjax(roleService.deleteAuthUser(userRole));
@@ -230,7 +230,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT)
- @PutMapping("/authUser/cancelAll")
+ @PostMapping("/authUser/cancelAll")
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
{
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
@@ -241,7 +241,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT)
- @PutMapping("/authUser/selectAll")
+ @PostMapping("/authUser/selectAll")
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
{
roleService.checkRoleDataScope(roleId);
--
Gitblit v1.9.3