Commit ea1fe9e3 authored by gaoyuan's avatar gaoyuan

4.9.3需求---bug修复

parent 2e15f1bd
......@@ -222,6 +222,24 @@
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 != '' ">
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 != '')">
LEFT JOIN (
SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id
......@@ -434,9 +452,6 @@
AND ( SELECT count( * ) FROM customer_callback_log ccl WHERE ccl.customer_id = c.id ) = 0
AND ( SELECT count( * ) FROM customer_status_log csl WHERE csl.customer_id = c.id ) = 0
</if>
<if test="createrId != null and createrId != '' ">
AND c.creater =#{createrId}
</if>
<if test="orderBy != null and orderBy != '' ">
order by ${orderBy}
</if>
......@@ -475,6 +490,24 @@
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 != '' ">
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 != '')">
LEFT JOIN (
SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id
......@@ -687,9 +720,6 @@
AND ( SELECT count( * ) FROM customer_callback_log ccl WHERE ccl.customer_id = c.id ) = 0
AND ( SELECT count( * ) FROM customer_status_log csl WHERE csl.customer_id = c.id ) = 0
</if>
<if test="createrId != null and createrId != '' ">
AND c.creater =#{createrId}
</if>
</select>
......
......@@ -222,6 +222,24 @@
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 != '' ">
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 != '')">
LEFT JOIN (
SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id
......@@ -434,9 +452,6 @@
AND ( SELECT count( * ) FROM customer_callback_log ccl WHERE ccl.customer_id = c.id ) = 0
AND ( SELECT count( * ) FROM customer_status_log csl WHERE csl.customer_id = c.id ) = 0
</if>
<if test="createrId != null and createrId != '' ">
AND c.creater =#{createrId}
</if>
<if test="orderBy != null and orderBy != '' ">
order by ${orderBy}
</if>
......@@ -475,6 +490,24 @@
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 != '' ">
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 != '')">
LEFT JOIN (
SELECT c1.manager_id, c1.phone FROM customer c1 inner join customer_project p1 on c1.id=p1.customer_id
......@@ -687,9 +720,6 @@
AND ( SELECT count( * ) FROM customer_callback_log ccl WHERE ccl.customer_id = c.id ) = 0
AND ( SELECT count( * ) FROM customer_status_log csl WHERE csl.customer_id = c.id ) = 0
</if>
<if test="createrId != null and createrId != '' ">
AND c.creater =#{createrId}
</if>
</select>
......
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