init
This commit is contained in:
@@ -10,18 +10,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="content" column="content"/>
|
||||
<result property="cityId" column="city_id"/>
|
||||
<result property="isAttach" column="is_attach"/>
|
||||
<result property="status" column="status"/>
|
||||
<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
|
||||
t1.id,t1.user_id,t1.city_id,t1.is_attach,t1.audit_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
|
||||
where t1.audit_status = 2 and t2.status = 0
|
||||
<if test="query.userId != null">
|
||||
and t1.user_id = #{query.userId}
|
||||
</if>
|
||||
@@ -37,9 +36,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select t2.url
|
||||
from cai_dynamic t1
|
||||
join cai_dynamic_images t2 on t1.id = t2.user_id
|
||||
where t1.status = 1 and t1.user_id = #{userId}
|
||||
where t1.audit_status = 2 and t1.user_id = #{userId}
|
||||
limit #{limit}
|
||||
</select>
|
||||
<select id="pageAdmin" resultType="com.ruoyi.cai.dto.admin.vo.DynamicAdminVo">
|
||||
select t1.*, t2.usercode,t2.nickname,t2.mobile,t2.avatar,t2.gender,t2.is_anchor,t2.age,t2.status
|
||||
from cai_dynamic t1
|
||||
left join cai_user t2 on t1.user_id = t2.id
|
||||
<where>
|
||||
<if test="bo.mobile != null and bo.mobile != ''">
|
||||
and t2.mobile = #{bo.mobile}
|
||||
</if>
|
||||
<if test="bo.usercode != null and bo.usercode != ''">
|
||||
and t2.usercode = #{bo.usercode}
|
||||
</if>
|
||||
<if test="bo.auditStatus != null">
|
||||
and t1.audit_status = #{bo.auditStatus}
|
||||
</if>
|
||||
</where>
|
||||
order by t1.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user