wanghui лет назад: 7
Родитель
Сommit
0f549d83b7

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

@@ -736,6 +736,7 @@
 	<select id="selectFollowHistoryList" resultType="com.goafanti.customer.bo.FollowListBo">
 		select 
 			a.id as followId,
+			a.aid,
 			a.create_time as followTime,
 			a.contact_type as contactType,
 			a.result, 

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

@@ -4,6 +4,9 @@ public class FollowListBo {
 	/** 跟进记录ID **/
 	private String followId;
 	
+	/** 管理员ID **/
+	private String aid;
+	
 	/** 跟进时间  **/
 	private String followTime;
 	
@@ -34,12 +37,20 @@ public class FollowListBo {
 	/** 客户状态 **/
 	private String customerStatus;
 	
+	/** 是否拜访只读 **/
+	private Integer readOnly;
 	public String getFollowId() {
 		return followId;
 	}
 	public void setFollowId(String followId) {
 		this.followId = followId;
 	}
+	public String getAid() {
+		return aid;
+	}
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
 	public String getFollowTime() {
 		return followTime;
 	}
@@ -100,4 +111,10 @@ public class FollowListBo {
 	public void setCustomerStatus(String customerStatus) {
 		this.customerStatus = customerStatus;
 	}
+	public Integer getReadOnly() {
+		return readOnly;
+	}
+	public void setReadOnly(Integer readOnly) {
+		this.readOnly = readOnly;
+	}
 }

+ 11 - 2
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -329,7 +329,17 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(StringUtils.isNotBlank(uid))params.put("uid", uid);
 		if(StringUtils.isNotBlank(businessProjectId)) params.put("businessProjectId", businessProjectId);
-		return (Pagination<FollowListBo>)findPage("selectFollowHistoryList","selectFollowHistoryCount",params, pageNo, pageSize);
+		Pagination<FollowListBo> page = (Pagination<FollowListBo>)findPage("selectFollowHistoryList","selectFollowHistoryCount",params, pageNo, pageSize);
+		List<FollowListBo> list = (List<FollowListBo>)page.getList();
+		for(FollowListBo bo : list){
+			if(bo.getAid().equals(TokenManager.getAdminId())){
+				bo.setReadOnly(AFTConstants.NO);
+			}else{
+				bo.setReadOnly(AFTConstants.YES);
+			} 
+		}
+		page.setList(list);
+		return page;
 	}
 
 	@Override
@@ -345,7 +355,6 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 
 	@Override
 	public List<OrganizationContactBook> findCustomerContacts(String uid) {
-		
 		return userMapper.findCustomerContacts(uid,TokenManager.getAdminId());
 	}