|
|
@@ -2,6 +2,9 @@ package com.zksy.web.controller.system;
|
|
|
|
|
|
import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -38,6 +41,7 @@ import com.zksy.system.service.ISysUserService;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/system/role")
|
|
|
+@Api(tags = "角色信息管理", description = "角色信息管理desc")
|
|
|
public class SysRoleController extends BaseController
|
|
|
{
|
|
|
@Autowired
|
|
|
@@ -55,6 +59,7 @@ public class SysRoleController extends BaseController
|
|
|
@Autowired
|
|
|
private ISysDeptService deptService;
|
|
|
|
|
|
+ @ApiOperation(value = "角色信息列表", notes = "角色信息列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(SysRole role)
|
|
|
@@ -64,6 +69,7 @@ public class SysRoleController extends BaseController
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "角色信息导出", notes = "角色信息导出")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:export')")
|
|
|
@PostMapping("/export")
|
|
|
@@ -77,6 +83,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 根据角色编号获取详细信息
|
|
|
*/
|
|
|
+ @ApiOperation(value = "根据角色编号获取详细信息", notes = "根据角色编号获取详细信息")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
@GetMapping(value = "/{roleId}")
|
|
|
public AjaxResult getInfo(@PathVariable Long roleId)
|
|
|
@@ -88,6 +95,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 新增角色
|
|
|
*/
|
|
|
+ @ApiOperation(value = "新增角色", notes = "新增角色")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:add')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
@@ -109,6 +117,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 修改保存角色
|
|
|
*/
|
|
|
+ @ApiOperation(value = "修改保存角色", notes = "修改保存角色")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
@@ -144,6 +153,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 修改保存数据权限
|
|
|
*/
|
|
|
+ @ApiOperation(value = "修改保存数据权限", notes = "修改保存数据权限")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/dataScope")
|
|
|
@@ -157,6 +167,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 状态修改
|
|
|
*/
|
|
|
+ @ApiOperation(value = "状态修改", notes = "状态修改")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/changeStatus")
|
|
|
@@ -171,6 +182,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 删除角色
|
|
|
*/
|
|
|
+ @ApiOperation(value = "删除角色", notes = "删除角色")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:remove')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{roleIds}")
|
|
|
@@ -182,6 +194,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 获取角色选择框列表
|
|
|
*/
|
|
|
+ @ApiOperation(value = "获取角色选择框列表", notes = "获取角色选择框列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
@GetMapping("/optionselect")
|
|
|
public AjaxResult optionselect()
|
|
|
@@ -192,6 +205,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 查询已分配用户角色列表
|
|
|
*/
|
|
|
+ @ApiOperation(value = "查询已分配用户角色列表", notes = "查询已分配用户角色列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
@GetMapping("/authUser/allocatedList")
|
|
|
public TableDataInfo allocatedList(SysUser user)
|
|
|
@@ -204,6 +218,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 查询未分配用户角色列表
|
|
|
*/
|
|
|
+ @ApiOperation(value = "查询未分配用户角色列表", notes = "查询未分配用户角色列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
@GetMapping("/authUser/unallocatedList")
|
|
|
public TableDataInfo unallocatedList(SysUser user)
|
|
|
@@ -216,6 +231,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 取消授权用户
|
|
|
*/
|
|
|
+ @ApiOperation(value = "取消授权用户", notes = "取消授权用户")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
@PutMapping("/authUser/cancel")
|
|
|
@@ -227,6 +243,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 批量取消授权用户
|
|
|
*/
|
|
|
+ @ApiOperation(value = "批量取消授权用户", notes = "批量取消授权用户")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
@PutMapping("/authUser/cancelAll")
|
|
|
@@ -238,6 +255,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 批量选择用户授权
|
|
|
*/
|
|
|
+ @ApiOperation(value = "批量选择用户授权", notes = "批量选择用户授权")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
@PutMapping("/authUser/selectAll")
|
|
|
@@ -250,6 +268,7 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 获取对应角色部门树列表
|
|
|
*/
|
|
|
+ @ApiOperation(value = "获取对应角色部门树列表", notes = "获取对应角色部门树列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
|
|
@GetMapping(value = "/deptTree/{roleId}")
|
|
|
public AjaxResult deptTree(@PathVariable("roleId") Long roleId)
|