0元付款 打印推送
This commit is contained in:
@@ -816,8 +816,11 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||||||
} else {
|
} else {
|
||||||
orderInfo.setDiscountRatio(BigDecimal.ZERO);
|
orderInfo.setDiscountRatio(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
|
//0元按照现金支付处理
|
||||||
if (orderInfo.getOrderAmount().compareTo(BigDecimal.ZERO) == 0) {
|
if (orderInfo.getOrderAmount().compareTo(BigDecimal.ZERO) == 0) {
|
||||||
orderInfo.setStatus(OrderStatusEnums.DONE.getCode());
|
orderInfo.setStatus(OrderStatusEnums.DONE.getCode());
|
||||||
|
orderInfo.setPayType(PayEnums.CASH_PAY.getValue());
|
||||||
|
orderInfo.setPaidTime(LocalDateTime.now());
|
||||||
}
|
}
|
||||||
saveOrUpdate(orderInfo);
|
saveOrUpdate(orderInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ public class PayServiceImpl implements PayService {
|
|||||||
private OrderInfo checkPay(CheckOrderPay checkOrderPay) {
|
private OrderInfo checkPay(CheckOrderPay checkOrderPay) {
|
||||||
OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay);
|
OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay);
|
||||||
if (orderInfo.getOrderAmount().compareTo(BigDecimal.ZERO) == 0) {
|
if (orderInfo.getOrderAmount().compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
//发送打票信息
|
||||||
|
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString());
|
||||||
throw new PaySuccessException();
|
throw new PaySuccessException();
|
||||||
}
|
}
|
||||||
return orderInfo;
|
return orderInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user