diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java index e911861..f4555f0 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java @@ -604,6 +604,7 @@ public class OrderService { orderInfo.setUserId(orderVo.getUserId()); if (StrUtil.isNotBlank(orderVo.getTableId())) { orderInfo.setTableId(orderVo.getTableId()); + orderInfo.setUseType("postPay"); } if (Objects.nonNull(tbToken)){ orderInfo.setTokenId(tbToken.getId()); diff --git a/src/main/resources/mapper/TbShopTableMapper.xml b/src/main/resources/mapper/TbShopTableMapper.xml index 4134f17..358a0ca 100644 --- a/src/main/resources/mapper/TbShopTableMapper.xml +++ b/src/main/resources/mapper/TbShopTableMapper.xml @@ -232,7 +232,7 @@ select a.*, b.user_id, c.master_id, c.id as orderId, c.order_no as orderNo, c.amount as orderAmount from tb_shop_table a left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid') and b.user_id is not null and b.shop_id=#{shopId} left join tb_order_info c on a.qrcode=c.table_id and (c.`status`='unpaid') and c.master_id is not null and c.shop_id=#{shopId} - where a.shop_id=#{shopId} and b.trade_day=#{day} + where a.shop_id=#{shopId} and b.trade_day=#{day} and c.trade_day=#{day} and b.use_type='postPay' and c.use_type='postPay' and a.area_id = #{areaId}