Browse Source

//..settle

release_toaliyun_real
xhxu 2 years ago
parent
commit
f3b1966b36
4 changed files with 79 additions and 8 deletions
  1. +76
    -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. +1
    -1
      mallinkService/src/main/java/com/iformall/service/order/entity/WxComposeChildOrderShare.java
  4. +1
    -0
      mallinkService/src/main/resources/mapper/WxProfitSharingOrderMapper.xml

+ 76
- 7
mallinkService/src/main/java/com/iformall/domain/vo/WxProfitSharingOrderVo.java View File

@@ -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,67 @@ 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;

//获取各种扣点费用
public WxComposeChildOrderShare getComposeChildOrderShare(){
if(StringUtils.isNotBlank(pointDeduction)){
try {
WxComposeChildOrderShare wxComposeChildOrderShare = JSON.parseObject(pointDeduction, WxComposeChildOrderShare.class);
return wxComposeChildOrderShare;
}catch(Exception e){}
}
return null;
}
@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 getShareAmountStr(){
WxComposeChildOrderShare composeChildOrderShare = getComposeChildOrderShare();
if(composeChildOrderShare != null){
Integer realRateAmount = composeChildOrderShare.getRealRateAmount();
this.realRateAmountStr = realRateAmount != null ? new BigDecimal(realRateAmount).divide(new BigDecimal(100)).toPlainString() : realRateAmountStr;
Integer commissionAmount = composeChildOrderShare.getCommissionAmount();
this.commissionAmountStr = commissionAmount != null ? new BigDecimal(commissionAmount).divide(new BigDecimal(100)).toPlainString() : commissionAmountStr;
Integer cpsCommission = composeChildOrderShare.getCpsCommission();
this.cpsCommissionStr = cpsCommission != null ? new BigDecimal(cpsCommission).divide(new BigDecimal(100)).toPlainString() : cpsCommissionStr;
Integer systemAmount = composeChildOrderShare.getSystemAmount();
this.systemAmountStr = systemAmount != null ? new BigDecimal(systemAmount).divide(new BigDecimal(100)).toPlainString() : systemAmountStr;
Integer sellerAmount = composeChildOrderShare.getSellerAmount();
this.sellerAmountStr = sellerAmount != null ? new BigDecimal(sellerAmount).divide(new BigDecimal(100)).toPlainString() : sellerAmountStr;
Integer rateAmount = composeChildOrderShare.getRateAmount();
this.rateAmountStr = rateAmount != null ? new BigDecimal(rateAmount).divide(new BigDecimal(100)).toPlainString() : rateAmountStr;
Integer serviceAmount = composeChildOrderShare.getServiceAmount();
this.serviceAmountStr = serviceAmount != null ? new BigDecimal(serviceAmount).divide(new BigDecimal(100)).toPlainString() : serviceAmountStr;
Integer shareAmount = composeChildOrderShare.getShareAmount();
this.shareAmountStr = shareAmount != null ? new BigDecimal(shareAmount).divide(new BigDecimal(100)).toPlainString() : 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 View File

@@ -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);



+ 1
- 1
mallinkService/src/main/java/com/iformall/service/order/entity/WxComposeChildOrderShare.java View File

@@ -54,7 +54,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 View File

@@ -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" />


Loading…
Cancel
Save