|
@@ -340,6 +340,10 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
340
|
340
|
return ResponseBean.error("置业顾问不存在或已被注销", ResponseBean.ERROR_UNAVAILABLE);
|
341
|
341
|
}
|
342
|
342
|
|
|
343
|
+ // 如果置业顾问还没有绑定小程序
|
|
344
|
+ if (null == consultantPerson) {
|
|
345
|
+ consultantPerson = new TaPerson();
|
|
346
|
+ }
|
343
|
347
|
|
344
|
348
|
TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
|
345
|
349
|
taRecommendCustomer.setOrgId(orgId);
|
|
@@ -352,7 +356,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
352
|
356
|
//如果没有传building_id的情况构造building_id
|
353
|
357
|
if (StringUtils.isEmpty(params.getString("buildingId")) && !StringUtils.isEmpty(params.getString("realtyConsultant"))){
|
354
|
358
|
QueryWrapper<TaPersonBuilding> taPersonBuildingQueryWrapper = new QueryWrapper<>();
|
355
|
|
- taPersonBuildingQueryWrapper.eq("person_id",params.getString("realtyConsultant")).or().eq("user_id",params.getString("realtyConsultant"));
|
|
359
|
+ taPersonBuildingQueryWrapper.eq("person_id", consultantPerson.getPersonId()).or().eq("user_id", consultantUser.getUserId());
|
356
|
360
|
List<TaPersonBuilding> taPersonBuildingList = taPersonBuildingMapper.selectList(taPersonBuildingQueryWrapper);
|
357
|
361
|
if (taPersonBuildingList.size() > 0){
|
358
|
362
|
params.put("buildingId",taPersonBuildingList.get(0).getBuildingId());
|