|
|
@@ -257,6 +257,7 @@ from ( select
|
|
|
( select aid, count( aid ) as count1
|
|
|
from user
|
|
|
where aid is not null and aid !=''
|
|
|
+ and share_type=0
|
|
|
group by aid
|
|
|
) y left join admin z on
|
|
|
y.aid = z.id
|
|
|
@@ -348,7 +349,8 @@ from(
|
|
|
select a.id,sum(e.privateCustomersCount) as privateCustomersCount
|
|
|
from admin a left join user_role b
|
|
|
on a.id=b.uid left join role c
|
|
|
- on b.rid=c.id left join (select aid,count(0) as privateCustomersCount from user group by aid)e
|
|
|
+ on b.rid=c.id left join (select aid,count(0) as privateCustomersCount from user where aid is not null and aid !=''
|
|
|
+ and share_type=0 group by aid)e
|
|
|
on a.id=e.aid where c.role_name in ('营销员','营销经理','营销管理员')
|
|
|
<if test="depId != null">
|
|
|
and a.department_id = #{depId,jdbcType=VARCHAR}
|
|
|
@@ -424,6 +426,7 @@ from ( select
|
|
|
( select aid, count( aid ) as count1
|
|
|
from user
|
|
|
where aid is not null and aid !=''
|
|
|
+ and share_type=0
|
|
|
group by aid
|
|
|
) y left join admin z on
|
|
|
y.aid = z.id
|