|
@@ -29,6 +29,8 @@
|
|
<result column="isLike" property="isLike" jdbcType="VARCHAR"/>
|
|
<result column="isLike" property="isLike" jdbcType="VARCHAR"/>
|
|
<result column="home_image" property="homeImage" jdbcType="VARCHAR"/>
|
|
<result column="home_image" property="homeImage" jdbcType="VARCHAR"/>
|
|
<result column="user_phone" property="userPhone" jdbcType="VARCHAR"/>
|
|
<result column="user_phone" property="userPhone" jdbcType="VARCHAR"/>
|
|
|
|
+ <result column="release_time" property="releaseTime" jdbcType="VARCHAR"/>
|
|
|
|
+
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!-- 分页查询推荐数据 -->
|
|
<!-- 分页查询推荐数据 -->
|
|
@@ -62,6 +64,7 @@
|
|
u.user_image,
|
|
u.user_image,
|
|
g.goods_status,
|
|
g.goods_status,
|
|
g.delete_flag,
|
|
g.delete_flag,
|
|
|
|
+ g.release_time,
|
|
ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(g.position, ',', ' '), ')' ))) / 1000, 2) AS dist,
|
|
ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(g.position, ',', ' '), ')' ))) / 1000, 2) AS dist,
|
|
case when llr.id is null then '0' else '1' end likeStatus,
|
|
case when llr.id is null then '0' else '1' end likeStatus,
|
|
g.home_image,
|
|
g.home_image,
|
|
@@ -76,7 +79,7 @@
|
|
and not exists (select 1 from shieldUser s where s.id = g.id)
|
|
and not exists (select 1 from shieldUser s where s.id = g.id)
|
|
and not exists (select 1 from second_shield s where s.user_id = #{userId} and s.shield_type = 1 and s.shield_id = g.id and s.delete_flag = 0)
|
|
and not exists (select 1 from second_shield s where s.user_id = #{userId} and s.shield_type = 1 and s.shield_id = g.id and s.delete_flag = 0)
|
|
and g.goods_status = 3
|
|
and g.goods_status = 3
|
|
- order by dist, like_count desc, created_time desc
|
|
|
|
|
|
+ order by dist, like_count desc, release_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 分页查询关注数据concern -->
|
|
<!-- 分页查询关注数据concern -->
|
|
@@ -98,6 +101,7 @@
|
|
g.created_user_id,
|
|
g.created_user_id,
|
|
g.updated_time,
|
|
g.updated_time,
|
|
g.updated_user_id,
|
|
g.updated_user_id,
|
|
|
|
+ g.release_time,
|
|
u.user_name,
|
|
u.user_name,
|
|
u.user_image,
|
|
u.user_image,
|
|
CONCAT('user_', u.user_phone) as user_phone,
|
|
CONCAT('user_', u.user_phone) as user_phone,
|
|
@@ -118,7 +122,7 @@
|
|
left join life_collect lc on lc.business_id = g.id and lc.user_id = #{phoneId} and lc.delete_flag = 0 and lc.business_type = 1
|
|
left join life_collect lc on lc.business_id = g.id and lc.user_id = #{phoneId} and lc.delete_flag = 0 and lc.business_type = 1
|
|
where
|
|
where
|
|
f.fans_id = #{phoneId} and f.delete_flag = 0
|
|
f.fans_id = #{phoneId} and f.delete_flag = 0
|
|
- order by g.created_time desc
|
|
|
|
|
|
+ order by g.release_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="querySecondCommentInfo" resultType="shop.alien.entity.second.vo.SecondCommentVo">
|
|
<select id="querySecondCommentInfo" resultType="shop.alien.entity.second.vo.SecondCommentVo">
|
|
@@ -174,6 +178,7 @@
|
|
g.created_user_id,
|
|
g.created_user_id,
|
|
g.updated_time,
|
|
g.updated_time,
|
|
g.updated_user_id,
|
|
g.updated_user_id,
|
|
|
|
+ g.release_time,
|
|
u.user_name,
|
|
u.user_name,
|
|
u.user_image,
|
|
u.user_image,
|
|
CONCAT('user_', u.user_phone) as user_phone,
|
|
CONCAT('user_', u.user_phone) as user_phone,
|
|
@@ -193,7 +198,7 @@
|
|
and not exists (select 1 from shieldUser s where s.id = g.id)
|
|
and not exists (select 1 from shieldUser s where s.id = g.id)
|
|
and not exists (select 1 from second_shield s where s.user_id = #{userId} and s.shield_type = 1 and s.shield_id = g.id)
|
|
and not exists (select 1 from second_shield s where s.user_id = #{userId} and s.shield_type = 1 and s.shield_id = g.id)
|
|
and g.goods_status = 3
|
|
and g.goods_status = 3
|
|
- order by g.created_time desc
|
|
|
|
|
|
+ order by g.release_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="querySecondGoodsDetail" resultType="shop.alien.entity.second.vo.SecondGoodsRecommendVo">
|
|
<select id="querySecondGoodsDetail" resultType="shop.alien.entity.second.vo.SecondGoodsRecommendVo">
|