0元付款 打印推送

This commit is contained in:
wangw 2025-03-14 11:07:53 +08:00
parent 6c2a92b1cb
commit c566cc2dd2
2 changed files with 5 additions and 0 deletions

View File

@ -816,8 +816,11 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
} else {
orderInfo.setDiscountRatio(BigDecimal.ZERO);
}
//0元按照现金支付处理
if (orderInfo.getOrderAmount().compareTo(BigDecimal.ZERO) == 0) {
orderInfo.setStatus(OrderStatusEnums.DONE.getCode());
orderInfo.setPayType(PayEnums.CASH_PAY.getValue());
orderInfo.setPaidTime(LocalDateTime.now());
}
saveOrUpdate(orderInfo);
}

View File

@ -104,6 +104,8 @@ public class PayServiceImpl implements PayService {
private OrderInfo checkPay(CheckOrderPay checkOrderPay) {
OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay);
if (orderInfo.getOrderAmount().compareTo(BigDecimal.ZERO) == 0) {
//发送打票信息
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString());
throw new PaySuccessException();
}
return orderInfo;