Просмотр исходного кода

Merge branch 'release_toaliyun_real_20230701' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real_20230701

release_toaliyun_real
lin 2 лет назад
Родитель
Сommit
612308fb13
4 измененных файлов: 79 добавлений и 8 удалений
  1. +72
    -7
      mallinkService/src/main/java/com/iformall/domain/vo/WxProfitSharingOrderVo.java
  2. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java
  3. +5
    -1
      mallinkService/src/main/java/com/iformall/service/order/entity/WxComposeChildOrderShare.java
  4. +1
    -0
      mallinkService/src/main/resources/mapper/WxProfitSharingOrderMapper.xml

+ 72
- 7
mallinkService/src/main/java/com/iformall/domain/vo/WxProfitSharingOrderVo.java Просмотреть файл

@@ -1,11 +1,17 @@
package com.iformall.domain.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.domain.po.base.TenantEntity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.iformall.service.order.entity.WxComposeChildOrderShare;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
@@ -24,15 +30,20 @@ public class WxProfitSharingOrderVo extends TenantEntity {
private String mchId;
private Long sharingMerchantId;
@Excel(name="商户单号",width = 20,orderNum = "1")
@Excel(name="支付单号",width = 20,orderNum = "1")
private Long orderId;

@Excel(name="商户名称",width = 20,orderNum = "2")
private String merchantName;
@Excel(name="分账单号",width = 20,orderNum = "2")
private Long outSettleNo;

@Excel(name="付款商户",width = 20,orderNum = "3")
private String payMerchantName;

@Excel(name="到账商户",width = 20,orderNum = "3")
@Excel(name="核销商户",width = 20,orderNum = "5")
private String merchantName;


@Excel(name="分账商户",width = 20,orderNum = "14")
private String sharingMerchantName;

public String getSharingMerchantName(){
@@ -44,9 +55,14 @@ public class WxProfitSharingOrderVo extends TenantEntity {
return sharingMerchantName;
}

@Excel(name="交易金额(分)",width = 20,orderNum = "4")
private Integer payAmount;

@Excel(name = "付款金额(元)", width = 20, orderNum = "4")
private String payAmountStr;
public String getPayAmountStr() {
return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString() : payAmountStr;
}

@io.swagger.annotations.ApiModelProperty(value="订单ID",name="singleOrderId")
private Long singleOrderId;
@io.swagger.annotations.ApiModelProperty(value="单个订单分账总金额(分)",name="singleOrderAmount")
@@ -62,14 +78,63 @@ public class WxProfitSharingOrderVo extends TenantEntity {
private String transactionId;
private String sharingOrderNo;
@Excel(name="分账类型",width = 20,replace = { "单次分账_0", "多次分账_1", "完结分账(多次)_2", "完结分账(单次)_3"},orderNum = "7")
// @Excel(name="分账类型",width = 20,replace = { "单次分账_0", "多次分账_1", "完结分账(多次)_2", "完结分账(单次)_3"},orderNum = "7")
private Integer type;
private String pointDeduction;
private String receivers;
private String errorMsg;

@Excel(name = "支付手续费(元)", width = 20, orderNum = "6")
public String realRateAmountStr;
@Excel(name = "官方抽佣(元)", width = 20, orderNum = "7")
public String commissionAmountStr;
@Excel(name = "达人佣金(元)", width = 20, orderNum = "8")
public String cpsCommissionStr;
@Excel(name = "系统扣点(元)", width = 20, orderNum = "9")
public String systemAmountStr;
@Excel(name = "销售扣点(元)", width = 20, orderNum = "10")
public String sellerAmountStr;
@Excel(name = "运营扣点(元)", width = 20, orderNum = "11")
public String rateAmountStr;

@Excel(name = "总服务费(元)", width = 20, orderNum = "12")
public String serviceAmountStr;
@Excel(name = "实际分账金额(元)", width = 20, orderNum = "13")
public String shareAmountStr;

public void setPointDeduction(String pointDeduction){
this.pointDeduction = pointDeduction;
WxComposeChildOrderShare composeChildOrderShare = null;
if(StringUtils.isNotBlank(this.pointDeduction)){
try{
composeChildOrderShare = JSON.parseObject(this.pointDeduction, WxComposeChildOrderShare.class);
}catch(Exception e){}
}
if(composeChildOrderShare != null){
Integer realRateAmount = composeChildOrderShare.getRealRateAmount();
this.realRateAmountStr = realRateAmount != null ? new BigDecimal(realRateAmount).divide(new BigDecimal(100)).toPlainString() : this.realRateAmountStr;
Integer commissionAmount = composeChildOrderShare.getCommissionAmount();
this.commissionAmountStr = commissionAmount != null ? new BigDecimal(commissionAmount).divide(new BigDecimal(100)).toPlainString() : this.commissionAmountStr;
Integer cpsCommission = composeChildOrderShare.getCpsCommission();
this.cpsCommissionStr = cpsCommission != null ? new BigDecimal(cpsCommission).divide(new BigDecimal(100)).toPlainString() : this.cpsCommissionStr;
Integer systemAmount = composeChildOrderShare.getSystemAmount();
this.systemAmountStr = systemAmount != null ? new BigDecimal(systemAmount).divide(new BigDecimal(100)).toPlainString() : this.systemAmountStr;
Integer sellerAmount = composeChildOrderShare.getSellerAmount();
this.sellerAmountStr = sellerAmount != null ? new BigDecimal(sellerAmount).divide(new BigDecimal(100)).toPlainString() : this.sellerAmountStr;
Integer rateAmount = composeChildOrderShare.getRateAmount();
this.rateAmountStr = rateAmount != null ? new BigDecimal(rateAmount).divide(new BigDecimal(100)).toPlainString() : this.rateAmountStr;
Integer serviceAmount = composeChildOrderShare.getServiceAmount();
this.serviceAmountStr = serviceAmount != null ? new BigDecimal(serviceAmount).divide(new BigDecimal(100)).toPlainString() : this.serviceAmountStr;
Integer shareAmount = composeChildOrderShare.getShareAmount();
this.shareAmountStr = shareAmount != null ? new BigDecimal(shareAmount).divide(new BigDecimal(100)).toPlainString() : this.shareAmountStr;
}
}

@Excel(name="分账状态",width = 20,replace = { "未知_0", "提交订单失败_1", "提交业务失败_2", "受理成功_3", "处理中_4", "处理完成_5", "处理失败_6"},orderNum = "8")
@Excel(name="分账状态",width = 16,replace = { "未知_0", "提交订单失败_1", "提交业务失败_2", "受理成功_3", "处理中_4", "处理完成_5", "处理失败_6"},orderNum = "8")
private Integer sharingStatus;
private Date updateTime;

@Excel(name="分账创建时间",exportFormat = "yyyy-MM-dd HH:mm:ss",width = 15,orderNum = "6")
private Date createTime;
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java Просмотреть файл

@@ -531,6 +531,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
sharingOrderUpd.setId(sharingOrder.getId());
sharingOrderUpd.updateTenantInfo(sharingOrder);
sharingOrderUpd.setSharingStatus(payShareQueryResult.getCode());
sharingOrderUpd.setErrorMsg("finish!");
sharingOrderUpd.setUpdateTime(new Date());
wxProfitSharingOrderMapper.updateById(sharingOrderUpd);



+ 5
- 1
mallinkService/src/main/java/com/iformall/service/order/entity/WxComposeChildOrderShare.java Просмотреть файл

@@ -44,6 +44,10 @@ public class WxComposeChildOrderShare {
// this.orderId = orderId;
// }

public WxComposeChildOrderShare(){

}

public WxComposeChildOrderShare(Long orderId,Integer realPayMent,Long merchantId,String merchantUid) {
this.orderId = orderId;
this.realPayMent = realPayMent;
@@ -54,7 +58,7 @@ public class WxComposeChildOrderShare {
private Long orderId;//订单编号,v3要用
private Integer realPayMent;//付款金额
private Integer shareAmount;//商户实际分账的钱
private Integer shareAmount;//实际分账的钱

private Integer rateAmount;//商场实际通道费(扣除了支付通道费的)



+ 1
- 0
mallinkService/src/main/resources/mapper/WxProfitSharingOrderMapper.xml Просмотреть файл

@@ -158,6 +158,7 @@
<resultMap id="orderMap" type="com.iformall.domain.vo.WxProfitSharingOrderVo">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="out_settle_no" jdbcType="BIGINT" property="outSettleNo" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />


Загрузка…
Отмена
Сохранить