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

This commit is contained in:
2024-08-26 11:28:00 +08:00
parent abdefe6932
commit 8f4e56f889

View File

@@ -230,8 +230,8 @@
</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' or b.`status`='paying') and b.user_id is not null
left join tb_order_info c on a.qrcode=c.table_id and (c.`status`='unpaid' or c.`status`='paying') and c.master_id is not null
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid' or b.`status`='paying') 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' or c.`status`='paying') and c.master_id is not null and c.shop_id=#{shopId}
where a.shop_id=#{shopId}
<if test="areaId != null and areaId !=''">
and a.area_id = #{areaId}