店铺管理-店铺配置:打印机设置相关接口
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.rabbit;
|
||||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -102,17 +100,13 @@ public class PrintConsumer {
|
||||
Boolean isReturn = jsonObject.getBoolean("isReturn");
|
||||
|
||||
TbOrderInfo orderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId);
|
||||
log.error("orderInfo-before: {}", JSON.toJSONString(orderInfo));
|
||||
ThreadUtil.safeSleep(1000*3);
|
||||
TbOrderInfo newOrderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId);
|
||||
log.error("orderInfo-after: {}", JSON.toJSONString(newOrderInfo));
|
||||
Utils.checkValueUnReturn(orderInfo, "订单信息不存在");
|
||||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
|
||||
Utils.checkValueUnReturn(shopInfo, "店铺信息不存在");
|
||||
|
||||
getPrintMachine(shopInfo.getId(), "cash", "normal", null).forEach(machine -> {
|
||||
List<TbOrderDetail> tbOrderDetails = tbOrderDetailMapper.selectAllByOrderId(newOrderInfo.getId());
|
||||
printerHandler.handleRequest(machine, isReturn, newOrderInfo, tbOrderDetails, null);
|
||||
List<TbOrderDetail> tbOrderDetails = tbOrderDetailMapper.selectAllByOrderId(orderInfo.getId());
|
||||
printerHandler.handleRequest(machine, isReturn, orderInfo, tbOrderDetails, null);
|
||||
// printPlaceTicket(isReturn, machine, orderInfo, shopInfo);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user