查询台桌携带订单信息

This commit is contained in:
2024-08-22 10:57:19 +08:00
parent 1e66c99606
commit 8b657fdc8a
2 changed files with 3 additions and 1 deletions

View File

@@ -9,4 +9,6 @@ import lombok.EqualsAndHashCode;
public class TbShopTableVO extends TbShopTable {
private Integer userId;
private String masterId;
private Integer orderId;
private String orderNo;
}

View File

@@ -229,7 +229,7 @@
</select>
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
select a.*, b.user_id, c.master_id from tb_shop_table a
select a.*, b.user_id, c.master_id, c.id as orderId, c.order_no as orderNo 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
where a.shop_id=#{shopId}