mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 04:25:21 +08:00
update
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.service;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@@ -980,6 +981,7 @@ public class OrderService {
|
||||
JSONObject jsonObject = JSON.parseObject(data);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
AdapayCallbackRecord adapayCallbackRecord = mapper.readValue(jsonObject.toJSONString(), AdapayCallbackRecord.class);
|
||||
|
||||
// 支付扩展域
|
||||
|
||||
@@ -511,7 +511,11 @@ public class TempService {
|
||||
List<String> paymentIdList = Lists.newArrayList();
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
|
||||
AdapayMemberAccount aDefault = adapayMemberAccountService.getDefault();
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
|
||||
for (AdaPayment adaPayment : adaPayments) {
|
||||
String paymentId = adaPayment.getId();
|
||||
String pay_mode = adaPayment.getPay_mode();
|
||||
if (StringUtils.isBlank(pay_mode)) {
|
||||
// 实时分账的不检查
|
||||
@@ -524,6 +528,10 @@ public class TempService {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StringUtils.equals(paymentId, "002212023102509474610563069333816762368")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 交易金额
|
||||
BigDecimal payAmt = new BigDecimal(adaPayment.getPay_amt());
|
||||
|
||||
@@ -536,10 +544,12 @@ public class TempService {
|
||||
BigDecimal subtract = payAmt.subtract(reservedAmt).subtract(confirmedAmt);
|
||||
|
||||
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
||||
paymentIdList.add(adaPayment.getId());
|
||||
paymentIdList.add(paymentId);
|
||||
total = total.add(subtract);
|
||||
logger.info("支付单:{}, 支付金额:{}, 总撤销金额:{}, 总确认金额:{}, 剩余金额:{}",
|
||||
adaPayment.getId(), payAmt, reservedAmt, confirmedAmt, subtract);
|
||||
paymentId, payAmt, reservedAmt, confirmedAmt, subtract);
|
||||
|
||||
// adapayService.createPaymentConfirmRequest(paymentId, aDefault, subtract, null, wechatAppId);
|
||||
}
|
||||
}
|
||||
logger.info("{} - {} 期间,共有{}笔支付单存在剩余金额, 共计:{},list:{}", dto.getStartTime(), dto.getEndTime(), paymentIdList.size(), total, JSON.toJSONString(paymentIdList));
|
||||
|
||||
Reference in New Issue
Block a user