|
@@ -881,7 +881,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
881
|
881
|
|
882
|
882
|
// 3. 处理推广人
|
883
|
883
|
TaPerson recPerson = taPersonMapper.getById(promoter);
|
884
|
|
- if (CommConstant.STATUS_DELETE.equals(recPerson.getStatus())) {
|
|
884
|
+ if (recPerson != null && CommConstant.STATUS_DELETE.equals(recPerson.getStatus())) {
|
885
|
885
|
recPerson = null;
|
886
|
886
|
}
|
887
|
887
|
|
|
@@ -916,6 +916,11 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
916
|
916
|
}
|
917
|
917
|
}
|
918
|
918
|
|
|
919
|
+ // 没有置业, 也没楼盘
|
|
920
|
+ if (recPerson == null || taBuilding == null) {
|
|
921
|
+ return ;
|
|
922
|
+ }
|
|
923
|
+
|
919
|
924
|
// 3. 处理客户, 没有新增一条记录, 有就依据手机号建立关联
|
920
|
925
|
TaRecommendCustomer customer = mergeCustomerByPhone(person, taUser, taBuilding, isAssociated, now);
|
921
|
926
|
|
|
@@ -974,7 +979,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
974
|
979
|
customer.setRealtyConsultant(taUser.getUserId().toString());
|
975
|
980
|
}
|
976
|
981
|
|
977
|
|
- if (isAssociated || null == taUser) {
|
|
982
|
+ if (null != building && (isAssociated || null == taUser)) {
|
978
|
983
|
customer.setBuildingId(building.getBuildingId());
|
979
|
984
|
customer.setIntention(building.getBuildingName());
|
980
|
985
|
}
|
|
@@ -992,7 +997,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
992
|
997
|
customer.setRealtyConsultant(taUser.getUserId().toString());
|
993
|
998
|
}
|
994
|
999
|
|
995
|
|
- if (isAssociated || null == taUser) {
|
|
1000
|
+ if (building != null && (isAssociated || null == taUser)) {
|
996
|
1001
|
if (StringUtils.isEmpty(customer.getBuildingId())) {
|
997
|
1002
|
customer.setBuildingId(building.getBuildingId());
|
998
|
1003
|
}
|