pagehelper分页属性获取,对分页后数据再次拼装


    @Override
    public PageInfo
        getCommissionHouseSummry(CommissionCalcCondition commissionCalcCondition) {
        commissionCalcCondition.doPage();
        List pageSignHouse = commissionHouseInfoDao.getPageSignHouse(commissionCalcCondition);
        PageInfo commissionHouseInfoPageInfo = new PageInfo<>(pageSignHouse);

        // 组装业务数据
        List commissionHouseSummryDtoList = new ArrayList<>();
        PageInfo commissionHouseSummryDtoPageInfo = new PageInfo<>(commissionHouseSummryDtoList);
        // 复制分页属性
        BeanUtils.copyProperties(commissionHouseInfoPageInfo, commissionHouseSummryDtoPageInfo);

        for (CommissionHouseInfo houseInfo : pageSignHouse) {
            // 业务代码 ... 
            CommissionHouseSummryDto commissionHouseSummryDto = new CommissionHouseSummryDto();
            commissionHouseSummryDto.setA(0);
            commissionHouseSummryDto.setB(1);
            commissionHouseSummryDtoList.add(commissionHouseSummryDto);
        }
        commissionHouseSummryDtoPageInfo.setList(commissionHouseSummryDtoList);
        return commissionHouseSummryDtoPageInfo;
    }

 

你可能感兴趣的:(java,java,pagehelper)