Browse Source

导出模版,导入线索客户修改

anderx 1 year ago
parent
commit
88842443a1

+ 3 - 2
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -464,9 +464,10 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/** 查看客户联系人列表 **/
 	@RequestMapping(value = "/findCustomerContacts", method = RequestMethod.GET)
-	public Result findCustomerContacts(String uid){
+	public Result findCustomerContacts(String uid,Integer type){
 		Result res = new Result();
-		res.setData(customerService.findCustomerContacts(uid));
+		if (type==null)type=0;
+		res.setData(customerService.findCustomerContacts(uid,type));
 		return res;
 	}
 

+ 1 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -169,7 +169,7 @@ public interface CustomerService {
 	 * @param uid
 	 * @return
 	 */
-	List<OrganizationContactBook> findCustomerContacts(String uid);
+	List<OrganizationContactBook> findCustomerContacts(String uid,Integer type);
 
 	/**
 	 * 添加拜访记录

+ 13 - 7
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -749,14 +749,20 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 
-	public List<OrganizationContactBook> findCustomerContacts(String uid) {
-		List<OrganizationContactBook> list = userMapper.findCustomerContacts(uid, TokenManager.getAdminId());
-		for (OrganizationContactBook ob : list) {
-			if (!ob.getAid().equals(TokenManager.getAdminId())){
-				ob.setName("***");
-				ob.setMobile("***");
-			}
+	public List<OrganizationContactBook> findCustomerContacts(String uid,Integer type) {
+		List<OrganizationContactBook> list=null;
+		if(type==0){
+			list = userMapper.findCustomerContacts(uid, TokenManager.getAdminId());
+//			for (OrganizationContactBook ob : list) {
+//				if (!ob.getAid().equals(TokenManager.getAdminId())){
+//					ob.setName("***");
+//					ob.setMobile("***");
+//				}
+//			}
+		}else {
+			list = userMapper.findCustomerContacts(uid, null);
 		}
+
 		return list;
 	}