Browse Source

客户资料列表新增是否面谈筛选

anderx 7 years ago
parent
commit
60a9b62491

+ 12 - 0
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -1702,11 +1702,17 @@
 			on b.location_province=c.id left join district_glossory c1 
 			on b.location_city=c1.id left join district_glossory c2 
 			on b.location_area=c2.id left join industry_category d on b.industry = d.id
+			<if test="follow ==1">
+			left join (select aid,uid,contact_type from user_follow where aid= #{aid,jdbcType=VARCHAR} and contact_type=0 group by uid) e on a.id=e.uid and a.aid=e.aid
+			</if>
 			where  a.status=0 
 			and a.information_maintainer = #{aid,jdbcType=VARCHAR}
 			<if test="type !=null and type!=''">
 			and a.`type`=#{type,jdbcType=VARCHAR}
 			</if>
+			<if test="follow ==1">
+			and e.contact_type=0
+			</if>
 			<if test="name!=null and name!=''">
 			and a.nickname like concat('%',#{name,jdbcType=VARCHAR},'%')
 			</if>
@@ -1750,10 +1756,16 @@
 		select count(0)
 			from user a left join organization_identity b 
 			on a.id=b.uid 
+			<if test="follow ==1">
+			left join (select aid,uid,contact_type from user_follow where aid= #{aid,jdbcType=VARCHAR} and contact_type=0 group by uid) e on a.id=e.uid and a.aid=e.aid
+			</if>
 			where  a.status=0 and a.information_maintainer = #{aid,jdbcType=VARCHAR}
 			<if test="type !=null and type!=''">
 			and a.`type`=#{type,jdbcType=VARCHAR}
 			</if>
+			<if test="follow ==1">
+			and e.contact_type=0
+			</if>
 			<if test="name!=null and name!=''">
 			and a.nickname like concat('%',#{name,jdbcType=VARCHAR},'%')
 			</if>

+ 10 - 0
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -59,6 +59,8 @@ public class CustomerListIn {
 
 	private String level;
 	
+	private String follow;
+	
 	
 	public String getType() {
 		return type;
@@ -219,4 +221,12 @@ public class CustomerListIn {
 	public void setLevel(String level) {
 		this.level = level;
 	}
+
+	public String getFollow() {
+		return follow;
+	}
+
+	public void setFollow(String follow) {
+		this.follow = follow;
+	}
 }

+ 1 - 0
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -205,6 +205,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		if(StringUtils.isNotBlank(cli.getDepartmentId())) params.put("departmentId", cli.getDepartmentId());
 		if(StringUtils.isNotBlank(cli.getStatus())) params.put("status", Integer.parseInt(cli.getStatus()));
 		if(StringUtils.isNotBlank(cli.getSocietyTag())) params.put("societyTag", cli.getSocietyTag());
+		if(StringUtils.isNotBlank(cli.getFollow())) params.put("follow", cli.getFollow());
 		if(StringUtils.isNotBlank(cli.getStartDate())) params.put("startDate", cli.getStartDate()+" 00:00:00");
 		if(StringUtils.isNotBlank(cli.getEndDate())) params.put("endDate", cli.getEndDate()+" 23:59:59");
 		if(null!=cli.getDataGrade()) params.put("dataGrade", cli.getDataGrade());