首页查询报错修复

This commit is contained in:
张松 2025-03-20 16:42:25 +08:00
parent e2956752ec
commit f3504dfcb5
1 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@
</select>
<select id="selectRecommendProductList" resultType="com.czg.product.vo.RecommendProVO">
select ROUND(
ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) / 1000, 2) AS distance,
ifnull(ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) / 1000, 2), 0) AS distance,
c.name, a.origin_price, a.sale_price, b.shop_name, b.districts, c.cover_img, b.logo, c.id,
a.real_sales_number saleNum, (round(a.sale_price / a.origin_price, 2) * 10) AS discount,
c.id productId, a.id skuId, b.id shopId
@ -188,7 +188,7 @@
<choose>
<when test="orderType == 0">
ORDER BY discount
ORDER BY distance
</when>
<when test="orderType == 1">
ORDER BY a.real_sales_number DESC