Browse Source

多API接口字段更换

anderx 4 years ago
parent
commit
ff226f35e2

+ 19 - 17
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -338,6 +338,7 @@
 			a.channel ,
 			a.information_maintainer as mid 		
 		from `user` a 
+		left join user_names un on a.id=un.uid 
 		left join organization_identity b on a.id = b.uid
 		left join district_glossory dg1 on b.location_province = dg1.id
 		left join district_glossory dg2 on b.location_city = dg2.id
@@ -345,7 +346,7 @@
 		left join admin d on a.aid = d.id 
 		where a.type = 1 and a.status != 1
 	<if test="role == 0">
-		and a.nickname = #{name}
+		and un.name = #{name}
 	</if>
 	<if test="role == 1">
 		and a.nickname like concat('%', #{name},'%')
@@ -379,6 +380,7 @@
 		select 
 			count(0)
 		from user a 
+		left join user_names un on a.id=un.uid 
 		left join organization_identity b on a.id = b.uid
 		<if test="departmentId != null and departmentId !=''">
 		INNER join (select id
@@ -387,11 +389,11 @@
 		</if>
 		where a.type = 1 and a.status != 1
 		<if test="role == 0">
-		and a.identify_name = #{name}
+		and un.name = #{name}
 	</if>
 	<if test="role == 1">
-		and a.identify_name like concat('%', #{name},'%')
-	</if>
+		and a.nickname like concat('%', #{name},'%')
+	</if>	
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -495,7 +497,7 @@
 			 </if>
 		</if>
 		<if test="name != null and name != ''">
-			and a.identify_name like concat('%',#{name},'%')
+			and a.nickname like concat('%',#{name},'%')
 		</if>
 		<if test="startDate != null and startDate != ''">
 			and a.transfer_time &gt; #{startDate}
@@ -537,7 +539,7 @@
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
 		<if test="name != null and name != ''">
-			and a.identify_name like concat('%',#{name},'%')
+			and a.nickname like concat('%',#{name},'%')
 		</if>	
 		<if test="startDate != null and startDate != ''">
 			and a.transfer_time &gt; #{startDate}
@@ -582,7 +584,7 @@
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
 		<if test="name != null and name != ''">
-			and a.identify_name like concat('%',#{name},'%')
+			and a.nickname like concat('%',#{name},'%')
 		</if>	
 		<if test="startDate != null and startDate != ''">
 			and a.transfer_time &gt; #{startDate}
@@ -687,7 +689,7 @@
 	</select>
 	
 	<select id="findCustomerByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
-		select id,identify_name as name from user where identify_name like
+		select id,nickname as name from user where identify_name like
 		concat('%',#{identifyName},'%') and status <![CDATA[!= ]]> 1 and audit_status = 1
 	</select>
 	
@@ -794,7 +796,7 @@
 	
 	<select id="selectFollowHistoryList" resultType="com.goafanti.customer.bo.FollowListBo">
 		select a.id as followId, a.aid,date_format( a.create_time,'%Y-%m-%d %H:%i:%S') as followTime, a.contact_type as contactType,
-			a.result,a.guidance, b.identify_name as identifyName, c.name as contacts, c.mobile as contactMobile,
+			a.result,a.guidance, b.nickname,b.identify_name as identifyName, c.name as contacts, c.mobile as contactMobile,
 			d.name as adminName,date_format(a.guidance_time,'%Y-%m-%d %H:%i:%S') as guidanceTime
 		<if test="businessProjectId != null and businessProjectId != ''"><!--  客户甲项目A所有的跟进记录 -->
 			,e.id as ufbId,e.follow_situation as followSituation,e.customer_status as customerStatus
@@ -862,7 +864,7 @@
 	
 	<select id="findCustomerContacts" parameterType="java.lang.String" resultType="com.goafanti.common.model.OrganizationContactBook">
 	select a.id,a.name,a.mobile,a.email,a.qq,a.wechat,a.department,a.position,a.major,a.fixed_tel fixedTel,a.aname,b.location_province,
-	d1.name provinceName,d2.name cityName,d3.name areaName,date_format(a.create_time,'%Y-%m-%d')createTimes,aid 
+	d1.name provinceName,d2.name cityName,d3.name areaName,date_format(a.create_time,'%Y-%m-%d')createTimes,a.aid 
 	from organization_contact_book a 
 	left join organization_identity b on a.uid=b.uid left join district_glossory d1 on b.location_province=d1.id 
 	left join district_glossory d2 on b.location_city=d2.id left join district_glossory d3 on b.location_area=d3.id 
@@ -1427,7 +1429,7 @@
 			a.type,
 			a.status, 
 			date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
-			a.identify_name as name,
+			a.nickname as name,
 			a.society_tag as societyTag,
 			share_type as shareType,
 			b.contacts,
@@ -1449,7 +1451,7 @@
 			and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
 		</if>
 		<if test="name != null and name != ''">
-			and a.identify_name like concat('%',#{name},'%')
+			and a.nickname like concat('%',#{name},'%')
 		</if>
 		<if test="shareType != null">
 			and a.share_type = #{shareType,jdbcType=VARCHAR}
@@ -1491,7 +1493,7 @@
 			and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
 		</if>
 		<if test="name != null and name != ''">
-			and a.identify_name like concat('%',#{name},'%')
+			and a.nickname like concat('%',#{name},'%')
 		</if>
 		<if test="shareType != null">
 			and a.share_type = #{shareType,jdbcType=VARCHAR}
@@ -1637,14 +1639,14 @@
     </select>
     
     <select id="selectPrivateCustomerByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
-		select b.id,b.identify_name as name from 
+		select b.id,b.nickname as name from 
 			(select uid from user_lock_release  where type = 0  and status = 0 and aid = #{aid} group by uid) a
 		inner join user b on a.uid = b.id
-			where b.status != 1 and b.channel =0 and b.identify_name like concat('%',#{name},'%')
+			where b.status != 1 and b.channel =0 and b.nickname like concat('%',#{name},'%')
     </select>
     
     <select id="selectSignedCustomerByName"  resultType="com.goafanti.customer.bo.CustomerSimpleBo">
-   	 	select b.id,b.identify_name as name from user b  
+   	 	select b.id,b.nickname as name from user b  
 	where b.status != 1
 	<if test="type==2">
 	and b.channel=1
@@ -1652,7 +1654,7 @@
 	<if test="type==1">
 	and b.share_type=2
 	</if>  
-	and b.aid = #{aid}  and b.identify_name like concat('%',#{name},'%')
+	and b.aid = #{aid}  and b.nickname like concat('%',#{name},'%')
     </select>
     
     <update id="updateReleaseLock" parameterType="java.lang.String">

+ 7 - 0
src/main/java/com/goafanti/customer/bo/FollowListBo.java

@@ -12,6 +12,7 @@ public class FollowListBo {
 	
 	/** 客户名 **/
 	private String identifyName;
+	private String nickname;
 	
 	/** 联系人 **/
 	private String contacts;
@@ -134,4 +135,10 @@ public class FollowListBo {
 	public void setGuidanceTime(String guidanceTime) {
 		this.guidanceTime = guidanceTime;
 	}
+	public String getNickname() {
+		return nickname;
+	}
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
 }

+ 18 - 14
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -96,6 +96,14 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
+	/** 签单的个人客户 **/
+	@RequestMapping(value = "/listSignPersonalCustomer", method = RequestMethod.POST)
+	public Result listSignPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listSignPersonalCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+	
 	/** 管理个人客户查询 **/
 	@RequestMapping(value = "/listAllManagePersonalCustomer" , method = RequestMethod.POST)
 	public Result listAllManagePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
@@ -115,6 +123,14 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
+	/** 个人客户详情信息 **/
+	@RequestMapping(value = "/findPersonalCustomerDetail" ,method = RequestMethod.GET)
+	public Result findPersonalCustomerDetail(String uid){
+		Result res = new Result();
+		res.setData(customerService.findPersonalCustomerDetail(uid));
+		return res;
+	}
+	
 	/**
 	 *  私有单位客户列表
 	 *  私有客户列表 
@@ -202,13 +218,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
-	/** 签单的个人客户 **/
-	@RequestMapping(value = "/listSignPersonalCustomer", method = RequestMethod.POST)
-	public Result listSignPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listSignPersonalCustomer(cli, pageNo, pageSize));
-		return res;
-	}
+	
 	/** 签单客户转交 **/
 	@RequestMapping(value = "/customerHandOver", method = RequestMethod.POST)
 	public Result listSignPersonalCustomer(String userIds ,String receiveId){
@@ -275,13 +285,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
-	/** 个人客户详情信息 **/
-	@RequestMapping(value = "/findPersonalCustomerDetail" ,method = RequestMethod.GET)
-	public Result findPersonalCustomerDetail(String uid){
-		Result res = new Result();
-		res.setData(customerService.findPersonalCustomerDetail(uid));
-		return res;
-	}
+	
 	
 	/** 单位客户详情信息 **/
 	@RequestMapping(value = "/findOrganizationCustomerDetail", method = RequestMethod.GET)

+ 4 - 2
src/main/resources/props/config_local.properties

@@ -68,6 +68,10 @@ avatar.upload.host=//sb.jishutao.com/upload
 #static.host=//172.16.0.253/1.1.74
 #avatar.host=//172.16.0.253
 
+
+avatar.host=//static.jishutao.com
+static.host=//static.jishutao.com/1.1.76
+
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
 #developer为开发版;trial为体验版;formal为正式版;
@@ -75,8 +79,6 @@ wx.state=trial
 
 
 •
-avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.75
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -60,7 +60,7 @@ user.private.max=1000
 #客户释放提醒
 user_remind_days=15
 
-static.host=//static.jishutao.com/1.1.75
+static.host=//static.jishutao.com/1.1.76
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload