台桌 用餐人数

This commit is contained in:
2025-11-28 14:03:25 +08:00
parent 0b0e3ebba3
commit 44159715ac
3 changed files with 6 additions and 3 deletions

View File

@@ -23,7 +23,7 @@
detail.food_serve_time AS foodServeTime
FROM `tb_order_detail` detail
INNER JOIN `tb_order_info` `order` ON detail.order_id = `order`.id AND `order`.`status` = 'unpaid'
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id and staff.shop_id = #{shopId}
LEFT JOIN `tb_shop_table` `table` ON `order`.table_code = `table`.table_code
LEFT JOIN `tb_shop_table_area` `area` ON `table`.area_id = `area`.id
WHERE detail.shop_id = #{shopId}
@@ -49,7 +49,7 @@
FROM
`tb_order_detail` detail
INNER JOIN `tb_order_info` `order` ON detail.order_id = `order`.id AND `order`.`status` = 'unpaid'
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id and staff.shop_id = #{shopId}
LEFT JOIN `tb_shop_table` `table` ON `order`.table_code = `table`.table_code
LEFT JOIN `tb_shop_table_area` `area` ON `table`.area_id = `area`.id
WHERE
@@ -81,7 +81,7 @@
FROM `tb_order_detail` detail
INNER JOIN `tb_order_info` `order` ON detail.order_id = `order`.id AND `order`.`status` = 'unpaid'
LEFT JOIN `tb_shop_table` `table` ON `order`.table_code = `table`.table_code
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id and staff.shop_id = #{shopId}
WHERE detail.shop_id = #{shopId}
AND detail.`status` = 'wait-pay'
<if test="orderId != null">