|
@@ -54,6 +54,9 @@
|
|
|
from Clue c
|
|
|
where
|
|
|
c.company_id = #{companyId} and is_delete = #{isDelete}
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="startTime != null and endTime != null ">
|
|
|
and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
</if>
|
|
@@ -104,6 +107,9 @@
|
|
|
and c.incharger_id in
|
|
|
(SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
or c.incharger_id is null
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="clue.startTime != null and clue.endTime != null ">
|
|
|
and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
</if>
|
|
@@ -152,6 +158,9 @@
|
|
|
where
|
|
|
c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
|
|
|
and c.incharger_id = #{userId} or c.incharger_id is null
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="clue.startTime != null and clue.endTime != null ">
|
|
|
and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
</if>
|
|
@@ -205,6 +214,9 @@
|
|
|
<if test="clueName != null and clueName != '' ">
|
|
|
and c.clue_name = #{clueName}
|
|
|
</if>
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="clueSourceId != null">
|
|
|
and c.clue_source_id = #{clueSourceId}
|
|
|
</if>
|
|
@@ -221,6 +233,9 @@
|
|
|
<if test="startTime != null and endTime != null ">
|
|
|
and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
</if>
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="clueName != null and clueName != '' ">
|
|
|
and c.clue_name = #{clueName}
|
|
|
</if>
|
|
@@ -236,6 +251,9 @@
|
|
|
from Clue c
|
|
|
where
|
|
|
c.company_id = #{companyId} and is_delete = 1
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="startTime != null and endTime != null ">
|
|
|
and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
</if>
|
|
@@ -258,6 +276,9 @@
|
|
|
and c.incharger_id in
|
|
|
(SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
or c.incharger_id is null
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
<if test="clue.startTime != null and clue.endTime != null ">
|
|
|
and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
</if>
|
|
@@ -286,6 +307,9 @@
|
|
|
from Clue c
|
|
|
where
|
|
|
c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
|
|
|
+ <if test="inchargerId != null ">
|
|
|
+ and c.incharger_id =#{inchargerId}
|
|
|
+ </if>
|
|
|
and c.incharger_id = #{userId} or c.incharger_id is null
|
|
|
<if test="clue.startTime != null and clue.endTime != null ">
|
|
|
and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|