| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderQueryVo; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderVo; | |||
| import com.iformall.service.WxProfitSharingOrderService; | |||
| @@ -11,6 +12,8 @@ import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -18,6 +21,9 @@ import org.springframework.web.bind.annotation.*; | |||
| import java.util.Map; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -44,6 +50,17 @@ public class WxProfitSharingOrderController extends BaseController { | |||
| final PageInfo<WxProfitSharingOrderVo> page = wxProfitSharingOrderService.listAsPage(order, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("记录导出") | |||
| @GetMapping("/exportData") | |||
| @SystemControllerLog(description = "线上自动分账记录-导出") | |||
| public void exportData(@ModelAttribute WxProfitSharingOrderQueryVo order, HttpServletRequest request, HttpServletResponse response) { | |||
| if (null == order) { | |||
| order = new WxProfitSharingOrderQueryVo(); | |||
| } | |||
| wxProfitSharingOrderService.exportData(order, request, response); | |||
| } | |||
| @ApiOperation("交易统计") | |||
| @GetMapping("/queryOrderSummary") | |||
| @@ -39,6 +39,12 @@ public class WxProfitSharingOrderQueryVo extends TenantEntity { | |||
| private Integer payAmount; | |||
| @TableField(exist = false) | |||
| private Date createTime; | |||
| @TableField(exist = false) | |||
| private Integer begin; | |||
| @TableField(exist = false) | |||
| private Integer limit; | |||
| } | |||
| @@ -1,6 +1,8 @@ | |||
| package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -16,16 +18,32 @@ public class WxProfitSharingOrderVo extends TenantEntity { | |||
| private Long id; | |||
| private Long merchantId; | |||
| @Excel(name="商户名称",width = 20,orderNum = "2") | |||
| private String merchantName; | |||
| @Excel(name="商户单号",width = 20,orderNum = "1") | |||
| private Long orderId; | |||
| @Excel(name="交易金额(分)",width = 20,orderNum = "3") | |||
| private Integer payAmount; | |||
| @Excel(name="交易结束时间",width = 20,orderNum = "5") | |||
| private Date payTimeEnd; | |||
| @Excel(name="交易开始时间",width = 20,orderNum = "4") | |||
| private Date payTimeStart; | |||
| private String transactionId; | |||
| private String sharingOrderNo; | |||
| @Excel(name="分账类型",width = 20,replace = { "单次分账_0", "多次分账_1", "完结分账(多次)_2", "完结分账(单次)_3"},orderNum = "6") | |||
| private Integer type; | |||
| private String receivers; | |||
| private String errorMsg; | |||
| @Excel(name="分账状态",width = 20,replace = { "未知_0", "提交订单失败_1", "提交业务失败_2", "受理成功_3", "处理中_4", "处理完成_5", "处理失败_6"},orderNum = "7") | |||
| private Integer sharingStatus; | |||
| private Date updateTime; | |||
| private Date createTime; | |||
| @@ -12,6 +12,9 @@ import com.iformall.enums.EnumPayWay; | |||
| import java.util.Map; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| public interface WxProfitSharingOrderService { | |||
| /** | |||
| @@ -36,6 +39,8 @@ public interface WxProfitSharingOrderService { | |||
| PageInfo<WxProfitSharingOrderVo> listAsPage(WxProfitSharingOrderQueryVo order, Integer pageNum, Integer pageSize); | |||
| void exportData(WxProfitSharingOrderQueryVo order,HttpServletRequest request, HttpServletResponse response); | |||
| Map<String,Object> queryOrderSummary(TenantEntity tenantEntity); | |||
| @@ -13,6 +13,7 @@ import com.iformall.domain.dto.WxProfitShareAppInoDto; | |||
| import com.iformall.domain.dto.WxSharingOrderDto; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.WxCUserBasicInfoVo; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderDetailsVo; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderQueryVo; | |||
| import com.iformall.domain.vo.WxProfitSharingOrderVo; | |||
| @@ -20,6 +21,7 @@ import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.pay.*; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxProfitSharingOrderService; | |||
| import com.iformall.service.pay.PayServiceFactory; | |||
| import com.iformall.service.pay.service.share.entity.PayShareQueryResult; | |||
| @@ -27,6 +29,9 @@ import com.iformall.service.pay.service.share.entity.PayShareResult; | |||
| import com.iformall.utils.BeanUtils; | |||
| import com.iformall.utils.DateUtils; | |||
| import com.iformall.utils.Utility; | |||
| import cn.afterturn.easypoi.handler.inter.IExcelExportServer; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -39,9 +44,12 @@ import org.springframework.transaction.annotation.Transactional; | |||
| import java.math.BigDecimal; | |||
| import java.util.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| @Service | |||
| public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderService { | |||
| public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderService,IExcelExportServer { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @@ -73,6 +81,9 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| @Autowired | |||
| PayServiceFactory payServiceFactory; | |||
| @Autowired | |||
| ExcelService excelService; | |||
| final JSONObject errorMap = JSON.parseObject("{" + | |||
| "\"SYSTEMERROR\":{\"detail\":\"接口返回错误\",\"reason\":\"系统超时\",\"resolution\":\"系统异常,请用相同参数重新调用\"}," + | |||
| @@ -501,7 +512,21 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxProfitSharingOrderMapper.findOrderList(order)); | |||
| } | |||
| @Override | |||
| public void exportData(WxProfitSharingOrderQueryVo order,HttpServletRequest request, HttpServletResponse response) { | |||
| excelService.exportBigExcel(this,order, null, "会员信息", WxProfitSharingOrderVo.class, "会员信息数据.xlsx", response, false); | |||
| } | |||
| @Override | |||
| public List<Object> selectListForExcelExport(Object queryParams, int page) { | |||
| WxProfitSharingOrderQueryVo orderquery = (WxProfitSharingOrderQueryVo) queryParams; | |||
| orderquery.setBegin((page-1)*10000); | |||
| orderquery.setLimit(10000); | |||
| 111111111111111111 | |||
| return null; | |||
| } | |||
| @Override | |||
| public Map<String, Object> queryOrderSummary(TenantEntity tenantEntity) { | |||
| Map<String, Object> result = new HashMap<>(); | |||
| @@ -676,5 +701,4 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| }); | |||
| } | |||
| } | |||