Browse Source

客户资料报表去处已锁定和注销营销员的数据

anderx 7 years ago
parent
commit
5a046ee78f
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

+ 4 - 2
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -1972,8 +1972,9 @@ inner join(
 	left join (select x.aid,count(1)as count from (select x1.aid,x1.uid from user_lock_release x1
 				left join user y on x1.uid=y.id where x1.type=1 
 				and x1.status=0 and y.integrity=1 group by aid,uid)x group by aid) i on a.id=i.aid
+	where a.status='正常'
 	<if test="depId!=null and depId!=''">
-	where a.department_id=	#{depId,jdbcType=VARCHAR}
+	and a.department_id=	#{depId,jdbcType=VARCHAR}
 	</if>
 	</select>
 	<select id="userDataStatisticsCount" resultType="com.goafanti.report.bo.userDataListBo">
@@ -1996,8 +1997,9 @@ inner join(
 	left join (select x.aid,count(1)as count from (select x1.aid,x1.uid from user_lock_release x1
 				left join user y on x1.uid=y.id where x1.type=1 
 				and x1.status=0 and y.integrity=1 group by aid,uid)x group by aid) i on a.id=i.aid
+	where a.status='正常'
 	<if test="depId!=null and depId!=''">
-	where a.department_id=	#{depId,jdbcType=VARCHAR}
+	and a.department_id=	#{depId,jdbcType=VARCHAR}
 	</if>				
 	)z
 	</select>