| | |
| | | import com.ycl.entity.user.UmsRole; |
| | | import com.ycl.service.user.UmsRoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | int count = roleService.allocResource(roleId, resourceIds); |
| | | return CommonResult.success(count); |
| | | } |
| | | @ApiOperation("批量修改角色状态") |
| | | @RequestMapping(value = "/updateStatusBatch", method = RequestMethod.POST) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "用户Ids",required = true, dataType = "Array"), |
| | | @ApiImplicitParam(name = "status", value = "状态0->禁用;1->启用",required = true, dataType = "Integer") |
| | | }) |
| | | @ResponseBody |
| | | public CommonResult updateStatusBatch(@RequestParam("ids") List<Long> ids, @RequestParam(value = "status") Integer status) { |
| | | boolean success = roleService.updateStatusBatch(ids, status); |
| | | if (success) { |
| | | return CommonResult.success(null); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | } |