mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-05 18:40:14 +08:00
bugfix 保险分账逻辑
This commit is contained in:
@@ -539,10 +539,10 @@ public class PaymentTestController {
|
||||
*/
|
||||
@Test
|
||||
public void createPaymentReverseRequestTest() {
|
||||
String paymentId = "002212025091616304410813943148522684416";
|
||||
BigDecimal refundAmount = new BigDecimal("0.5");
|
||||
String paymentId = "002212025091909381410814926502197886976";
|
||||
BigDecimal refundAmount = new BigDecimal("0.02");
|
||||
String memberId = "65622699";
|
||||
String orderCode = "C65858163754";
|
||||
String orderCode = "C63345490920";
|
||||
|
||||
// 延迟分账未确认调撤销调撤销接口退款
|
||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||
|
||||
@@ -2063,6 +2063,9 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
// 订单信息
|
||||
OrderBasicInfo orderBasicInfo = afterSettleOrderDTO.getOrderBasicInfo();
|
||||
|
||||
// 保险金额(有默认值 0.00)
|
||||
BigDecimal insuranceAmount = orderBasicInfo.getInsuranceAmount();
|
||||
|
||||
// 订单是否需要分账, 结算金额必须大于0
|
||||
if (orderSettleAmount == null || orderSettleAmount.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
logger.info("realTimeOrderSplit-订单[{}]结算金额[{}]必须大于0", afterSettleOrderDTO.getOrderCode(), orderSettleAmount);
|
||||
@@ -2104,7 +2107,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
PaymentConfirmParam param = PaymentConfirmParam.builder()
|
||||
.paymentId(paymentId)
|
||||
.divMemberList(divMemberList)
|
||||
.confirmAmt(orderSettleAmount)
|
||||
.confirmAmt(orderSettleAmount.add(insuranceAmount)) // 订单结算金额 + 保险金额
|
||||
.orderCode(orderCode)
|
||||
.wechatAppId(appId)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user