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

This commit is contained in:
2024-08-26 13:33:25 +08:00
parent 8f4e56f889
commit 02be5222b5
4 changed files with 12 additions and 6 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' 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}
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}
<if test="areaId != null and areaId !=''">
and a.area_id = #{areaId}
</if>
@@ -241,7 +241,7 @@
<if test="status != null and status !=''">
and a.status = #{status}
</if>
GROUP BY a.id
GROUP BY a.qrcode
order by a.`sort` asc
</select>
</mapper>