Commit 531746a1 authored by hezhen's avatar hezhen

修改统计

parent f24998dc
...@@ -32,6 +32,7 @@ public class PageDataVO<T> { ...@@ -32,6 +32,7 @@ public class PageDataVO<T> {
public static <M> PageDataVO<M> pageInfo(PageInfo<M> pageInfo){ public static <M> PageDataVO<M> pageInfo(PageInfo<M> pageInfo){
PageDataVO<M> pageDataVo = new PageDataVO<>(); PageDataVO<M> pageDataVo = new PageDataVO<>();
pageDataVo.setData(pageInfo.getList()); pageDataVo.setData(pageInfo.getList());
pageDataVo.setTotalCount(pageInfo.getTotal());
pageDataVo.setPageNum(pageInfo.getPageNum()); pageDataVo.setPageNum(pageInfo.getPageNum());
pageDataVo.setTotalPage(pageInfo.getPages()); pageDataVo.setTotalPage(pageInfo.getPages());
pageDataVo.setPageSize(pageInfo.getSize()); pageDataVo.setPageSize(pageInfo.getSize());
......
...@@ -4,8 +4,6 @@ package com.xxfc.platform.order.biz; ...@@ -4,8 +4,6 @@ package com.xxfc.platform.order.biz;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
...@@ -259,9 +257,7 @@ public class CompanyWalletDetailBiz extends BaseBiz<CompanyWalletDetailMapper, C ...@@ -259,9 +257,7 @@ public class CompanyWalletDetailBiz extends BaseBiz<CompanyWalletDetailMapper, C
public PageDataVO<CompanyWalletDetailVo> selectList(WalletDetailDTO walletDetailDTO) { public PageDataVO<CompanyWalletDetailVo> selectList(WalletDetailDTO walletDetailDTO) {
PageHelper.startPage(walletDetailDTO.getPage(), walletDetailDTO.getLimit()); return PageDataVO.pageInfo(walletDetailDTO.getPage(), walletDetailDTO.getLimit(), () -> getList(walletDetailDTO));
PageInfo<CompanyWalletDetailVo> branchCompanyPageInfo = new PageInfo<>(getList(walletDetailDTO));
return PageDataVO.pageInfo(branchCompanyPageInfo);
} }
public List<CompanyWalletDetailVo> getList(WalletDetailDTO walletDetailDTO){ public List<CompanyWalletDetailVo> getList(WalletDetailDTO walletDetailDTO){
......
...@@ -5,9 +5,11 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign; ...@@ -5,9 +5,11 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface; import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.order.biz.CompanyWalletDetailBiz; import com.xxfc.platform.order.biz.CompanyWalletDetailBiz;
import com.xxfc.platform.order.entity.CompanyWalletDetail; import com.xxfc.platform.order.entity.CompanyWalletDetail;
import com.xxfc.platform.order.pojo.dto.WalletDetailDTO; import com.xxfc.platform.order.pojo.dto.WalletDetailDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -29,7 +31,8 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa ...@@ -29,7 +31,8 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
@RequestMapping(value = "selectList", method = RequestMethod.GET) @RequestMapping(value = "selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "营收明细列表") @ApiModelProperty(value = "营收明细列表")
public ObjectRestResponse refundAmount(WalletDetailDTO walletDetailDTO) { public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> refundAmount(WalletDetailDTO walletDetailDTO) {
setPowerData(walletDetailDTO,true);
return ObjectRestResponse.succ(baseBiz.selectList(walletDetailDTO)); return ObjectRestResponse.succ(baseBiz.selectList(walletDetailDTO));
} }
...@@ -37,6 +40,7 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa ...@@ -37,6 +40,7 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
@RequestMapping(value = "sumAmount", method = RequestMethod.GET) @RequestMapping(value = "sumAmount", method = RequestMethod.GET)
@ApiModelProperty(value = "营收统计") @ApiModelProperty(value = "营收统计")
public ObjectRestResponse sumAmount(WalletDetailDTO walletDetailDTO) { public ObjectRestResponse sumAmount(WalletDetailDTO walletDetailDTO) {
setPowerData(walletDetailDTO,true);
return ObjectRestResponse.succ(baseBiz.getSumAmount(walletDetailDTO)); return ObjectRestResponse.succ(baseBiz.getSumAmount(walletDetailDTO));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment