验证码
个人中心-菜单页 首页接口 预约到店(店铺列表) 通用商品列表 登录 退出登录 商品详情(缺少评价部分) 订单页 列表 详情
This commit is contained in:
@@ -48,49 +48,6 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryAllByPage" resultType="com.chaozhanggui.system.cashierservice.entity.vo.CouAndShopVo">
|
||||
SELECT
|
||||
cou.id as id,
|
||||
cou.title as title,
|
||||
cou.shop_id as shopId,
|
||||
cou.amount as amount,
|
||||
cou.number as number,
|
||||
cou.ratio as ratio,
|
||||
cou.relation_ids as relationIds,
|
||||
info.shop_name as shopName,
|
||||
info.logo
|
||||
FROM
|
||||
tb_merchant_coupon as cou
|
||||
LEFT JOIN tb_shop_info as info ON cou.shop_id = info.id
|
||||
<where>
|
||||
cou.class_type = 'product'
|
||||
AND cou.`status` = 1
|
||||
AND cou.type = 2
|
||||
AND info.cities =#{cities}
|
||||
<if test="type != null and type != ''">
|
||||
AND category_id like concat('%',#{type,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="rightTopLng != null and rightTopLng != '' and leftBottomLng != null and leftBottomLng != ''">
|
||||
AND info.lng BETWEEN #{leftBottomLng} AND #{rightTopLng}
|
||||
AND info.lat BETWEEN #{leftBottomLat} AND #{rightTopLat}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
<choose>
|
||||
<when test="orderBy == '1'">
|
||||
ORDER BY (ABS(info.lat - #{lat}) + ABS(info.lng - #{lng})) ASC
|
||||
</when>
|
||||
<when test="orderBy == '2'">
|
||||
ORDER BY cou.number ASC
|
||||
</when>
|
||||
<when test="orderBy == '3'">
|
||||
ORDER BY cou.amount ASC
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY cou.id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user