Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -28,5 +28,5 @@ public interface KitchenDetailMapper {
|
||||
/**
|
||||
* 按台桌查看商品列表
|
||||
*/
|
||||
List<KitchenFoodVO> getKitchenFood(Long shopId, String productName);
|
||||
List<KitchenFoodVO> getKitchenFood(Long shopId, String productName, Long categoryId);
|
||||
}
|
||||
@@ -12,8 +12,10 @@
|
||||
detail.sku_name AS skuName,
|
||||
`order`.id AS orderId,
|
||||
detail.id AS orderDetailId,
|
||||
COALESCE(`table`.`name`, '无台桌') AS tableName,
|
||||
CASE WHEN `table`.id IS NULL THEN '吧台' ELSE COALESCE(`area`.`name`, '') END AS areaName,
|
||||
`category`.id AS categoryId,
|
||||
`category`.name AS categoryName,
|
||||
COALESCE(`table`.`name`, '无台桌') AS tableName,
|
||||
CASE WHEN `table`.id IS NULL THEN '吧台' ELSE COALESCE(`area`.`name`, '') END AS areaName,
|
||||
`staff`.`name` AS staffName,
|
||||
sum(detail.num - detail.return_num) AS num,
|
||||
detail.sub_status AS subStatus,
|
||||
@@ -23,11 +25,16 @@
|
||||
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_product` `product` ON `product`.id = `detail`.product_id and product.shop_id = #{shopId}
|
||||
INNER JOIN `tb_shop_prod_category` `category` ON category.id = `product`.category_id and category.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}
|
||||
AND detail.`status` = 'wait-pay'
|
||||
<if test="categoryId != null">
|
||||
AND `category`.id = #{categoryId}
|
||||
</if>
|
||||
<if test="productName != null and productName != ''">
|
||||
AND detail.product_name like concat('%',#{productName},'%')
|
||||
</if>
|
||||
@@ -49,7 +56,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 +88,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">
|
||||
@@ -108,6 +115,8 @@
|
||||
<arg column="tableName" javaType="java.lang.String"/>
|
||||
<arg column="areaName" javaType="java.lang.String"/>
|
||||
<arg column="orderDetailId" javaType="java.lang.Long"/>
|
||||
<arg column="categoryId" javaType="java.lang.Long"/>
|
||||
<arg column="categoryName" javaType="java.lang.String"/>
|
||||
<arg column="num" javaType="java.lang.Long"/>
|
||||
<arg column="subStatus" javaType="java.lang.String"/>
|
||||
<arg column="orderTime" javaType="java.lang.String"/>
|
||||
|
||||
Reference in New Issue
Block a user