魏超 преди 5 години
родител
ревизия
b4f43adaa5
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4
    3
      src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java

+ 4
- 3
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java Целия файл

25
 import org.springframework.beans.factory.annotation.Autowired;
25
 import org.springframework.beans.factory.annotation.Autowired;
26
 import org.springframework.stereotype.Service;
26
 import org.springframework.stereotype.Service;
27
 
27
 
28
+import java.util.Collections;
28
 import java.util.List;
29
 import java.util.List;
29
 
30
 
30
 /**
31
 /**
196
 			QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper();
197
 			QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper();
197
 			queryWrapper.eq("realty_consultant",e.getConsultantId());
198
 			queryWrapper.eq("realty_consultant",e.getConsultantId());
198
 			queryWrapper.eq("person_id",e.getPersonId());
199
 			queryWrapper.eq("person_id",e.getPersonId());
199
-			TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectOne(queryWrapper);
200
-			if (null != taRecommendCustomer){
200
+			List<TaRecommendCustomer> taRecommendCustomers = taRecommendCustomerMapper.selectList(queryWrapper);
201
+			if (taRecommendCustomers.size() > 0){
201
 				//1是我的客户
202
 				//1是我的客户
202
 				e.setMyCustomer(CommConstant.STATUS_NORMAL);
203
 				e.setMyCustomer(CommConstant.STATUS_NORMAL);
203
 				//返回customer_id给微信端
204
 				//返回customer_id给微信端
204
-				e.setCustomerId(taRecommendCustomer.getCustomerId());
205
+				e.setCustomerId(taRecommendCustomers.get(0).getCustomerId());
205
 			}
206
 			}
206
 		});
207
 		});
207
 		return result;
208
 		return result;