update 超时关闭订单退款处理

This commit is contained in:
2024-01-19 09:56:14 +08:00
parent 010cffee9c
commit e557a029d5

View File

@@ -2084,9 +2084,15 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
// return; // return;
// } // }
BigDecimal orderAmount = orderBasicInfo.getOrderAmount() == null ? BigDecimal.ZERO : orderBasicInfo.getOrderAmount();
if (orderAmount.compareTo(BigDecimal.ZERO) > 0) {
return;
}
// 如果超时关闭的订单,存在支付信息,都退款处理 // 如果超时关闭的订单,存在支付信息,都退款处理
List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode); List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
logger.info("校验未支付订单orderCode:{}, 支付信息:{}", orderCode, JSON.toJSONString(orderPayRecordList)); logger.info("校验未支付订单orderCode:{}, 支付信息:{}", orderCode, JSON.toJSONString(orderPayRecordList));
if (CollectionUtils.isNotEmpty(orderPayRecordList)) {
for (OrderPayRecord orderPayRecord : orderPayRecordList) { for (OrderPayRecord orderPayRecord : orderPayRecordList) {
List<PaymentInfo> paymentInfos = orderPayRecordService.parseDeductionRecord(orderPayRecord.getDeductionRecord()); List<PaymentInfo> paymentInfos = orderPayRecordService.parseDeductionRecord(orderPayRecord.getDeductionRecord());
for (PaymentInfo paymentInfo : paymentInfos) { for (PaymentInfo paymentInfo : paymentInfos) {
@@ -2101,6 +2107,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
} }
} }
} }
}
// 退款 // 退款
// for (AdaPayment adaPayment : adaPayments) { // for (AdaPayment adaPayment : adaPayments) {