| @@ -8,6 +8,7 @@ import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.AliBusinessCircleOrder; | import com.iformall.domain.po.AliBusinessCircleOrder; | ||||
| import com.iformall.domain.po.WxThirdPartyOrders; | import com.iformall.domain.po.WxThirdPartyOrders; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.enums.EnumThirdOrderType; | |||||
| import com.iformall.service.WxThirdPartyOrdersService; | import com.iformall.service.WxThirdPartyOrdersService; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -83,7 +84,21 @@ public class WxThirdPartyOrdersController extends BaseController { | |||||
| } | } | ||||
| circleOrder.updateTenantInfo(getTenantInfo()); | circleOrder.updateTenantInfo(getTenantInfo()); | ||||
| circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | ||||
| circleOrder.setSourceType(EnumThirdOrderType.RMB_PAY.getCode()); | |||||
| wxThirdPartyOrdersOrderService.exportData(circleOrder, request, response); | wxThirdPartyOrdersOrderService.exportData(circleOrder, request, response); | ||||
| } | } | ||||
| @GetMapping("exportDataVo") | |||||
| @SystemControllerLog(description = "券订单数据-导出数据") | |||||
| public void exportDataVo(@ModelAttribute WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||||
| logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::exportDataVo"); | |||||
| if (null == circleOrder) { | |||||
| circleOrder = new WxThirdPartyOrders(); | |||||
| } | |||||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||||
| circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||||
| circleOrder.setSourceType(EnumThirdOrderType.CREDIT_PAY.getCode()); | |||||
| wxThirdPartyOrdersOrderService.exportDataVo(circleOrder, request, response); | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1,160 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.BusinessCircleBase; | |||||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||||
| import com.iformall.domain.po.WxMerchant; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxThirdPartyOrdersVo extends TenantEntity { | |||||
| protected Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知Id",name="noticeId") | |||||
| private String noticeId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知创建时间",name="noticeCreateTime") | |||||
| private Date noticeCreateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知类型:MALL_TRANSACTION.SUCCESS",name="noticeEventType") | |||||
| private String noticeEventType; | |||||
| @Excel(name = "摘要", width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知回调摘要",name="summary") | |||||
| private String summary; | |||||
| @Excel(name = "抵扣时间", width = 20, orderNum = "4", format = "yyyy-MM-dd HH:mm:ss") | |||||
| @io.swagger.annotations.ApiModelProperty(value="交易完成时间",name="timeEnd") | |||||
| private Date timeEnd; | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(分)",name="amount") | |||||
| private Integer amount; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(元)",name="amountStr") | |||||
| private String amountStr; | |||||
| public String getAmountStr() { | |||||
| return amount != null ? new BigDecimal(amount).divide(new BigDecimal(100)).toPlainString(): amountStr; | |||||
| } | |||||
| @Excel(name = "积分数量", width = 20, orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(分)",name="payAmount") | |||||
| private Integer payAmount; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(元)",name="payAmountStr") | |||||
| private String payAmountStr; | |||||
| public String getPayAmountStr() { | |||||
| return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString(): payAmountStr; | |||||
| } | |||||
| @Excel(name = "订单编号", width = 20, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付订单号",name="transactionId") | |||||
| private String transactionId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="门店Id,与第三方对齐",name="merchantId") | |||||
| private Long merchantId; | |||||
| @Excel(name = "门店名称", width = 20, orderNum = "2") | |||||
| private String merchantName; | |||||
| @TableField(exist = false) | |||||
| private WxMerchant merchant; | |||||
| @Excel(name = "会员ID", width = 20, orderNum = "6") | |||||
| @TableField(exist = false) | |||||
| private String userIdStr; | |||||
| public String getUserIdStr(){ | |||||
| return cUserId == null?"":Long.toString(cUserId); | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") | |||||
| private Long cUserId; | |||||
| private String cUserNickName; | |||||
| @Excel(name = "会员手机号", width = 20, orderNum = "7") | |||||
| @TableField(exist = false) | |||||
| private String userPhoneStr; | |||||
| public String getUserPhoneStr(){ | |||||
| return cUserPhone; | |||||
| } | |||||
| private String cUserPhone; | |||||
| @TableField(exist = false) | |||||
| private WxCUserBasicInfo basicInfo; | |||||
| @io.swagger.annotations.ApiModelProperty(value="是否获得积分(1:是,0:否)",name="earnPoints") | |||||
| private Integer earnPoints; | |||||
| @io.swagger.annotations.ApiModelProperty(value="订单更新积分值",name="increasedPoints") | |||||
| private Integer increasedPoints; | |||||
| @io.swagger.annotations.ApiModelProperty(value="积分更新时间(新增)",name="increasedPoints") | |||||
| private Date pointsUpdateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="是否退款(1:是,0:否)",name="isRefund") | |||||
| private Integer isRefund; | |||||
| @io.swagger.annotations.ApiModelProperty(value="正常订单状态(is_refund=0时)1:部分退款2:订单关闭",name="orderStatus") | |||||
| private Integer orderStatus; | |||||
| @io.swagger.annotations.ApiModelProperty(value="微信支付退款单号",name="refundId") | |||||
| private String refundId; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startdate") | |||||
| private Date startTime; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") | |||||
| private Date endTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(分)",name="refundAmount") | |||||
| private Integer refundAmount; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(元)",name="refundAmountStr") | |||||
| private String refundAmountStr; | |||||
| public String getRefundAmountStr() { | |||||
| return refundAmount != null ? new BigDecimal(refundAmount).divide(new BigDecimal(100)).toPlainString(): refundAmountStr; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppId") | |||||
| private String sourceAppId; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppName") | |||||
| private String sourceAppName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="1:RMB订单;2:积分订单",name="sourceType") | |||||
| private Integer sourceType; | |||||
| @io.swagger.annotations.ApiModelProperty(value="门店名称",name="shopName") | |||||
| private String shopName; | |||||
| @Excel(name = "门店编码", width = 20, orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value="门店编号",name="shopNumber") | |||||
| private String shopNumber; | |||||
| @io.swagger.annotations.ApiModelProperty(value="顾客手机号",name="userPhone") | |||||
| private String userPhone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="顾客编号",name="userNumber") | |||||
| private String userNumber; | |||||
| } | |||||
| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxThirdPartyOrders; | import com.iformall.domain.po.WxThirdPartyOrders; | ||||
| import com.iformall.domain.vo.WxThirdPartyOrdersVo; | |||||
| import java.util.List; | import java.util.List; | ||||
| @@ -10,6 +11,7 @@ import java.util.List; | |||||
| public interface WxThirdPartyOrdersMapper extends CommonMapper<WxThirdPartyOrders, Long> { | public interface WxThirdPartyOrdersMapper extends CommonMapper<WxThirdPartyOrders, Long> { | ||||
| List<WxThirdPartyOrders> findList(WxThirdPartyOrders record); | List<WxThirdPartyOrders> findList(WxThirdPartyOrders record); | ||||
| List<WxThirdPartyOrdersVo> findListVo(WxThirdPartyOrders circleOrder); | |||||
| WxThirdPartyOrders getById(WxThirdPartyOrders record); | WxThirdPartyOrders getById(WxThirdPartyOrders record); | ||||
| @@ -58,4 +58,6 @@ public interface WxThirdPartyOrdersService { | |||||
| void pointDeduction(WxThirdPartyOrders record); | void pointDeduction(WxThirdPartyOrders record); | ||||
| void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); | void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); | ||||
| void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); | |||||
| } | } | ||||
| @@ -7,6 +7,7 @@ import com.iformall.common.IdWorker; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxThirdPartyOrdersVo; | |||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.WxThirdPartyOrdersMapper; | import com.iformall.mapper.WxThirdPartyOrdersMapper; | ||||
| @@ -452,8 +453,12 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService | |||||
| @Override | @Override | ||||
| public void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | public void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | ||||
| List<WxThirdPartyOrders> list = wxThirdPartyOrdersMapper.findList(circleOrder); | List<WxThirdPartyOrders> list = wxThirdPartyOrdersMapper.findList(circleOrder); | ||||
| excelService.exportExcel(list, null, "三方交易", WxThirdPartyOrders.class, "三方交易.xlsx", response, false); | |||||
| excelService.exportExcel(list, null, "第三方订单交易", WxThirdPartyOrders.class, "第三方订单交易.xlsx", response, false); | |||||
| } | } | ||||
| @Override | |||||
| public void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||||
| List<WxThirdPartyOrdersVo> list = wxThirdPartyOrdersMapper.findListVo(circleOrder); | |||||
| excelService.exportExcel(list, null, "第三方积分抵扣", WxThirdPartyOrdersVo.class, "第三方积分抵扣.xlsx", response, false); | |||||
| } | |||||
| } | } | ||||
| @@ -157,6 +157,13 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findListVo" parameterType="com.iformall.domain.po.WxThirdPartyOrders" resultType="com.iformall.domain.vo.WxThirdPartyOrdersVo"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_third_party_orders | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="getById" parameterType="com.iformall.domain.po.WxThirdPartyOrders" resultMap="BaseResultMap"> | <select id="getById" parameterType="com.iformall.domain.po.WxThirdPartyOrders" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||