|
|
@@ -435,4 +435,74 @@
|
|
|
where a.uid= #{uid}
|
|
|
and a.aid= #{aid}
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="userFollowList" resultType="com.goafanti.user.bo.outUserFollowList">
|
|
|
+ select b.nickname,b.share_type ,b.channel,b.id,
|
|
|
+ date_format(b.transfer_time,'%Y-%m-%d %H:%i:%s')startTimes,
|
|
|
+ a.contact_type,c.name followName ,d.name followDep,a.`result` ,a.follow_count followCount,
|
|
|
+ a.guidance ,date_format(a.guidance_time,'%Y-%m-%d %H:%i:%s') guidanceTimes
|
|
|
+ from user_follow a left join `user`b on a.uid =b.id left join admin c on b.aid =c.id
|
|
|
+ left join department d on c.department_id =d.id where 1=1
|
|
|
+ <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 =2
|
|
|
+ </if>
|
|
|
+ <if test="userType == 3">
|
|
|
+ and b.channel =1
|
|
|
+ </if>
|
|
|
+ <if test="contactType != null">
|
|
|
+ and a.contact_type = #{contactType}
|
|
|
+ </if>
|
|
|
+ <if test="dateType !=null and startTime !=null and endTime !=null">
|
|
|
+ <if test="dateType ==1">
|
|
|
+ and a.create_time between #{startTime} and #{endTime}
|
|
|
+ </if><if test="dateType ==1">
|
|
|
+ and b.transfer_time between #{startTime} and #{endTime}
|
|
|
+ </if><if test="dateType ==1">
|
|
|
+ and a.guidance_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ order by a.create_time desc
|
|
|
+ <if test="${page_sql}!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="userFollowCount" resultType="java.lang.Integer">
|
|
|
+ select b.nickname,b.share_type ,b.channel,b.id,
|
|
|
+ date_format(b.transfer_time,'%Y-%m-%d %H:%i:%s')startTimes,
|
|
|
+ a.contact_type,c.name followName ,d.name followDep,a.`result` ,a.follow_count followCount,
|
|
|
+ a.guidance ,date_format(a.guidance_time,'%Y-%m-%d %H:%i:%s') guidanceTimes
|
|
|
+ from user_follow a left join `user`b on a.uid =b.id left join admin c on b.aid =c.id
|
|
|
+ left join department d on c.department_id =d.id where 1=1
|
|
|
+ <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 =2
|
|
|
+ </if>
|
|
|
+ <if test="userType == 3">
|
|
|
+ and b.channel =1
|
|
|
+ </if>
|
|
|
+ <if test="contactType != null">
|
|
|
+ and a.contact_type = #{contactType}
|
|
|
+ </if>
|
|
|
+ <if test="dateType !=null and startTime !=null and endTime !=null">
|
|
|
+ <if test="dateType ==1">
|
|
|
+ and a.create_time between #{startTime} and #{endTime}
|
|
|
+ </if><if test="dateType ==1">
|
|
|
+ and b.transfer_time between #{startTime} and #{endTime}
|
|
|
+ </if><if test="dateType ==1">
|
|
|
+ and a.guidance_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|