|
@@ -23,6 +23,7 @@ import com.zksy.system.service.ISysUserService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
@@ -50,7 +51,7 @@ public class SysRoleController extends BaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysUserService userService;
|
|
private ISysUserService userService;
|
|
|
|
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
@ApiOperation(value = "角色信息列表", notes = "角色信息列表")
|
|
@ApiOperation(value = "角色信息列表", notes = "角色信息列表")
|
|
|
public TableDataInfo list(SysRole role) {
|
|
public TableDataInfo list(SysRole role) {
|
|
@@ -60,7 +61,7 @@ public class SysRoleController extends BaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
|
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
|
@ApiOperation(value = "角色信息导出", notes = "角色信息导出")
|
|
@ApiOperation(value = "角色信息导出", notes = "角色信息导出")
|
|
|
public void export(HttpServletResponse response, SysRole role) {
|
|
public void export(HttpServletResponse response, SysRole role) {
|
|
@@ -72,7 +73,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 根据角色编号获取详细信息
|
|
* 根据角色编号获取详细信息
|
|
|
*/
|
|
*/
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
@GetMapping(value = "/{roleId}")
|
|
@GetMapping(value = "/{roleId}")
|
|
|
@ApiOperation(value = "根据角色编号获取详细信息", notes = "根据角色编号获取详细信息")
|
|
@ApiOperation(value = "根据角色编号获取详细信息", notes = "根据角色编号获取详细信息")
|
|
|
public AjaxResult getInfo(@PathVariable Long roleId) {
|
|
public AjaxResult getInfo(@PathVariable Long roleId) {
|
|
@@ -83,7 +84,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 新增角色
|
|
* 新增角色
|
|
|
*/
|
|
*/
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:add')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:add')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
|
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
|
|
@ApiOperation(value = "新增角色", notes = "新增角色")
|
|
@ApiOperation(value = "新增角色", notes = "新增角色")
|
|
|
@PostMapping
|
|
@PostMapping
|
|
@@ -101,7 +102,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 修改保存角色
|
|
* 修改保存角色
|
|
|
*/
|
|
*/
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
@ApiOperation(value = "修改保存角色", notes = "修改保存角色")
|
|
@ApiOperation(value = "修改保存角色", notes = "修改保存角色")
|
|
|
@PutMapping
|
|
@PutMapping
|
|
@@ -131,7 +132,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 修改保存数据权限
|
|
* 修改保存数据权限
|
|
|
*/
|
|
*/
|
|
|
- // @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/dataScope")
|
|
@PutMapping("/dataScope")
|
|
|
@ApiOperation(value = "修改保存数据权限", notes = "修改保存数据权限")
|
|
@ApiOperation(value = "修改保存数据权限", notes = "修改保存数据权限")
|
|
@@ -144,7 +145,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 状态修改
|
|
* 状态修改
|
|
|
*/
|
|
*/
|
|
|
- // @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
@ApiOperation(value = "状态修改", notes = "状态修改")
|
|
@ApiOperation(value = "状态修改", notes = "状态修改")
|
|
|
@PutMapping("/changeStatus")
|
|
@PutMapping("/changeStatus")
|
|
@@ -158,7 +159,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 删除角色
|
|
* 删除角色
|
|
|
*/
|
|
*/
|
|
|
- // @PreAuthorize("@ss.hasPermi('system:role:remove')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:remove')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
|
|
@ApiOperation(value = "删除角色", notes = "删除角色")
|
|
@ApiOperation(value = "删除角色", notes = "删除角色")
|
|
|
@DeleteMapping("/{roleIds}")
|
|
@DeleteMapping("/{roleIds}")
|
|
@@ -169,7 +170,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 获取角色选择框列表
|
|
* 获取角色选择框列表
|
|
|
*/
|
|
*/
|
|
|
- // @PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
@GetMapping("/optionselect")
|
|
@GetMapping("/optionselect")
|
|
|
@ApiOperation(value = "获取角色选择框列表", notes = "获取角色选择框列表")
|
|
@ApiOperation(value = "获取角色选择框列表", notes = "获取角色选择框列表")
|
|
|
public AjaxResult optionselect() {
|
|
public AjaxResult optionselect() {
|
|
@@ -179,7 +180,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 查询已分配用户角色列表
|
|
* 查询已分配用户角色列表
|
|
|
*/
|
|
*/
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
@GetMapping("/authUser/allocatedList")
|
|
@GetMapping("/authUser/allocatedList")
|
|
|
@ApiOperation(value = "查询已分配用户角色列表", notes = "查询已分配用户角色列表")
|
|
@ApiOperation(value = "查询已分配用户角色列表", notes = "查询已分配用户角色列表")
|
|
|
public TableDataInfo allocatedList(SysUser user) {
|
|
public TableDataInfo allocatedList(SysUser user) {
|
|
@@ -191,7 +192,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 查询未分配用户角色列表
|
|
* 查询未分配用户角色列表
|
|
|
*/
|
|
*/
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
@GetMapping("/authUser/unallocatedList")
|
|
@GetMapping("/authUser/unallocatedList")
|
|
|
@ApiOperation(value = "查询未分配用户角色列表", notes = "查询未分配用户角色列表")
|
|
@ApiOperation(value = "查询未分配用户角色列表", notes = "查询未分配用户角色列表")
|
|
|
public TableDataInfo unallocatedList(SysUser user) {
|
|
public TableDataInfo unallocatedList(SysUser user) {
|
|
@@ -203,7 +204,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 取消授权用户
|
|
* 取消授权用户
|
|
|
*/
|
|
*/
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
@ApiOperation(value = "取消授权用户", notes = "取消授权用户")
|
|
@ApiOperation(value = "取消授权用户", notes = "取消授权用户")
|
|
|
@PutMapping("/authUser/cancel")
|
|
@PutMapping("/authUser/cancel")
|
|
@@ -214,7 +215,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 批量取消授权用户
|
|
* 批量取消授权用户
|
|
|
*/
|
|
*/
|
|
|
- // @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
@ApiOperation(value = "批量取消授权用户", notes = "批量取消授权用户")
|
|
@ApiOperation(value = "批量取消授权用户", notes = "批量取消授权用户")
|
|
|
@PutMapping("/authUser/cancelAll")
|
|
@PutMapping("/authUser/cancelAll")
|
|
@@ -225,7 +226,7 @@ public class SysRoleController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 批量选择用户授权
|
|
* 批量选择用户授权
|
|
|
*/
|
|
*/
|
|
|
- // @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
@ApiOperation(value = "批量选择用户授权", notes = "批量选择用户授权")
|
|
@ApiOperation(value = "批量选择用户授权", notes = "批量选择用户授权")
|
|
|
@PutMapping("/authUser/selectAll")
|
|
@PutMapping("/authUser/selectAll")
|