订单免费时新增支付时间

This commit is contained in:
yanglei 2025-11-21 15:08:36 +08:00
parent a7c15a81f9
commit 8248a31cf9

View File

@ -227,6 +227,7 @@ public class EbikeOrderImpl extends ServiceImpl<EbikeOrderMapper, EbikeOrder> im
BigDecimal totalAmount = costCalculation(order.getStartTime(), order.getEndTime(), bikeInfo, data);
// 费用为0不生成支付订单直接订单已支付返回订单id
if (totalAmount.compareTo(BigDecimal.ZERO) == 0) {
order.setPaymentTime(LocalDateTime.now());
order.setTotalAmount(BigDecimal.ZERO);
order.setActualAmount(BigDecimal.ZERO);
order.setOrderStatus(OrderStatus.PAID);