小程序主页商品接口修改

This commit is contained in:
张松 2025-03-11 11:02:30 +08:00
parent 240e43daef
commit 1e43db1908
1 changed files with 3 additions and 3 deletions

View File

@ -171,7 +171,7 @@
from tb_prod_sku as a
left join tb_product c on c.id=a.product_id
left join tb_shop_info as b on a.shop_id=b.id
where c.id is not null and c.group_category_id is not null
where c.id is not null and c.group_category_id is not null and c.group_category_id != '[]'
<if test="address != null and address != ''">
and (b.cities like concat('%', #{address}, '%') or b.districts like concat('%', #{address}, '%'))
</if>
@ -180,7 +180,7 @@
and c.name like concat('%', #{name}, '%')
</if>
<if test="classify != null">
and c.group_category_id = #{classify}
and c.group_category_id like concat('%', #{classify}, '%')
</if>
<if test="distanceType != null">
and ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) &lt;= #{distanceType}
@ -213,7 +213,7 @@
from tb_prod_sku as a
left join tb_product c on c.id=a.product_id
left join tb_shop_info as b on a.shop_id=b.id
where c.group_category_id is not null and c.create_time >= date_format(now(), '%Y-%m-%d 00:00:00')
where c.group_category_id is not null and c.group_category_id != '[]' and c.create_time >= date_format(now(), '%Y-%m-%d 00:00:00')
</select>
<update id="updateProductStockNum">
update tb_product