扫码点餐部分
This commit is contained in:
@@ -229,9 +229,9 @@
|
||||
FROM
|
||||
tb_product_group
|
||||
where shop_id=#{shopId} and is_show=1
|
||||
<if test="groupId != null">
|
||||
<if test="groupId != null and groupId != ''">
|
||||
and id = #{groupId}
|
||||
</if>
|
||||
order by g.sort asc
|
||||
order by sort asc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -932,11 +932,45 @@
|
||||
select min( sku.suit ) as suit,tb.*
|
||||
from tb_product tb
|
||||
LEFT JOIN tb_product_sku sku ON tb.id = sku.product_id
|
||||
where tb.id in (${ids}) and is_show_mall =1 and sku.is_del = 0 and sku.is_grounding=1
|
||||
where tb.id in (${ids}) and is_show_mall =1 and sku.is_del = 0 and sku.is_grounding=1 and tb.status = 1
|
||||
group by tb.id
|
||||
order by tb.sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectHot" resultMap="BaseResultMap">
|
||||
select min(sku.suit) as suit, tb.*
|
||||
from tb_product tb
|
||||
LEFT JOIN tb_product_sku sku ON tb.id = sku.product_id
|
||||
JOIN (SELECT product_id
|
||||
FROM tb_product_sku
|
||||
WHERE shop_id = #{shopId}
|
||||
GROUP BY product_id
|
||||
ORDER BY SUM(stock_number) DESC LIMIT 3) AS top_products ON tb.id = top_products.product_id
|
||||
where is_show_mall = 1
|
||||
and tb.status = 1
|
||||
and sku.is_del = 0
|
||||
and sku.is_grounding = 1
|
||||
group by tb.id
|
||||
order by tb.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectIsSpecialty" resultMap="BaseResultMap">
|
||||
select min(sku.suit) as suit, tb.*
|
||||
from tb_product tb
|
||||
LEFT JOIN tb_product_sku sku ON tb.id = sku.product_id
|
||||
where is_hot = 1
|
||||
and is_show_mall = 1
|
||||
and tb.shop_id = #{shopId}
|
||||
and tb.status = 1
|
||||
and sku.is_del = 0
|
||||
and sku.is_grounding = 1
|
||||
group by tb.id
|
||||
order by tb.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- <select id="selectByIdIn" resultMap="BaseResultMap">-->
|
||||
<!-- select *-->
|
||||
<!-- from tb_product-->
|
||||
@@ -963,6 +997,17 @@
|
||||
t.shop_id,
|
||||
t.product_id
|
||||
</select>
|
||||
<select id="selectByCodeAndSkuId" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL(t.number, 0 )
|
||||
FROM
|
||||
tb_cashier_cart t
|
||||
WHERE
|
||||
t.shop_id = #{shopId}
|
||||
AND t.sku_id = #{skuId}
|
||||
AND t.`status` = 'create'
|
||||
AND t.table_id = #{code}
|
||||
</select>
|
||||
<select id="selectByNewQcode" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL( sum( t.number ), 0 )
|
||||
|
||||
Reference in New Issue
Block a user