|
@@ -226,60 +226,14 @@
|
|
|
from user_follow a left join `user`b on a.uid =b.id left join organization_identity c on a.uid=c.uid
|
|
from user_follow a left join `user`b on a.uid =b.id left join organization_identity c on a.uid=c.uid
|
|
|
left join admin d on a.aid =d.id left join business_project e on a.pid =e.id
|
|
left join admin d on a.aid =d.id left join business_project e on a.pid =e.id
|
|
|
where 1=1
|
|
where 1=1
|
|
|
- <if test="shiroType == 0">
|
|
|
|
|
- and a.aid= #{aid}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="shiroType == 1">
|
|
|
|
|
- and a.aid in
|
|
|
|
|
- <foreach close=")" collection="aids" item="id" open="(" separator=",">
|
|
|
|
|
- #{id}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="followName != null">
|
|
|
|
|
- and a.follow_name like concat('%',#{followName},'%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="userName != null">
|
|
|
|
|
- and b.nickname like concat('%',#{userName},'%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="userType == 1">
|
|
|
|
|
- and b.share_type =0
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="userType == 2">
|
|
|
|
|
- and b.share_type =1
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="userType == 3">
|
|
|
|
|
- and b.share_type =2
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="userType == 4">
|
|
|
|
|
- and b.share_type =3
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="contactType != null">
|
|
|
|
|
- and a.contact_type = #{contactType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="followStartTime !=null and followEndTime !=null">
|
|
|
|
|
- and a.create_time between #{followStartTime} and #{followEndTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createStartTime !=null and createEndTime !=null">
|
|
|
|
|
- and b.transfer_time between #{createStartTime} and #{createEndTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="guidanceStartTime !=null and guidanceEndTime !=null">
|
|
|
|
|
- and a.guidance_time between #{guidanceStartTime} and #{guidanceEndTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="deps != null">
|
|
|
|
|
- and d.department_id in
|
|
|
|
|
- <foreach close=")" collection="deps" item="depId" open="(" separator=",">
|
|
|
|
|
- #{depId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ <include refid="userFollowSql"/>
|
|
|
|
|
+
|
|
|
order by a.create_time desc
|
|
order by a.create_time desc
|
|
|
<if test="page_sql != null">
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
${page_sql}
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="userFollowCount" resultType="java.lang.Integer">
|
|
|
|
|
- select count(*)
|
|
|
|
|
- from user_follow a left join `user`b on a.uid =b.id
|
|
|
|
|
- left join admin d on a.aid =d.id where 1=1
|
|
|
|
|
|
|
+ <sql id="userFollowSql">
|
|
|
<if test="shiroType == 0">
|
|
<if test="shiroType == 0">
|
|
|
and a.aid= #{aid}
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
</if>
|
|
@@ -307,6 +261,9 @@
|
|
|
<if test="userType == 4">
|
|
<if test="userType == 4">
|
|
|
and b.share_type =3
|
|
and b.share_type =3
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="userType == 5">
|
|
|
|
|
+ and a.type=1
|
|
|
|
|
+ </if>
|
|
|
<if test="contactType != null">
|
|
<if test="contactType != null">
|
|
|
and a.contact_type = #{contactType}
|
|
and a.contact_type = #{contactType}
|
|
|
</if>
|
|
</if>
|
|
@@ -325,6 +282,12 @@
|
|
|
#{depId}
|
|
#{depId}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <select id="userFollowCount" resultType="java.lang.Integer">
|
|
|
|
|
+ select count(*)
|
|
|
|
|
+ from user_follow a left join `user`b on a.uid =b.id
|
|
|
|
|
+ left join admin d on a.aid =d.id where 1=1
|
|
|
|
|
+ <include refid="userFollowSql"/>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="selectByaidAndDate" resultType="java.lang.Integer">
|
|
<select id="selectByaidAndDate" resultType="java.lang.Integer">
|
|
|
select count(*)followCount
|
|
select count(*)followCount
|