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

This commit is contained in:
SongZhang 2024-08-26 13:38:26 +08:00
parent 3794cd5540
commit 1cff6fffcc
1 changed files with 3 additions and 3 deletions

View File

@ -230,9 +230,9 @@
</select>
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
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} and c.trade_day=#{day} and b.use_type='postPay' and c.use_type='postPay'
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} and b.trade_day=#{day} and b.use_type='postPay'
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} and c.trade_day=#{day} and c.use_type='postPay'
where a.shop_id=#{shopId}
<if test="areaId != null and areaId !=''">
and a.area_id = #{areaId}
</if>