交易分账 重构

This commit is contained in:
2023-08-28 19:13:43 +08:00
parent d373d52224
commit 6c973bff6f

View File

@@ -1044,10 +1044,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
private void onlinePaymentOrderRefund(OrderBasicInfo orderBasicInfo) {
// 订单编号
String orderCode = orderBasicInfo.getOrderCode();
// 订单消费金额
BigDecimal orderAmount = orderBasicInfo.getOrderAmount();
// 查支付记录
List<OrderPayRecord> payRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
// 需要退款的金额
BigDecimal refundAmount = orderBasicInfo.getRefundAmount();
@@ -1071,16 +1068,18 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
this.refundOrderWithAdapay(applyRefundDTO);
}
// 查支付记录
// List<OrderPayRecord> payRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
// 更新订单支付记录
List<OrderPayRecord> updatePayRecordList = Lists.newArrayList();
OrderPayRecord orderPayRecord = payRecordList.get(0);
orderPayRecord.setRefundAmount(refundAmount);
updatePayRecordList.add(orderPayRecord);
// 更新order_pay_record
if (CollectionUtils.isNotEmpty(updatePayRecordList)) {
orderPayRecordService.updateBatch(updatePayRecordList);
}
// List<OrderPayRecord> updatePayRecordList = Lists.newArrayList();
// OrderPayRecord orderPayRecord = payRecordList.get(0);
// orderPayRecord.setRefundAmount(refundAmount);
// updatePayRecordList.add(orderPayRecord);
//
// // 更新order_pay_record
// if (CollectionUtils.isNotEmpty(updatePayRecordList)) {
// orderPayRecordService.updateBatch(updatePayRecordList);
// }
}
/**