use of io.nerv.core.mvc.util.Page in project EVA-API by PKAQ-LAB.
the class RoleService method listRole.
/**
* 查询角色列表
* @param roleEntity
* @return
*/
public IPage<RoleEntity> listRole(RoleEntity roleEntity, Integer page, Integer pageSize) {
page = null != page ? page : 1;
pageSize = null != pageSize ? pageSize : 10;
// 查询条件
QueryWrapper<RoleEntity> wrapper = new QueryWrapper<>(roleEntity);
// 分页条件
Page pagination = new Page();
pagination.setCurrent(page);
pagination.setSize(pageSize);
return this.mapper.selectPage(pagination, wrapper);
}
use of io.nerv.core.mvc.util.Page in project EVA-API by PKAQ-LAB.
the class UserService method listUser.
/**
* 查询用户列表
* @param userEntity
* @return
*/
public IPage<UserEntity> listUser(UserEntity userEntity, Integer page, Integer size) {
page = null != page ? page : 1;
size = null != size ? size : 10;
Page pagination = new Page();
pagination.setCurrent(page);
pagination.setSize(size);
return this.mapper.getUerWithRoleId(pagination, userEntity);
}
use of io.nerv.core.mvc.util.Page in project EVA-API by PKAQ-LAB.
the class StdBaseService method listPage.
/**
* 通用分页查询
* @param entity 目标实体类
* @param page 当前页码
* @return 分页模型类
*/
public IPage<T> listPage(T entity, Integer page) {
page = null != page ? page : 1;
// 查询条件
QueryWrapper<T> wrapper = new QueryWrapper<>(entity);
wrapper.orderByDesc("gmt_Modify");
// 分页条件
Page pagination = new Page();
pagination.setCurrent(page);
return this.mapper.selectPage(pagination, wrapper);
}
use of io.nerv.core.mvc.util.Page in project EVA-API by PKAQ-LAB.
the class BizLogCtrl method list.
@GetMapping("/list")
@ApiOperation(value = "获取日志列表", response = Response.class)
public Response list(@ApiParam(name = "dateRange", value = "查询区间") DateRangeVo dateRange, @ApiParam(name = "pageNo", value = "页码") Integer pageNo, @ApiParam(name = "pageCount", value = "条数") Integer size) {
QueryWrapper<MybatisBizLogEntity> wrapper = new QueryWrapper<>();
LocalDate begin = dateRange.getBegin();
LocalDate end = dateRange.getEnd();
if (null == begin) {
begin = LocalDate.now().minusDays(7);
}
if (null == end) {
end = LocalDate.now();
}
wrapper.ge("OPERATE_DATETIME", begin);
wrapper.le("OPERATE_DATETIME", end);
Page pagination = new Page();
pagination.setCurrent(pageNo == null ? 1 : pageNo);
pagination.setSize(size == null ? 10 : size);
return new Response().success(this.mybatisSupporterMapper.selectPage(pagination, wrapper));
}
use of io.nerv.core.mvc.util.Page in project EVA-API by PKAQ-LAB.
the class ErrorCtrl method list.
@GetMapping("/list")
@ApiOperation(value = "获取错误日志列表", response = Response.class)
public Response list(@ApiParam(name = "dateRange", value = "查询区间") DateRangeVo dateRange, @ApiParam(name = "pageNo", value = "页码") Integer pageNo, @ApiParam(name = "pageCount", value = "条数") Integer pageCount) {
QueryWrapper<ErrorlogEntity> wrapper = new QueryWrapper<>();
LocalDate begin = dateRange.getBegin();
LocalDate end = LocalDate.now();
if (null == begin) {
begin = LocalDate.now().minusDays(7);
}
if (null == end) {
end = LocalDate.now();
}
wrapper.ge("REQUEST_TIME", begin);
wrapper.le("REQUEST_TIME", end);
Page pagination = new Page();
pagination.setCurrent(pageNo == null ? 1 : pageNo);
pagination.setSize(pageCount == null ? 10 : pageCount);
return new Response().success(this.errorlogMapper.selectPage(pagination, wrapper));
}
Aggregations