Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
张松
2025-11-28 09:59:12 +08:00
2 changed files with 11 additions and 0 deletions

View File

@@ -39,6 +39,8 @@
SELECT
`order`.id AS orderId,
`table`.id AS tableId,
`staff`.`name` AS staffName,
detail.order_time AS orderTime,
CASE WHEN `table`.id IS NULL THEN '' ELSE COALESCE (`order`.table_code, '') END AS tableCode,
COALESCE(`table`.`name`, '无台桌') AS tableName,
`table`.`area_id` AS areaId,
@@ -47,6 +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_table` `table` ON `order`.table_code = `table`.table_code
LEFT JOIN `tb_shop_table_area` `area` ON `table`.area_id = `area`.id
WHERE