|
@@ -27,11 +27,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
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;
|
|
@@ -164,7 +162,7 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
+ @RequestMapping
|
|
|
public AjaxResult edit(@Validated @RequestBody SysRole role) {
|
|
|
// roleService.checkRoleAllowed(role);
|
|
|
// roleService.checkRoleDataScope(role.getRoleId());
|
|
@@ -205,7 +203,7 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping("/dataScope")
|
|
|
+ @RequestMapping("/dataScope")
|
|
|
public AjaxResult dataScope(@RequestBody SysRole role) {
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
roleService.checkRoleDataScope(role.getRoleId());
|
|
@@ -217,7 +215,7 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping("/changeStatus")
|
|
|
+ @RequestMapping("/changeStatus")
|
|
|
public AjaxResult changeStatus(@RequestBody SysRole role) {
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
roleService.checkRoleDataScope(role.getRoleId());
|
|
@@ -230,7 +228,7 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:remove')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{roleIds}")
|
|
|
+ @RequestMapping("/{roleIds}")
|
|
|
public AjaxResult remove(@PathVariable Long[] roleIds) {
|
|
|
return toAjax(roleService.deleteRoleByIds(roleIds));
|
|
|
}
|
|
@@ -274,7 +272,7 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
- @PutMapping("/authUser/cancel")
|
|
|
+ @RequestMapping("/authUser/cancel")
|
|
|
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) {
|
|
|
return toAjax(roleService.deleteAuthUser(userRole));
|
|
|
}
|
|
@@ -284,8 +282,8 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
- @PutMapping("/authUser/cancelAll")
|
|
|
- public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) {
|
|
|
+ @RequestMapping("/authUser/cancelAll")
|
|
|
+ public AjaxResult cancelAuthUserAll(Long roleId,@RequestBody Long[] userIds) {
|
|
|
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
|
|
|
}
|
|
|
|
|
@@ -294,7 +292,7 @@ public class SysRoleController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
- @PutMapping("/authUser/selectAll")
|
|
|
+ @RequestMapping("/authUser/selectAll")
|
|
|
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) {
|
|
|
roleService.checkRoleDataScope(roleId);
|
|
|
return toAjax(roleService.insertAuthUsers(roleId, userIds));
|