|
|
|
@ -55,7 +55,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysDeptService deptService;
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
|
public TableDataInfo list(SysRole role)
|
|
|
|
|
{
|
|
|
|
@ -65,7 +65,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
|
|
|
@PostMapping("/export")
|
|
|
|
|
public void export(HttpServletResponse response, SysRole role)
|
|
|
|
|
{
|
|
|
|
@ -77,7 +77,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 根据角色编号获取详细信息
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
@GetMapping(value = "/{roleId}")
|
|
|
|
|
public AjaxResult getInfo(@PathVariable Long roleId)
|
|
|
|
|
{
|
|
|
|
@ -88,7 +88,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 新增角色
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:add')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:add')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping
|
|
|
|
|
public AjaxResult add(@Validated @RequestBody SysRole role)
|
|
|
|
@ -109,7 +109,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 修改保存角色
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping
|
|
|
|
|
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
|
|
|
@ -144,7 +144,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 修改保存数据权限
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping("/dataScope")
|
|
|
|
|
public AjaxResult dataScope(@RequestBody SysRole role)
|
|
|
|
@ -157,7 +157,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 状态修改
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping("/changeStatus")
|
|
|
|
|
public AjaxResult changeStatus(@RequestBody SysRole role)
|
|
|
|
@ -171,7 +171,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 删除角色
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:remove')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:remove')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
|
|
|
|
@DeleteMapping("/{roleIds}")
|
|
|
|
|
public AjaxResult remove(@PathVariable Long[] roleIds)
|
|
|
|
@ -182,7 +182,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 获取角色选择框列表
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
@GetMapping("/optionselect")
|
|
|
|
|
public AjaxResult optionselect()
|
|
|
|
|
{
|
|
|
|
@ -192,7 +192,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 查询已分配用户角色列表
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
@GetMapping("/authUser/allocatedList")
|
|
|
|
|
public TableDataInfo allocatedList(SysUser user)
|
|
|
|
|
{
|
|
|
|
@ -204,7 +204,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 查询未分配用户角色列表
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
|
|
@GetMapping("/authUser/unallocatedList")
|
|
|
|
|
public TableDataInfo unallocatedList(SysUser user)
|
|
|
|
|
{
|
|
|
|
@ -216,7 +216,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 取消授权用户
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
|
|
@PutMapping("/authUser/cancel")
|
|
|
|
|
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
|
|
|
|
@ -227,7 +227,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 批量取消授权用户
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
|
|
@PutMapping("/authUser/cancelAll")
|
|
|
|
|
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
|
|
|
|
@ -238,7 +238,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 批量选择用户授权
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
|
|
@PutMapping("/authUser/selectAll")
|
|
|
|
|
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
|
|
|
|
@ -250,7 +250,7 @@ public class SysRoleController extends BaseController
|
|
|
|
|
/**
|
|
|
|
|
* 获取对应角色部门树列表
|
|
|
|
|
*/
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
|
|
@GetMapping(value = "/deptTree/{roleId}")
|
|
|
|
|
public AjaxResult deptTree(@PathVariable("roleId") Long roleId)
|
|
|
|
|
{
|
|
|
|
|