|
@@ -226,27 +226,28 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
226
|
226
|
// 获取访问记录
|
227
|
227
|
List<Map<String, Object>> visitors = taUvMapper.getLastVisitors(CommConstant.FAVOR_CONSULTANT, person.getPersonId(), 10);
|
228
|
228
|
|
|
229
|
+ TaUser user = taUserService.getById(person.getUserId());
|
229
|
230
|
// 获取关联项目
|
230
|
|
- List<TaPersonBuilding> buildingList = getPersonBuildings(person.getPersonId());
|
|
231
|
+ List<TaPersonBuilding> buildingList = getPersonBuildings(user.getUserId().toString());
|
231
|
232
|
List<String> buildings = new ArrayList<>();
|
232
|
233
|
if (null != buildingList && buildingList.size() > 0) {
|
233
|
234
|
for(TaPersonBuilding b: buildingList) {
|
234
|
235
|
buildings.add(b.getBuildingId());
|
235
|
236
|
}
|
236
|
237
|
}
|
237
|
|
- TaUser user = taUserService.getById(person.getUserId());
|
|
238
|
+
|
238
|
239
|
Map<String, Object> result = new HashMap<>();
|
239
|
240
|
result.put("id", person.getPersonId());
|
240
|
241
|
result.put("name", user.getUserName());
|
241
|
242
|
result.put("company", user.getOrgName());
|
242
|
243
|
result.put("department", user.getDepartment());
|
243
|
|
- result.put("picture", user.getAvatar());
|
|
244
|
+ result.put("picture", person.getPhoto());
|
244
|
245
|
result.put("hotNum", person.getHotNum());
|
245
|
246
|
result.put("likeNum", person.getLikeNum());
|
246
|
247
|
result.put("pvNum", person.getPvNum());
|
247
|
248
|
result.put("post", person.getPost());
|
248
|
249
|
result.put("phone", person.getTel());
|
249
|
|
- result.put("avatar", person.getAvatarurl());
|
|
250
|
+ result.put("avatar",user.getAvatar());
|
250
|
251
|
result.put("visitors", visitors);
|
251
|
252
|
result.put("liked", false);
|
252
|
253
|
result.put("unReadNum", 0);
|
|
@@ -616,9 +617,9 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
616
|
617
|
return taPersonMapper.getPersonByOpenId(openid);
|
617
|
618
|
}
|
618
|
619
|
|
619
|
|
- public List<TaPersonBuilding> getPersonBuildings(String personId) {
|
|
620
|
+ public List<TaPersonBuilding> getPersonBuildings(String userId) {
|
620
|
621
|
QueryWrapper<TaPersonBuilding> queryWrapper = new QueryWrapper<>();
|
621
|
|
- queryWrapper.eq("person_id", personId);
|
|
622
|
+ queryWrapper.eq("user_id", userId);
|
622
|
623
|
return taPersonBuildingMapper.selectList(queryWrapper);
|
623
|
624
|
}
|
624
|
625
|
|
|
@@ -662,7 +663,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
662
|
663
|
@Override
|
663
|
664
|
public IPage<TaPerson> getDriftCustomerList (int pageNumber, int pageSize,String building, Integer orgId){
|
664
|
665
|
QueryWrapper<TaPerson> queryWrapper = new QueryWrapper<>();
|
665
|
|
- queryWrapper.isNull("person_type");
|
|
666
|
+ queryWrapper.eq("person_type",CommConstant.PERSON_ESTATE_DRIFT);
|
666
|
667
|
if(building.equals("") && null != building){
|
667
|
668
|
queryWrapper.eq("building_id",building);
|
668
|
669
|
}
|