1.代客下单 台桌最新订单号查询问题fix

This commit is contained in:
SongZhang 2024-08-26 13:36:42 +08:00
parent 02be5222b5
commit 3794cd5540
2 changed files with 2 additions and 1 deletions

View File

@ -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());

View File

@ -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'
<if test="areaId != null and areaId !=''">
and a.area_id = #{areaId}
</if>