首页下半更改

This commit is contained in:
liuyingfang
2024-04-15 10:15:16 +08:00
parent d7dfeee159
commit 46cd954abf
8 changed files with 157 additions and 95 deletions

View File

@@ -268,13 +268,45 @@
</if>
</where>
</select>
<select id="queryAllByPage" resultType="com.chaozhanggui.system.cashierservice.entity.TbMerchantCoupon">
select
id, status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id
from tb_merchant_coupon
where class_type ='product'
AND ratio IS NOT NULL
limit #{page}, #{size}
<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 info.cities =#{cities}
<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="order == '1'">
ORDER BY (ABS(info.lat - #{lat}) + ABS(info.lng - #{lng})) ASC
</when>
<when test="order == '2'">
ORDER BY cou.number ASC
</when>
<when test="order == '3'">
ORDER BY cou.amount ASC
</when>
<otherwise>
ORDER BY cou.id ASC
</otherwise>
</choose>
limit #{pageable}, #{sizeable}
</select>
<!--新增所有列-->