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后使用)
*/
private Integer pointsNum;
/**
* 是否打票
*/
private Integer isPrint;
private String remark;
@ -96,6 +100,10 @@ public class CheckOrderPay implements Serializable {
return seatNum == null ? 0 : seatNum;
}
public Integer getIsPrint() {
return isPrint == null ? 1 : isPrint;
}
public Integer getPointsNum() {
return pointsNum == null ? 0 : pointsNum;
}

View File

@ -245,6 +245,10 @@ public class OrderInfo implements Serializable {
* 是否使用了霸王餐
*/
private Integer isFreeDine;
/**
* 是否打票
*/
private Integer isPrint;
/**
* 是否等叫 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();
// 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());
}
@ -829,6 +829,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
*/
private void upOrderPayInfo(OrderInfo orderInfo, CheckOrderPay param) {
orderInfo.setPointsNum(param.getPointsNum());
orderInfo.setIsPrint(param.getIsPrint());
orderInfo.setRoundAmount(param.getRoundAmount());
orderInfo.setOrderAmount(param.getOrderAmount());
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();
//发送打票信息
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString(), true);
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId().toString(), orderInfo.getIsPrint() == 1);
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
throw new PaySuccessException();
}
@ -192,7 +192,7 @@ public class PayServiceImpl implements PayService {
public CzgResult<Object> vipPayOrder(OrderPayParamDTO payParam) {
ShopInfo shopInfo = shopInfoService.getById(payParam.getShopId());
AssertUtil.isNull(shopInfo, "店铺不存在");
if(!shopInfo.getIsAccountPay().equals(1)){
if (!shopInfo.getIsAccountPay().equals(1)) {
return CzgResult.failure("支付失败,店铺暂未开启会员余额支付。");
}
ShopUser shopUser = new ShopUser();