|
@@ -15,13 +15,11 @@ import com.huiju.estateagents.common.StringUtils;
|
15
|
15
|
import com.huiju.estateagents.entity.TaBuilding;
|
16
|
16
|
import com.huiju.estateagents.entity.TaPerson;
|
17
|
17
|
import com.huiju.estateagents.entity.TaRecommendCustomer;
|
|
18
|
+import com.huiju.estateagents.entity.TdCity;
|
18
|
19
|
import com.huiju.estateagents.excel.AgentsRecommendCustomer;
|
19
|
20
|
import com.huiju.estateagents.excel.ExcelRecommendCustomer;
|
20
|
21
|
import com.huiju.estateagents.excel.ReporRecommendCustomer;
|
21
|
|
-import com.huiju.estateagents.mapper.TaBuildingMapper;
|
22
|
|
-import com.huiju.estateagents.mapper.TaPersonMapper;
|
23
|
|
-import com.huiju.estateagents.mapper.TaPersonVisitRecordMapper;
|
24
|
|
-import com.huiju.estateagents.mapper.TaRecommendCustomerMapper;
|
|
22
|
+import com.huiju.estateagents.mapper.*;
|
25
|
23
|
import com.huiju.estateagents.service.IMiniAppService;
|
26
|
24
|
import com.huiju.estateagents.service.ITaRecommendCustomerService;
|
27
|
25
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -63,6 +61,9 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
63
|
61
|
@Autowired
|
64
|
62
|
private TaBuildingMapper taBuildingMapper;
|
65
|
63
|
|
|
64
|
+ @Autowired
|
|
65
|
+ private TdCityMapper cityMapper;
|
|
66
|
+
|
66
|
67
|
@Override
|
67
|
68
|
public ResponseBean getMyCustList(String openid, String keywords, int pageNumber, int pageSize) {
|
68
|
69
|
List<TaPerson> taPersons = getPersonsByOpenId(openid);
|
|
@@ -437,13 +438,24 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
437
|
438
|
public TaRecommendCustomer getCustomerDetail(String customerId){
|
438
|
439
|
String personId = taRecommendCustomerMapper.getCustomerById(customerId).getPersonId();
|
439
|
440
|
TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId,personId);
|
|
441
|
+ TaPerson person = taPersonMapper.selectById(personId);
|
440
|
442
|
if(!StringUtils.isEmpty(personId)){
|
441
|
443
|
taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(personId));
|
442
|
444
|
taRecommendCustomer.setVisitTimes(taPersonVisitRecordMapper.visitRecordByPersonId(personId).size());
|
|
445
|
+ Map<String,String>geoInfo = new HashMap<>();
|
|
446
|
+ geoInfo.put("provience",person.getProvince());
|
|
447
|
+ geoInfo.put("country",person.getCountry());
|
|
448
|
+ TdCity city = cityMapper.selectById(person.getCity());
|
|
449
|
+ if(null!=city){
|
|
450
|
+ geoInfo.put("city",city.getName());
|
|
451
|
+ }else {
|
|
452
|
+ geoInfo.put("city","未知");
|
|
453
|
+ }
|
|
454
|
+ taRecommendCustomer.setGeoInfo(geoInfo);
|
443
|
455
|
}
|
444
|
456
|
if(!StringUtils.isEmpty(taRecommendCustomer.getRealtyConsultant())){
|
445
|
457
|
TaPerson consultant = taPersonMapper.getById(taRecommendCustomer.getRealtyConsultant());
|
446
|
|
- consultant.setProjects(taPersonMapper.getUserProjects(consultant.getPersonId()));
|
|
458
|
+ consultant.setProjects(taPersonMapper.getUserProjects(consultant.getUserId()));
|
447
|
459
|
taRecommendCustomer.setConsultant(consultant);
|
448
|
460
|
}
|
449
|
461
|
return taRecommendCustomer;
|