触发打印位置
This commit is contained in:
@@ -56,8 +56,8 @@ public class RabbitPublisher {
|
|||||||
* @param orderId 订单id
|
* @param orderId 订单id
|
||||||
* @param printOrder 是否打印结算单
|
* @param printOrder 是否打印结算单
|
||||||
*/
|
*/
|
||||||
public void sendOrderPrintMsg(String orderId, boolean printOrder) {
|
public void sendOrderPrintMsg(String orderId, boolean printOrder, String source) {
|
||||||
log.info("开始发送打印mq消息, orderId: {}, printOrder: {}", orderId, printOrder);
|
log.info("开始发送打印mq消息, orderId: {}, printOrder: {}, source: {}", orderId, printOrder, source);
|
||||||
//厨房票
|
//厨房票
|
||||||
sendMsg(RabbitConstants.Queue.ORDER_MACHINE_PRINT_QUEUE, new JSONObject().fluentPut("orderId", orderId).fluentPut("printOrder", printOrder).toString());
|
sendMsg(RabbitConstants.Queue.ORDER_MACHINE_PRINT_QUEUE, new JSONObject().fluentPut("orderId", orderId).fluentPut("printOrder", printOrder).toString());
|
||||||
//前台票
|
//前台票
|
||||||
@@ -108,8 +108,9 @@ public class RabbitPublisher {
|
|||||||
* 1,2,sendMarkSms 发送营销短信 shop_id,sms_push_event.id,sendMarkSms
|
* 1,2,sendMarkSms 发送营销短信 shop_id,sms_push_event.id,sendMarkSms
|
||||||
* 1,2,sendWechatTemp 发送微信模版消息 shop_id,ac_push_event.id,sendWechatTemp
|
* 1,2,sendWechatTemp 发送微信模版消息 shop_id,ac_push_event.id,sendWechatTemp
|
||||||
* 1,2,groupBuyYes 发送微信模版消息 shop_id,gb_order.id,groupBuyYes
|
* 1,2,groupBuyYes 发送微信模版消息 shop_id,gb_order.id,groupBuyYes
|
||||||
|
*
|
||||||
* @param param 店铺Id,主键Id
|
* @param param 店铺Id,主键Id
|
||||||
* @param type applySmsTemp,sendMarkSms,sendWechatTemp,groupBuyYes
|
* @param type applySmsTemp,sendMarkSms,sendWechatTemp,groupBuyYes
|
||||||
*/
|
*/
|
||||||
public void sendApplySmsMsg(String param, String type) {
|
public void sendApplySmsMsg(String param, String type) {
|
||||||
sendMsg(RabbitConstants.Queue.APPLY_SMS_TEMPLATE_QUEUE, param + "," + type);
|
sendMsg(RabbitConstants.Queue.APPLY_SMS_TEMPLATE_QUEUE, param + "," + type);
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
|||||||
//发送打票信息 后付费推送多次 需要处理
|
//发送打票信息 后付费推送多次 需要处理
|
||||||
//orderId_0_0 订单ID_先付后付(1先付0后付)_订单状态 0未完成 1完成
|
//orderId_0_0 订单ID_先付后付(1先付0后付)_订单状态 0未完成 1完成
|
||||||
//orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_0"
|
//orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_0"
|
||||||
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId() + "_0_0", false);
|
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId() + "_0_0", false, "后付费打印");
|
||||||
} else {
|
} else {
|
||||||
redisService.set(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId(), "", 60 * 15);
|
redisService.set(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId(), "", 60 * 15);
|
||||||
}
|
}
|
||||||
@@ -1225,14 +1225,14 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
|||||||
}
|
}
|
||||||
// 事务成功提交后执行消息发送
|
// 事务成功提交后执行消息发送
|
||||||
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
|
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
|
||||||
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint);
|
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint, "事务环境打印");
|
||||||
// log.info("订单{}事务提交后,发送打印消息", orderId);
|
// log.info("订单{}事务提交后,发送打印消息", orderId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 非事务环境下直接发送(兼容无事务场景)
|
// 非事务环境下直接发送(兼容无事务场景)
|
||||||
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
|
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
|
||||||
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint);
|
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint, "非事务环境打印");
|
||||||
// log.info("非事务环境下,直接发送订单{}打印消息", orderId);
|
// log.info("非事务环境下,直接发送订单{}打印消息", orderId);
|
||||||
}
|
}
|
||||||
rabbitPublisher.sendOrderDetailStatusMsg(orderInfo.getShopId().toString(), "bc");
|
rabbitPublisher.sendOrderDetailStatusMsg(orderInfo.getShopId().toString(), "bc");
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ public class OrderPayServiceImpl implements OrderPayService {
|
|||||||
//发送打票信息
|
//发送打票信息
|
||||||
//orderId_0_0 订单ID_先付后付(1先付0后付)_订单状态 0未完成 1完成
|
//orderId_0_0 订单ID_先付后付(1先付0后付)_订单状态 0未完成 1完成
|
||||||
//orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_0"
|
//orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_0"
|
||||||
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_1", orderInfo.getIsPrint() == 1);
|
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_1",
|
||||||
|
orderInfo.getIsPrint() == 1, "0元付款");
|
||||||
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
|
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
|
||||||
throw new PaySuccessException("支付成功");
|
throw new PaySuccessException("支付成功");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user