From 37f2e4e68c0d55e094981fa478fc198b907f87dc Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期六, 20 七月 2024 16:30:13 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 40 +++++++++++++++++----------------------- 1 files changed, 17 insertions(+), 23 deletions(-) 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..73a3604 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 @@ -1,21 +1,5 @@ package com.ruoyi.web.controller.system; -import java.util.List; -import java.util.stream.Collectors; -import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang3.ArrayUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.controller.BaseController; @@ -32,10 +16,20 @@ import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysUserService; +import org.apache.commons.lang3.ArrayUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.stream.Collectors; /** * 鐢ㄦ埛淇℃伅 - * + * * @author ruoyi */ @RestController @@ -122,7 +116,7 @@ */ @PreAuthorize("@ss.hasPermi('system:user:add')") @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") public AjaxResult add(@Validated @RequestBody SysUser user) { if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) @@ -149,7 +143,7 @@ */ @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE) - @PutMapping + @PostMapping("/edit") public AjaxResult edit(@Validated @RequestBody SysUser user) { userService.checkUserAllowed(user); @@ -177,7 +171,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 +186,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 +201,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 +230,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