疯狂的狮子li
2021-11-18 f8487f581be226c3def30676055e0e32a5ac341a
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
@@ -16,8 +16,7 @@
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.SysPermissionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.*;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -66,7 +65,7 @@
    @ApiOperation("根据角色编号获取详细信息")
    @PreAuthorize("@ss.hasPermi('system:role:query')")
    @GetMapping(value = "/{roleId}")
    public AjaxResult<SysRole> getInfo(@PathVariable Long roleId) {
    public AjaxResult<SysRole> getInfo(@ApiParam("角色ID") @PathVariable Long roleId) {
        roleService.checkRoleDataScope(roleId);
        return AjaxResult.success(roleService.selectRoleById(roleId));
    }
@@ -147,7 +146,7 @@
    @PreAuthorize("@ss.hasPermi('system:role:remove')")
    @Log(title = "角色管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/{roleIds}")
    public AjaxResult<Void> remove(@PathVariable Long[] roleIds) {
    public AjaxResult<Void> remove(@ApiParam("岗位ID串") @PathVariable Long[] roleIds) {
        return toAjax(roleService.deleteRoleByIds(roleIds));
    }
@@ -196,6 +195,10 @@
     * 批量取消授权用户
     */
    @ApiOperation("批量取消授权用户")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "roleId", value = "角色ID", paramType = "query"),
        @ApiImplicitParam(name = "userIds", value = "用户ID串", paramType = "query")
    })
    @PreAuthorize("@ss.hasPermi('system:role:edit')")
    @Log(title = "角色管理", businessType = BusinessType.GRANT)
    @PutMapping("/authUser/cancelAll")
@@ -207,6 +210,10 @@
     * 批量选择用户授权
     */
    @ApiOperation("批量选择用户授权")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "roleId", value = "角色ID", paramType = "query"),
        @ApiImplicitParam(name = "userIds", value = "用户ID串", paramType = "query")
    })
    @PreAuthorize("@ss.hasPermi('system:role:edit')")
    @Log(title = "角色管理", businessType = BusinessType.GRANT)
    @PutMapping("/authUser/selectAll")