Commit 81a7f6bc by 王祖波

Merge branch 'feature-recommend2' into 'developer'

跟进时间只取近一年记录

See merge request !2875
parents f166bee5 c7552741
......@@ -65,7 +65,7 @@
<include refid="Base_Column_List" />
FROM tab_contact_follow
<where>
enterprise_id = #{enterpriseId} and delete_flag = 0
enterprise_id = #{enterpriseId} and delete_flag = 0 and follow_time >= now() - interval 1 year
<if test="search.clerkId != null and search.clerkId != ''">
AND clerk_id = #{search.clerkId}
</if>
......@@ -87,6 +87,7 @@
INNER JOIN ( SELECT clerk_id, member_id, MAX( follow_time ) AS max_follow_time FROM tab_contact_follow WHERE
enterprise_id = #{enterpriseId}
and delete_flag = 0
and follow_time >= now() - interval 1 year
and member_id IN
<foreach item="item" index="index" collection="memberIdList" open="(" separator="," close=")">
#{item}
......@@ -96,7 +97,7 @@
AND t.member_id = latest.member_id
AND t.follow_time = latest.max_follow_time
where t.enterprise_id = #{enterpriseId}
and t.delete_flag = 0
and t.delete_flag = 0 and t.follow_time >= now() - interval 1 year
<if test="clerkId!=null and clerkId!=''">
and t.clerk_id = #{clerkId}
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment