## Feat - 后台列表增加分账金额
This commit is contained in:
parent
99e89496c2
commit
71bf9300e4
|
@ -122,6 +122,18 @@ public class TOnlinePayment extends BaseEntity {
|
||||||
@TableField("PAY_SOURCE")
|
@TableField("PAY_SOURCE")
|
||||||
private Integer paySource;
|
private Integer paySource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主账户金额
|
||||||
|
*/
|
||||||
|
@TableField("MAIN_ACCOUNT_MONEY")
|
||||||
|
private BigDecimal mainAccountMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子账户金额
|
||||||
|
*/
|
||||||
|
@TableField("SUB_ACCOUNT_MONEY")
|
||||||
|
private BigDecimal subAccountMoney;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付-前端回调页面的扩展参数
|
* 支付-前端回调页面的扩展参数
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -271,9 +271,11 @@ public class JdPayServiceImpl implements IJdPayService {
|
||||||
if(i == separateAccounts.size() - 1){
|
if(i == separateAccounts.size() - 1){
|
||||||
subTradeAmount = remaining;
|
subTradeAmount = remaining;
|
||||||
log.info("分账 最后一个账户( 总 - 已分账 ) : {}, {}", subTradeAmount, remaining);
|
log.info("分账 最后一个账户( 总 - 已分账 ) : {}, {}", subTradeAmount, remaining);
|
||||||
|
onlinePayment.setSubAccountMoney(subTradeAmount);
|
||||||
}else{
|
}else{
|
||||||
subTradeAmount = tradeAmount.subtract(tradeAmount.multiply(separateAccount.getProportion().setScale(2, BigDecimal.ROUND_DOWN)).setScale(2, BigDecimal.ROUND_DOWN));
|
subTradeAmount = tradeAmount.subtract(tradeAmount.multiply(separateAccount.getProportion().setScale(2, BigDecimal.ROUND_DOWN)).setScale(2, BigDecimal.ROUND_DOWN));
|
||||||
remaining = remaining.subtract(subTradeAmount).setScale(2, BigDecimal.ROUND_DOWN);
|
remaining = remaining.subtract(subTradeAmount).setScale(2, BigDecimal.ROUND_DOWN);
|
||||||
|
onlinePayment.setMainAccountMoney(subTradeAmount);
|
||||||
log.info("分账 过程 : {}, {}, {}", subTradeAmount, remaining, separateAccount.getProportion().setScale(2, BigDecimal.ROUND_DOWN));
|
log.info("分账 过程 : {}, {}, {}", subTradeAmount, remaining, separateAccount.getProportion().setScale(2, BigDecimal.ROUND_DOWN));
|
||||||
}
|
}
|
||||||
JdPayDivisionAccountTradeInfo divisionAccountTradeInfo = new JdPayDivisionAccountTradeInfo();
|
JdPayDivisionAccountTradeInfo divisionAccountTradeInfo = new JdPayDivisionAccountTradeInfo();
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package com.hzs.third.pay.vo;
|
package com.hzs.third.pay.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||||
import com.hzs.common.core.annotation.Excel;
|
import com.hzs.common.core.annotation.Excel;
|
||||||
import com.hzs.common.core.annotation.Transaction;
|
import com.hzs.common.core.annotation.Transaction;
|
||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
|
@ -128,4 +130,20 @@ public class OnlinePaymentVO {
|
||||||
*/
|
*/
|
||||||
private Integer pkCountry;
|
private Integer pkCountry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主账户金额
|
||||||
|
*/
|
||||||
|
@TableField("MAIN_ACCOUNT_MONEY")
|
||||||
|
@Excel(name = "主账户金额")
|
||||||
|
@BigDecimalFormat
|
||||||
|
private BigDecimal mainAccountMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子账户金额
|
||||||
|
*/
|
||||||
|
@TableField("SUB_ACCOUNT_MONEY")
|
||||||
|
@Excel(name = "子账户金额")
|
||||||
|
@BigDecimalFormat
|
||||||
|
private BigDecimal subAccountMoney;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE "T_ONLINE_PAYMENT"
|
||||||
|
ADD ("MAIN_ACCOUNT_MONEY" NUMBER(16,2))
|
||||||
|
ADD ("SUB_ACCOUNT_MONEY" NUMBER(16,2));
|
||||||
|
|
||||||
|
COMMENT ON COLUMN "CLOUD_2"."T_ONLINE_PAYMENT"."MAIN_ACCOUNT_MONEY" IS '分账-主账户金额';
|
||||||
|
|
||||||
|
COMMENT ON COLUMN "CLOUD_2"."T_ONLINE_PAYMENT"."SUB_ACCOUNT_MONEY" IS '分账-子账户金额'
|
Loading…
Reference in New Issue