1.打票逻辑修改
This commit is contained in:
@@ -276,10 +276,11 @@ public class PrintMechineConsumer {
|
||||
}
|
||||
|
||||
private void printTicket(Integer orderId, List<CategoryInfo> categoryInfos, TbPrintMachineWithBLOBs tbPrintMachineWithBLOBs, TbOrderInfo orderInfo) {
|
||||
List<TbOrderDetail> tbOrderDetails = tbOrderDetailMapper.selectAllByOrderId(orderId);
|
||||
if (!tbOrderDetails.isEmpty()) {
|
||||
String printKey = RedisCst.ORDER_PRINT_PRO + orderId;
|
||||
AtomicReference<Set<Object>> printProductSet = new AtomicReference<>(redisTemplate.opsForSet().members(printKey));
|
||||
List<TbOrderDetail> tbOrderDetails = tbOrderDetailMapper.selectAllByOrderId(orderId);
|
||||
if (!tbOrderDetails.isEmpty()) {
|
||||
|
||||
// 重置打印数据
|
||||
redisTemplate.delete(printKey);
|
||||
tbOrderDetails.forEach(it -> {
|
||||
@@ -355,6 +356,7 @@ public class PrintMechineConsumer {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 已删除的商品打印退款信息
|
||||
if (printProductSet.get() != null) {
|
||||
@@ -372,8 +374,6 @@ public class PrintMechineConsumer {
|
||||
redisUtils.deleteByKey(key);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user