Commit 99f968ad authored by gaoyuan's avatar gaoyuan

4.9.3需求---bug修复--平台人搜索

parent ea1fe9e3
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
c.id, c.name, c.phone,c.status, c.create_time, c.creater,c.buy_intention, c.last_call_time, c.manager_id,c.manager_name, c.update_time,c.create_source, c.id, c.name, c.phone,c.status, c.create_time, c.creater,c.buy_intention, c.last_call_time, c.manager_id,c.manager_name, c.update_time,c.create_source,
c.cityCode, c.cityName, c.trace_status, c.crm_sync,c.bind_time, c.customer_source_type, c.isWaitCall,c.is_peer, c.starCustomer, c.isHandover c.cityCode, c.cityName, c.trace_status, c.crm_sync,c.bind_time, c.customer_source_type, c.isWaitCall,c.is_peer, c.starCustomer, c.isHandover
FROM customer_merge c FROM customer_merge c
<if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" )'> <if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" ) || (createrId != null and createrId != "")'>
inner join ( inner join (
SELECT SELECT
c3.manager_id,c3.phone c3.manager_id,c3.phone
...@@ -219,27 +219,12 @@ ...@@ -219,27 +219,12 @@
<if test="callbackLog != null and callbackLog != '' "> <if test="callbackLog != null and callbackLog != '' ">
and c2.content like CONCAT('%', #{callbackLog},'%') and c2.content like CONCAT('%', #{callbackLog},'%')
</if> </if>
<if test="createrId != null and createrId != '' ">
AND c3.creater =#{createrId}
</if>
group by c3.manager_id,c3.phone group by c3.manager_id,c3.phone
) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone ) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone
</if> </if>
<if test='(createrId != null and createrId != "" )'>
inner join (
SELECT
c3.manager_id,c3.phone
FROM
customer_callback_log c2 right join customer c3 on c2.customer_id = c3.id
where 1=1
and c3.cityCode=#{cityCode}
AND c3.is_delete = 0
AND ( c3.isWaitCall = 0 OR c3.isWaitCall IS NULL )
AND c3.manager_id IS NOT NULL
AND c3.STATUS IN ( 11, 0, 99 )
<if test="createrId != null and createrId != '' ">
AND c3.creater =#{createrId}
</if>
group by c3.manager_id,c3.phone
) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone
</if>
<if test="(projectName != null and projectName != '') or (projectStatus != null and projectStatus != '')"> <if test="(projectName != null and projectName != '') or (projectStatus != null and projectStatus != '')">
LEFT JOIN ( LEFT JOIN (
SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id
...@@ -462,7 +447,7 @@ ...@@ -462,7 +447,7 @@
SELECT SELECT
count(c.id) count(c.id)
FROM customer_merge c FROM customer_merge c
<if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" )'> <if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" ) || (createrId != null and createrId != "")'>
inner join ( inner join (
SELECT SELECT
c3.manager_id,c3.phone c3.manager_id,c3.phone
...@@ -487,21 +472,6 @@ ...@@ -487,21 +472,6 @@
<if test="callbackLog != null and callbackLog != '' "> <if test="callbackLog != null and callbackLog != '' ">
and c2.content like CONCAT('%', #{callbackLog},'%') and c2.content like CONCAT('%', #{callbackLog},'%')
</if> </if>
group by c3.manager_id,c3.phone
) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone
</if>
<if test='(createrId != null and createrId != "" )'>
inner join (
SELECT
c3.manager_id,c3.phone
FROM
customer_callback_log c2 right join customer c3 on c2.customer_id = c3.id
where 1=1
and c3.cityCode=#{cityCode}
AND c3.is_delete = 0
AND ( c3.isWaitCall = 0 OR c3.isWaitCall IS NULL )
AND c3.manager_id IS NOT NULL
AND c3.STATUS IN ( 11, 0, 99 )
<if test="createrId != null and createrId != '' "> <if test="createrId != null and createrId != '' ">
AND c3.creater =#{createrId} AND c3.creater =#{createrId}
</if> </if>
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
c.id, c.name, c.phone,c.status, c.create_time, c.creater,c.buy_intention, c.last_call_time, c.manager_id,c.manager_name, c.update_time,c.create_source, c.id, c.name, c.phone,c.status, c.create_time, c.creater,c.buy_intention, c.last_call_time, c.manager_id,c.manager_name, c.update_time,c.create_source,
c.cityCode, c.cityName, c.trace_status, c.crm_sync,c.bind_time, c.customer_source_type, c.isWaitCall,c.is_peer, c.starCustomer, c.isHandover c.cityCode, c.cityName, c.trace_status, c.crm_sync,c.bind_time, c.customer_source_type, c.isWaitCall,c.is_peer, c.starCustomer, c.isHandover
FROM customer_merge c FROM customer_merge c
<if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" )'> <if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" ) || (createrId != null and createrId != "")'>
inner join ( inner join (
SELECT SELECT
c3.manager_id,c3.phone c3.manager_id,c3.phone
...@@ -219,27 +219,12 @@ ...@@ -219,27 +219,12 @@
<if test="callbackLog != null and callbackLog != '' "> <if test="callbackLog != null and callbackLog != '' ">
and c2.content like CONCAT('%', #{callbackLog},'%') and c2.content like CONCAT('%', #{callbackLog},'%')
</if> </if>
<if test="createrId != null and createrId != '' ">
AND c3.creater =#{createrId}
</if>
group by c3.manager_id,c3.phone group by c3.manager_id,c3.phone
) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone ) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone
</if> </if>
<if test='(createrId != null and createrId != "" )'>
inner join (
SELECT
c3.manager_id,c3.phone
FROM
customer_callback_log c2 right join customer c3 on c2.customer_id = c3.id
where 1=1
and c3.cityCode=#{cityCode}
AND c3.is_delete = 0
AND ( c3.isWaitCall = 0 OR c3.isWaitCall IS NULL )
AND c3.manager_id IS NOT NULL
AND c3.STATUS IN ( 11, 0, 99 )
<if test="createrId != null and createrId != '' ">
AND c3.creater =#{createrId}
</if>
group by c3.manager_id,c3.phone
) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone
</if>
<if test="(projectName != null and projectName != '') or (projectStatus != null and projectStatus != '')"> <if test="(projectName != null and projectName != '') or (projectStatus != null and projectStatus != '')">
LEFT JOIN ( LEFT JOIN (
SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id
...@@ -462,7 +447,7 @@ ...@@ -462,7 +447,7 @@
SELECT SELECT
count(c.id) count(c.id)
FROM customer_merge c FROM customer_merge c
<if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" )'> <if test='tabType =="9" || (callbackLog != null and callbackLog != "") || (customerSourceType2 != null and customerSourceType2 != "" ) || (createrId != null and createrId != "")'>
inner join ( inner join (
SELECT SELECT
c3.manager_id,c3.phone c3.manager_id,c3.phone
...@@ -487,21 +472,6 @@ ...@@ -487,21 +472,6 @@
<if test="callbackLog != null and callbackLog != '' "> <if test="callbackLog != null and callbackLog != '' ">
and c2.content like CONCAT('%', #{callbackLog},'%') and c2.content like CONCAT('%', #{callbackLog},'%')
</if> </if>
group by c3.manager_id,c3.phone
) t1 on c.manager_id=t1.manager_id and c.phone=t1.phone
</if>
<if test='(createrId != null and createrId != "" )'>
inner join (
SELECT
c3.manager_id,c3.phone
FROM
customer_callback_log c2 right join customer c3 on c2.customer_id = c3.id
where 1=1
and c3.cityCode=#{cityCode}
AND c3.is_delete = 0
AND ( c3.isWaitCall = 0 OR c3.isWaitCall IS NULL )
AND c3.manager_id IS NOT NULL
AND c3.STATUS IN ( 11, 0, 99 )
<if test="createrId != null and createrId != '' "> <if test="createrId != null and createrId != '' ">
AND c3.creater =#{createrId} AND c3.creater =#{createrId}
</if> </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