1.创建订单同步保存用户id
2.代客下单订单不重复出票 3.订单支付完毕清楚当前台桌缓存订单号
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.chaozhanggui.system.cashierservice.rabbit;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
@@ -18,6 +20,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -74,6 +77,9 @@ public class PrintMechineConsumer {
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("打印机列表,{}", ArrayUtil.toString(list));
|
||||
log.info("待打印订单信息, {}", orderInfo);
|
||||
|
||||
list.parallelStream().forEach(tbPrintMachineWithBLOBs->{
|
||||
if (!"network".equals(tbPrintMachineWithBLOBs.getConnectionType())) {
|
||||
log.error("非网络打印机:{},{}",tbPrintMachineWithBLOBs.getAddress(),tbPrintMachineWithBLOBs.getConnectionType());
|
||||
@@ -184,6 +190,10 @@ public class PrintMechineConsumer {
|
||||
cashierCarts = tbCashierCartMapper.selectByOrderId(orderId,"final");
|
||||
if (ObjectUtil.isNotEmpty(cashierCarts) && cashierCarts.size() > 0) {
|
||||
|
||||
// 取餐号不为空为代客下单
|
||||
if ("postPay".equals(orderInfo.getUseType())) {
|
||||
return;
|
||||
}
|
||||
cashierCarts.parallelStream().forEach(it -> {
|
||||
|
||||
String categoryId;
|
||||
|
||||
Reference in New Issue
Block a user