| | |
| | | |
| | | @ApiOperation(value = "角色下拉列表", response = RoleVO.class) |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage() { |
| | | Long communityId = 0l; |
| | | return userService.listRoleBackstage(communityId); |
| | | public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | Long communityId = 0L; |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @PostMapping("/role/listrolebackstage") |
| | | R listRoleBackstage(@RequestParam("communityId") Long communityId); |
| | | R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize); |
| | | |
| | | /** |
| | | * 分页查询后台用户 |
| | |
| | | |
| | | @ApiOperation(value = "角色下拉列表", response = RoleVO.class) |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage() { |
| | | public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | Long communityId = this.getCommunityId(); |
| | | return userService.listRoleBackstage(communityId); |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @PostMapping("listrolebackstage") |
| | | public R listRoleBackstage(@RequestParam("communityId") Long communityId) { |
| | | return roleService.listRoleBackstage(communityId); |
| | | public R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | return roleService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 对应社区 0 表示运营后台 |
| | | * @return 角色集合 |
| | | */ |
| | | R listRoleBackstage(Long communityId); |
| | | R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize); |
| | | |
| | | /** |
| | | * 新增角色 |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @Override |
| | | public R listRoleBackstage(Long communityId) { |
| | | List<SysRoleDO> sysRoleDOS = |
| | | roleDAO.selectList(new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId).orderByDesc(SysRoleDO::getCreateAt)); |
| | | if (ObjectUtils.isEmpty(sysRoleDOS)) { |
| | | public R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize) { |
| | | IPage<SysRoleDO> sysRoleDOIPage=this.roleDAO.selectPage(new Page<>(pageNum,pageSize),new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId).orderByDesc(SysRoleDO::getCreateAt)); |
| | | if (ObjectUtils.isEmpty(sysRoleDOIPage.getRecords())) { |
| | | return R.fail("角色列表为空"); |
| | | } |
| | | List<RoleVO> roleVOS = new ArrayList<>(); |
| | | sysRoleDOS.forEach(sysRoleDO -> { |
| | | RoleVO roleVO = new RoleVO(); |
| | | BeanUtils.copyProperties(sysRoleDO, roleVO); |
| | | roleVOS.add(roleVO); |
| | | }); |
| | | return R.ok(roleVOS); |
| | | return R.ok(sysRoleDOIPage); |
| | | } |
| | | |
| | | /** |