|
|
@@ -26,19 +26,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select id, store_id, store_name, sort_order, begin_time, end_time, recommend_type, status, weight, recommend_reason, create_by, create_time, update_by, update_time, remark from fs_store_recommend_scrm
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectFsStoreRecommendScrmList" parameterType="FsStoreRecommendScrm" resultMap="FsStoreRecommendScrmResult">
|
|
|
- <include refid="selectFsStoreRecommendScrmVo"/>
|
|
|
+ <select id="selectFsStoreRecommendScrmList" resultType="com.fs.hisStore.vo.FsStoreRecommendScrmVo">
|
|
|
+ SELECT
|
|
|
+ srs.*,
|
|
|
+ ss.logo_url
|
|
|
+ FROM
|
|
|
+ fs_store_recommend_scrm srs
|
|
|
+ LEFT JOIN fs_store_scrm ss ON srs.store_id = ss.store_id
|
|
|
<where>
|
|
|
- <if test="storeId != null "> and store_id = #{storeId}</if>
|
|
|
- <if test="storeName != null and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
|
|
|
- <if test="sortOrder != null "> and sort_order = #{sortOrder}</if>
|
|
|
- <if test="beginTime != null "> and begin_time >= #{beginTime}</if>
|
|
|
- <if test="endTime != null "> and end_time <= #{endTime}</if>
|
|
|
- <if test="recommendType != null and recommendType != ''"> and recommend_type = #{recommendType}</if>
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
- <if test="weight != null "> and weight = #{weight}</if>
|
|
|
+ <if test="storeId != null "> and srs.store_id = #{storeId}</if>
|
|
|
+ <if test="storeName != null and storeName != ''"> and srs.store_name like concat('%', #{storeName}, '%')</if>
|
|
|
+ <if test="sortOrder != null "> and srs.sort_order = #{sortOrder}</if>
|
|
|
+ <if test="beginTime != null "> and srs.begin_time >= #{beginTime}</if>
|
|
|
+ <if test="endTime != null "> and srs.end_time <= #{endTime}</if>
|
|
|
+ <if test="recommendType != null and recommendType != ''"> and srs.recommend_type = #{recommendType}</if>
|
|
|
+ <if test="status != null "> and srs.status = #{status}</if>
|
|
|
+ <if test="weight != null "> and srs.weight = #{weight}</if>
|
|
|
</where>
|
|
|
- order by sort_order asc, weight desc, create_time desc
|
|
|
+ ORDER BY
|
|
|
+ srs.sort_order ASC,
|
|
|
+ srs.weight DESC,
|
|
|
+ srs.create_time DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="selectValidRecommendList" parameterType="FsStoreRecommendScrm" resultMap="FsStoreRecommendScrmResult">
|