fix: 清空购物车修复
This commit is contained in:
@@ -1335,6 +1335,7 @@ public class OrderService {
|
||||
LambdaQueryWrapper<TbCashierCart> queryWrapper = new LambdaQueryWrapper<TbCashierCart>()
|
||||
.eq(TbCashierCart::getShopId, cartVo.getShopId())
|
||||
.eq(TbCashierCart::getUseType, shopEatTypeInfoDTO.getUseType())
|
||||
.gt(TbCashierCart::getCreatedAt, DateUtil.offsetDay(DateUtil.date(), -1).getTime())
|
||||
.eq(TbCashierCart::getStatus, "create");
|
||||
|
||||
if (shopEatTypeInfoDTO.isDineInAfter()) {
|
||||
@@ -1344,7 +1345,6 @@ public class OrderService {
|
||||
// 普通点单
|
||||
if (StrUtil.isBlank(cartVo.getTableId())) {
|
||||
queryWrapper.eq(TbCashierCart::getMasterId, cartVo.getMasterId())
|
||||
.eq(TbCashierCart::getTradeDay, day)
|
||||
.and(query -> query.isNull(TbCashierCart::getTableId)
|
||||
.or()
|
||||
.eq(TbCashierCart::getTableId, ""));
|
||||
@@ -1404,7 +1404,9 @@ public class OrderService {
|
||||
// 打印退款票据
|
||||
int finalOrderId = orderId;
|
||||
ThreadUtil.execute(() -> {
|
||||
printMechineConsumer.printReturnTicket(finalOrderId, null);
|
||||
if (finalOrderId != 0) {
|
||||
printMechineConsumer.printReturnTicket(finalOrderId, null);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user