|
@@ -53,7 +53,7 @@
|
|
|
c.create_id
|
|
|
from Clue c
|
|
|
where
|
|
|
- c.company_id = #{companyId} and is_delete = 0
|
|
|
+ c.company_id = #{companyId} and is_delete = #{isDelete}
|
|
|
<if test="startTime != null and endTime != null ">
|
|
|
and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
</if>
|
|
@@ -91,23 +91,23 @@
|
|
|
c.create_id
|
|
|
from Clue c
|
|
|
where
|
|
|
- c.company_id = #{companyId} and is_delete = 0
|
|
|
+ c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
|
|
|
and c.incharger_id in
|
|
|
(SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
and c.incharger_id is null
|
|
|
- <if test="startTime != null and endTime != null ">
|
|
|
- and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ <if test="clue.startTime != null and clue.endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
</if>
|
|
|
- <if test="clueName != null and clueName != '' ">
|
|
|
- and c.clue_name = #{clueName}
|
|
|
+ <if test="clue.clueName != null and clue.clueName != '' ">
|
|
|
+ and c.clue_name = #{clue.clueName}
|
|
|
</if>
|
|
|
- <if test="clueSourceId != null">
|
|
|
- and c.clue_source_id = #{clueSourceId}
|
|
|
+ <if test="clue.clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clue.clueSourceId}
|
|
|
</if>
|
|
|
- <if test="customerIndustryId != null">
|
|
|
- and c.customer_industry_id = #{customerIndustryId}
|
|
|
+ <if test="clue.customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{clue.customerIndustryId}
|
|
|
</if>
|
|
|
- limit #{pageIndex},#{pageFrom}
|
|
|
+ limit #{clue.pageIndex},#{clue.pageFrom}
|
|
|
</select>
|
|
|
<select id="list2" resultType="com.management.platform.entity.Clue">
|
|
|
select c.id,
|
|
@@ -132,21 +132,21 @@
|
|
|
c.create_id
|
|
|
from Clue c
|
|
|
where
|
|
|
- c.company_id = #{companyId} and is_delete = 0
|
|
|
+ c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
|
|
|
and c.incharger_id = #{userId} and c.incharger_id is null
|
|
|
- <if test="startTime != null and endTime != null ">
|
|
|
- and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ <if test="clue.startTime != null and clue.endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
</if>
|
|
|
- <if test="clueName != null and clueName != '' ">
|
|
|
- and c.clue_name = #{clueName}
|
|
|
+ <if test="clue.clueName != null and clue.clueName != '' ">
|
|
|
+ and c.clue_name = #{clue.clueName}
|
|
|
</if>
|
|
|
- <if test="clueSourceId != null">
|
|
|
- and c.clue_source_id = #{clueSourceId}
|
|
|
+ <if test="clue.clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clue.clueSourceId}
|
|
|
</if>
|
|
|
- <if test="customerIndustryId != null">
|
|
|
- and c.customer_industry_id = #{customerIndustryId}
|
|
|
+ <if test="clue.customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{clue.customerIndustryId}
|
|
|
</if>
|
|
|
- limit #{pageIndex},#{pageFrom}
|
|
|
+ limit #{clue.pageIndex},#{clue.pageFrom}
|
|
|
</select>
|
|
|
<select id="Deleterlist" resultType="com.management.platform.entity.Clue">
|
|
|
select c.id,
|
|
@@ -190,7 +190,7 @@
|
|
|
select count(*)
|
|
|
from Clue c
|
|
|
where
|
|
|
- c.company_id = #{companyId} and is_delete = 0
|
|
|
+ c.company_id = #{companyId} and is_delete = #{isDelete}
|
|
|
<if test="startTime != null and endTime != null ">
|
|
|
and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
</if>
|
|
@@ -222,5 +222,47 @@
|
|
|
and c.customer_industry_id = #{customerIndustryId}
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="getTotal1" resultType="java.lang.Integer">
|
|
|
+ select c.id,
|
|
|
+ COUNT(c.company_id)
|
|
|
+ from Clue c
|
|
|
+ where
|
|
|
+ c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
|
|
|
+ and c.incharger_id in
|
|
|
+ (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
+ and c.incharger_id is null
|
|
|
+ <if test="clue.startTime != null and clue.endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
+ </if>
|
|
|
+ <if test="clue.clueName != null and clue.clueName != '' ">
|
|
|
+ and c.clue_name = #{clue.clueName}
|
|
|
+ </if>
|
|
|
+ <if test="clue.clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clue.clueSourceId}
|
|
|
+ </if>
|
|
|
+ <if test="clue.customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{clue.customerIndustryId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getTotal2" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ COUNT(c.id)
|
|
|
+ from Clue c
|
|
|
+ where
|
|
|
+ c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
|
|
|
+ and c.incharger_id = #{userId} and c.incharger_id is null
|
|
|
+ <if test="clue.startTime != null and clue.endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
|
|
|
+ </if>
|
|
|
+ <if test="clue.clueName != null and clue.clueName != '' ">
|
|
|
+ and c.clue_name = #{clue.clueName}
|
|
|
+ </if>
|
|
|
+ <if test="clue.clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clue.clueSourceId}
|
|
|
+ </if>
|
|
|
+ <if test="clue.customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{clue.customerIndustryId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|