use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.
the class OmcOrderController method queryUserOrderListWithPage.
/**
* Query user order list with page wrapper.
*
* @param baseQuery the base query
*
* @return the wrapper
*/
@PostMapping("queryUserOrderListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询用户订单列表")
public Wrapper queryUserOrderListWithPage(@RequestBody BaseQuery baseQuery) {
logger.info("queryUserOrderListWithPage - 查询用户订单集合. baseQuery={}", baseQuery);
Long userId = getLoginAuthDto().getUserId();
logger.info("操作人信息. userId={}", userId);
PageInfo pageInfo = omcOrderService.queryUserOrderListWithPage(userId, baseQuery);
return WrapMapper.ok(pageInfo);
}
use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.
the class TpcMqConsumerController method querySubscribeListWithPage.
/**
* 查询订阅者列表.
*
* @param tpcMqConsumer the tpc mq consumer
*
* @return the wrapper
*/
@PostMapping(value = "/querySubscribeListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询订阅者列表")
public Wrapper<PageInfo<TpcMqSubscribeVo>> querySubscribeListWithPage(@ApiParam(name = "consumer", value = "Mq消费者") @RequestBody TpcMqConsumer tpcMqConsumer) {
logger.info("查询Mq订阅列表tpcMqConsumerQuery={}", tpcMqConsumer);
PageHelper.startPage(tpcMqConsumer.getPageNum(), tpcMqConsumer.getPageSize());
tpcMqConsumer.setOrderBy("update_time desc");
List<TpcMqSubscribeVo> list = tpcMqConsumerService.listSubscribeVoWithPage(tpcMqConsumer);
PageInfo<TpcMqSubscribeVo> pageInfo = new PageInfo<>(list);
if (PublicUtil.isNotEmpty(list)) {
Map<Long, TpcMqSubscribeVo> tpcMqSubscribeVoMap = this.trans2Map(list);
List<Long> subscribeIdList = new ArrayList<>(tpcMqSubscribeVoMap.keySet());
List<TpcMqSubscribeVo> tagVoList = tpcMqConsumerService.listSubscribeVo(subscribeIdList);
for (TpcMqSubscribeVo vo : tagVoList) {
Long subscribeId = vo.getId();
if (!tpcMqSubscribeVoMap.containsKey(subscribeId)) {
continue;
}
TpcMqSubscribeVo tpcMqSubscribeVo = tpcMqSubscribeVoMap.get(subscribeId);
tpcMqSubscribeVo.setTagVoList(vo.getTagVoList());
}
pageInfo.setList(new ArrayList<>(tpcMqSubscribeVoMap.values()));
}
return WrapMapper.ok(pageInfo);
}
use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.
the class UacActionServiceImpl method queryActionListWithPage.
@Override
@Transactional(readOnly = true, rollbackFor = Exception.class)
public PageInfo queryActionListWithPage(ActionMainQueryDto actionMainQueryDto) {
List<Long> menuIdList = actionMainQueryDto.getMenuIdList();
Long menuId = null;
if (PublicUtil.isNotEmpty(menuIdList)) {
menuId = menuIdList.get(menuIdList.size() - 1);
}
UacAction uacAction = new UacAction();
uacAction.setMenuId(menuId);
BeanUtils.copyProperties(actionMainQueryDto, uacAction);
uacAction.setOrderBy("update_time desc");
PageHelper.startPage(actionMainQueryDto.getPageNum(), actionMainQueryDto.getPageSize());
List<ActionVo> actionList = uacActionMapper.queryActionListWithPage(uacAction);
return new PageInfo<>(actionList);
}
use of com.github.pagehelper.PageInfo in project production_ssm by megagao.
the class TechnologyServiceImpl method searchTechnologyByTechnologyName.
@Override
public EUDataGridResult searchTechnologyByTechnologyName(Integer page, Integer rows, String technologyName) throws Exception {
// 分页处理
PageHelper.startPage(page, rows);
List<Technology> list = technologyMapper.searchTechnologyByTechnologyName(technologyName);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<Technology> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
use of com.github.pagehelper.PageInfo in project production_ssm by megagao.
the class TechnologyServiceImpl method getList.
@Override
public EUDataGridResult getList(int page, int rows, Technology technology) throws Exception {
// 查询工艺列表
TechnologyExample example = new TechnologyExample();
// 分页处理
PageHelper.startPage(page, rows);
List<Technology> list = technologyMapper.selectByExample(example);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<Technology> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
Aggregations