From 0cb32a4fa55bebcba97f4646ec3c401c245b17e5 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 25 四月 2024 15:19:21 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java | 8 ++--
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java | 20 +++++-----
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java | 10 ++--
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java | 8 ++--
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java | 4 +-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 12 +++---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java | 8 ++--
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java | 6 +-
8 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
index 93b2664..0b474e2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
@@ -25,7 +25,7 @@
/**
* 鍙傛暟閰嶇疆 淇℃伅鎿嶄綔澶勭悊
- *
+ *
* @author ruoyi
*/
@RestController
@@ -97,7 +97,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:config:edit')")
@Log(title = "鍙傛暟绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping
public AjaxResult edit(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
@@ -113,7 +113,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "鍙傛暟绠$悊", businessType = BusinessType.DELETE)
- @DeleteMapping("/{configIds}")
+ @GetMapping("/remove/{configIds}")
public AjaxResult remove(@PathVariable Long[] configIds)
{
configService.deleteConfigByIds(configIds);
@@ -125,7 +125,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "鍙傛暟绠$悊", businessType = BusinessType.CLEAN)
- @DeleteMapping("/refreshCache")
+ @GetMapping("/refreshCache")
public AjaxResult refreshCache()
{
configService.resetConfigCache();
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
index 59becaf..29acb76 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
@@ -27,7 +27,7 @@
/**
* 鏁版嵁瀛楀吀淇℃伅
- *
+ *
* @author ruoyi
*/
@RestController
@@ -88,7 +88,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "瀛楀吀鏁版嵁", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
public AjaxResult add(@Validated @RequestBody SysDictData dict)
{
dict.setCreateBy(getUsername());
@@ -100,7 +100,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "瀛楀吀鏁版嵁", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/edit")
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
{
dict.setUpdateBy(getUsername());
@@ -112,7 +112,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.DELETE)
- @DeleteMapping("/{dictCodes}")
+ @GetMapping("/remove/{dictCodes}")
public AjaxResult remove(@PathVariable Long[] dictCodes)
{
dictDataService.deleteDictDataByIds(dictCodes);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
index d5ead57..07bf575 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
@@ -25,7 +25,7 @@
/**
* 鏁版嵁瀛楀吀淇℃伅
- *
+ *
* @author ruoyi
*/
@RestController
@@ -69,7 +69,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
public AjaxResult add(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
@@ -85,7 +85,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/edit")
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
@@ -101,7 +101,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.DELETE)
- @DeleteMapping("/{dictIds}")
+ @GetMapping("/remove/{dictIds}")
public AjaxResult remove(@PathVariable Long[] dictIds)
{
dictTypeService.deleteDictTypeByIds(dictIds);
@@ -113,7 +113,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.CLEAN)
- @DeleteMapping("/refreshCache")
+ @GetMapping("/refreshCache")
public AjaxResult refreshCache()
{
dictTypeService.resetDictCache();
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
index 8622828..182aff2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
@@ -22,7 +22,7 @@
/**
* 鍏憡 淇℃伅鎿嶄綔澶勭悊
- *
+ *
* @author ruoyi
*/
@RestController
@@ -71,7 +71,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
@Log(title = "閫氱煡鍏憡", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping
public AjaxResult edit(@Validated @RequestBody SysNotice notice)
{
notice.setUpdateBy(getUsername());
@@ -83,7 +83,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
@Log(title = "閫氱煡鍏憡", businessType = BusinessType.DELETE)
- @DeleteMapping("/{noticeIds}")
+ @GetMapping("/remove/{noticeIds}")
public AjaxResult remove(@PathVariable Long[] noticeIds)
{
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
index 1223524..e456f85 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
@@ -25,7 +25,7 @@
/**
* 宀椾綅淇℃伅鎿嶄綔澶勭悊
- *
+ *
* @author ruoyi
*/
@RestController
@@ -46,7 +46,7 @@
List<SysPost> list = postService.selectPostList(post);
return getDataTable(list);
}
-
+
@Log(title = "宀椾綅绠$悊", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:post:export')")
@PostMapping("/export")
@@ -92,7 +92,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:post:edit')")
@Log(title = "宀椾綅绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/edit")
public AjaxResult edit(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
@@ -112,7 +112,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:post:remove')")
@Log(title = "宀椾綅绠$悊", businessType = BusinessType.DELETE)
- @DeleteMapping("/{postIds}")
+ @GetMapping("/remove/{postIds}")
public AjaxResult remove(@PathVariable Long[] postIds)
{
return toAjax(postService.deletePostByIds(postIds));
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
index c2a2805..05e47ac 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
@@ -26,7 +26,7 @@
/**
* 涓汉淇℃伅 涓氬姟澶勭悊
- *
+ *
* @author ruoyi
*/
@RestController
@@ -57,7 +57,7 @@
* 淇敼鐢ㄦ埛
*/
@Log(title = "涓汉淇℃伅", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/updateProfile")
public AjaxResult updateProfile(@RequestBody SysUser user)
{
LoginUser loginUser = getLoginUser();
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);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index 2c11ac1..fc03612 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -35,7 +35,7 @@
/**
* 鐢ㄦ埛淇℃伅
- *
+ *
* @author ruoyi
*/
@RestController
@@ -149,7 +149,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping
public AjaxResult edit(@Validated @RequestBody SysUser user)
{
userService.checkUserAllowed(user);
@@ -177,7 +177,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:user:remove')")
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.DELETE)
- @DeleteMapping("/{userIds}")
+ @GetMapping("/remove/{userIds}")
public AjaxResult remove(@PathVariable Long[] userIds)
{
if (ArrayUtils.contains(userIds, getUserId()))
@@ -192,7 +192,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping("/resetPwd")
+ @PostMapping("/resetPwd")
public AjaxResult resetPwd(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
@@ -207,7 +207,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping("/changeStatus")
+ @PostMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
@@ -236,7 +236,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.GRANT)
- @PutMapping("/authRole")
+ @PostMapping("/authRole")
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
{
userService.checkUserDataScope(userId);
--
Gitblit v1.9.3