处理OrderSplitRecord中值为0的数据

This commit is contained in:
Guoqs
2025-10-10 16:03:46 +08:00
parent 483e4fd40d
commit e7c780822c
7 changed files with 262 additions and 10 deletions

View File

@@ -1396,5 +1396,33 @@ public class TempService {
});
}
/**
* 处理OrderSplitRecord中值为0的数据
* @throws BaseAdaPayException
*/
public void handleOrderSplitRecord(String orderCode) {
// 根据订单号查询订单信息
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
// 组装after参数
AfterSettleOrderDTO afterSettleOrderDTO = AfterSettleOrderDTO.builder()
.orderCode(orderBasicInfo.getOrderCode())
.merchantId(orderBasicInfo.getMerchantId())
.stationId(orderBasicInfo.getStationId())
.orderPayAmount(orderBasicInfo.getPayAmount()) // 支付金额
.orderConsumeAmount(orderBasicInfo.getOrderAmount()) // 消费金额
.orderSettleAmount(orderBasicInfo.getSettleAmount()) // 结算金额
.orderElectricityAmount(orderDetail.getTotalElectricityAmount()) // 电费金额
.orderElectricityDiscountAmount(orderDetail.getDiscountElectricityAmount()) // 电费折扣金额
.orderServiceAmount(orderDetail.getTotalServiceAmount()) // 服务费金额
.orderServiceDiscountAmount(orderDetail.getDiscountServiceAmount()) // 服务费折扣金额
.orderRefundAmount(orderBasicInfo.getRefundAmount()) // 退款金额
.orderBasicInfo(orderBasicInfo)
.build();
orderBasicInfoService.splittingMethodTemp(afterSettleOrderDTO);
}
}