This commit is contained in:
wangw 2025-03-18 14:11:02 +08:00
parent 2473a4da25
commit 925d62ab09
4 changed files with 16 additions and 3 deletions

View File

@ -88,6 +88,10 @@ public class CheckOrderPay implements Serializable {
* 使用的积分数量 (扣除各类折扣 enable_deduction后使用) * 使用的积分数量 (扣除各类折扣 enable_deduction后使用)
*/ */
private Integer pointsNum; private Integer pointsNum;
/**
* 是否打票
*/
private Integer isPrint;
private String remark; private String remark;
@ -96,6 +100,10 @@ public class CheckOrderPay implements Serializable {
return seatNum == null ? 0 : seatNum; return seatNum == null ? 0 : seatNum;
} }
public Integer getIsPrint() {
return isPrint == null ? 1 : isPrint;
}
public Integer getPointsNum() { public Integer getPointsNum() {
return pointsNum == null ? 0 : pointsNum; return pointsNum == null ? 0 : pointsNum;
} }

View File

@ -245,6 +245,10 @@ public class OrderInfo implements Serializable {
* 是否使用了霸王餐 * 是否使用了霸王餐
*/ */
private Integer isFreeDine; private Integer isFreeDine;
/**
* 是否打票
*/
private Integer isPrint;
/** /**
* 是否等叫 0 1 等叫 * 是否等叫 0 1 等叫

View File

@ -724,7 +724,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
orderDetailService.updateChain().set(OrderDetail::getStatus, OrderStatusEnums.DONE.getCode()).eq(OrderDetail::getOrderId, orderInfo.getId()).update(); orderDetailService.updateChain().set(OrderDetail::getStatus, OrderStatusEnums.DONE.getCode()).eq(OrderDetail::getOrderId, orderInfo.getId()).update();
// if (!"after-pay".equals(orderInfo.getPayMode())) { // if (!"after-pay".equals(orderInfo.getPayMode())) {
//发送打票信息 //发送打票信息
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString(), true); rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString(), orderInfo.getIsPrint() == 1);
// } // }
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId()); redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
} }
@ -829,6 +829,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
*/ */
private void upOrderPayInfo(OrderInfo orderInfo, CheckOrderPay param) { private void upOrderPayInfo(OrderInfo orderInfo, CheckOrderPay param) {
orderInfo.setPointsNum(param.getPointsNum()); orderInfo.setPointsNum(param.getPointsNum());
orderInfo.setIsPrint(param.getIsPrint());
orderInfo.setRoundAmount(param.getRoundAmount()); orderInfo.setRoundAmount(param.getRoundAmount());
orderInfo.setOrderAmount(param.getOrderAmount()); orderInfo.setOrderAmount(param.getOrderAmount());
orderInfo.setPointsDiscountAmount(param.getPointsDiscountAmount()); orderInfo.setPointsDiscountAmount(param.getPointsDiscountAmount());

View File

@ -128,7 +128,7 @@ public class PayServiceImpl implements PayService {
} }
orderDetailService.updateChain().set(OrderDetail::getStatus, OrderStatusEnums.DONE.getCode()).eq(OrderDetail::getOrderId, orderInfo.getId()).update(); orderDetailService.updateChain().set(OrderDetail::getStatus, OrderStatusEnums.DONE.getCode()).eq(OrderDetail::getOrderId, orderInfo.getId()).update();
//发送打票信息 //发送打票信息
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString(), true); rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString(), orderInfo.getIsPrint() == 1);
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId()); redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
throw new PaySuccessException(); throw new PaySuccessException();
} }