Commit 19cebcff by 翁国栋

查询未跟进时间不对应

parent 58ebe2e5
......@@ -81,7 +81,7 @@
OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......@@ -129,7 +129,7 @@
AND (ccd.client_name LIKE CONCAT('%', #{like}, '%') OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......@@ -179,7 +179,7 @@
AND (ccd.client_name LIKE CONCAT('%', #{like}, '%') OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......@@ -226,7 +226,7 @@
AND (ccd.client_name LIKE CONCAT('%', #{like}, '%') OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......@@ -282,7 +282,7 @@
AND (ccd.client_name LIKE CONCAT('%', #{like}, '%') OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......@@ -331,7 +331,7 @@
AND (ccd.client_name LIKE CONCAT('%', #{like}, '%') OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......@@ -385,7 +385,7 @@
AND (ccd.client_name LIKE CONCAT('%', #{like}, '%') OR ccd.client_cellphone LIKE CONCAT('%', #{like}, '%'))
</if>
<if test="unfollowedDays != null and unfollowedDays > 0">
AND DATEDIFF(NOW(), (SELECT MAX(last_follow_time) FROM crm_client_follow ccf WHERE ccf.cid = ccd.id)) >= #{unfollowedDays}
AND DATEDIFF(NOW(), last_follow_time) <![CDATA[ <= ]]> #{unfollowedDays}
</if>
<if test="followNumber != null and followNumber > 0">
AND (
......
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