小程序主页报错修复
This commit is contained in:
@@ -185,20 +185,24 @@
|
||||
<if test="distanceType != null">
|
||||
and ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) <= #{distanceType}
|
||||
</if>
|
||||
<if test="orderType == 0">
|
||||
ORDER BY distance
|
||||
</if>
|
||||
<if test="orderType == 1">
|
||||
ORDER BY a.real_sales_number desc
|
||||
</if>
|
||||
|
||||
<if test="orderType == 2">
|
||||
ORDER BY a.sale_price
|
||||
</if>
|
||||
|
||||
<if test="orderType == 3">
|
||||
ORDER BY c.create_time desc
|
||||
</if>
|
||||
<choose>
|
||||
<when test="orderType == 0">
|
||||
ORDER BY discount
|
||||
</when>
|
||||
<when test="orderType == 1">
|
||||
ORDER BY a.real_sales_number DESC
|
||||
</when>
|
||||
<when test="orderType == 2">
|
||||
ORDER BY a.sale_price
|
||||
</when>
|
||||
<when test="orderType == 3">
|
||||
ORDER BY c.create_time DESC
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY c.create_time DESC <!-- 默认排序,避免 orderType 为空时报错 -->
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<select id="getTodayProInfo" resultType="com.czg.product.vo.RecommendProVO">
|
||||
|
||||
Reference in New Issue
Block a user