init
This commit is contained in:
@@ -22,8 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectGuardTotal" resultType="com.ruoyi.cai.dto.app.dto.GuardTotalDTO">
|
||||
select t1.from_user_id,t1.to_user_id,t2.avatar,t1.guard_num
|
||||
from cai_guard_total t1
|
||||
join cai_user t2 on t1.to_user_id = t2.id
|
||||
where t1.from_user_id = #{fromUserId}
|
||||
join cai_user t2 on t1.from_user_id = t2.id
|
||||
where t1.to_user_id = #{toUserId}
|
||||
order by guard_num desc
|
||||
<if test="limit != null">
|
||||
limit #{limit}
|
||||
@@ -32,20 +32,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="guardCount" resultType="java.lang.Long">
|
||||
select ifnull(sum(guard_num),0)
|
||||
from cai_guard_total t1
|
||||
join cai_user t2 on t1.to_user_id = t2.id
|
||||
where t1.from_user_id = #{fromUserId}
|
||||
join cai_user t2 on t1.from_user_id = t2.id
|
||||
where t1.to_user_id = #{toUserId}
|
||||
</select>
|
||||
<select id="guardPersonCount" resultType="java.lang.Long">
|
||||
select ifnull(count(1),0)
|
||||
from cai_guard_total t1
|
||||
join cai_user t2 on t1.to_user_id = t2.id
|
||||
where t1.from_user_id = #{fromUserId}
|
||||
join cai_user t2 on t1.from_user_id = t2.id
|
||||
where t1.to_user_id = #{toUserId}
|
||||
</select>
|
||||
<select id="userGuardPage" resultType="com.ruoyi.cai.dto.app.vo.index.GuardListPageVo">
|
||||
select t1.to_user_id as user_id, t2.nickname,t2.avatar,t2.usercode,t1.guard_num,t1.guard_value
|
||||
select t1.from_user_id as user_id, t2.nickname,t2.avatar,t2.usercode,t1.guard_num,t1.guard_value
|
||||
from cai_guard_total t1
|
||||
join cai_user t2 on t1.to_user_id = t2.id
|
||||
where t1.from_user_id = #{userId}
|
||||
join cai_user t2 on t1.from_user_id = t2.id
|
||||
where t1.to_user_id = #{toUserId}
|
||||
order by guard_num desc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -40,6 +40,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user