This commit is contained in:
dute7liang
2023-12-24 16:58:05 +08:00
parent 2f47f91b37
commit 3febb24205
19 changed files with 322 additions and 9 deletions

View File

@@ -14,6 +14,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time"/>
<result property="sort" column="sort"/>
</resultMap>
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.DynamicListVo">
select
t2.age,t2.gender,t2.avatar,t2.nickname,if(t3.id is null,0,1) as star,
t1.id,t1.user_id,t1.city_id,t1.is_attach,t1.status,t1.create_time,t1.content
from cai_dynamic t1
left join cai_user t2 on t1.user_id = t2.id
left join cai_user_follow_dynamic t3 on t1.id = t3.dynamic_id and t3.user_id = #{query.currentUserId}
where t1.status = 1 and t2.status = 0
<if test="query.userId != null">
and t1.user_id = #{query.userId}
</if>
<if test="query.type != null and query.type == 2">
and t3.id is not null
</if>
<if test="query.type != null and query.type == 3">
and t1.city_id = #{query.city}
</if>
order by t1.create_time desc
</select>
</mapper>