|
@@ -174,7 +174,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
174
|
174
|
}
|
175
|
175
|
|
176
|
176
|
@Override
|
177
|
|
- public List<TaRecommendCustomer> newCustomer(Integer orgId, TaPerson person, TaPerson recommender, TaUser consultant, TaBuilding building, TaCustomerFrom from) throws Exception {
|
|
177
|
+ public List<TaRecommendCustomer> newCustomer(Integer orgId, TaPerson person, TaPerson recommender, TaPerson consultant, TaBuilding building, TaCustomerFrom from) throws Exception {
|
178
|
178
|
// 如果置业推荐了非自己绑定楼盘, 会生成 2 条客户记录
|
179
|
179
|
List<TaRecommendCustomer> result = new ArrayList<>();
|
180
|
180
|
List<TaBuilding> consultBuildings = null;
|
|
@@ -186,11 +186,17 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
186
|
186
|
}
|
187
|
187
|
}
|
188
|
188
|
|
|
189
|
+ //
|
|
190
|
+ LocalDateTime now = LocalDateTime.now();
|
|
191
|
+ from.setOrgId(orgId);
|
|
192
|
+ from.setPersonId(person.getPersonId());
|
|
193
|
+ from.setPersonName(StringUtils.ifNull(person.getName(), person.getNickname()));
|
|
194
|
+ from.setCreateDate(now);
|
|
195
|
+
|
189
|
196
|
Map<String, Number> checkNum = taRecommendCustomerMapper.checkCustomerBy(orgId, person.getPersonId(), consultBuildingIds, null != building ? building.getBuildingId() : null);
|
190
|
197
|
boolean hasOrgCust = checkNum.get("orgNum").intValue() > 0;
|
191
|
198
|
boolean hasConsultCust = checkNum.get("consultNum").intValue() > 0;
|
192
|
199
|
boolean hasBuildingCust = checkNum.get("buildingNum").intValue() > 0;
|
193
|
|
- LocalDateTime now = LocalDateTime.now();
|
194
|
200
|
|
195
|
201
|
// 控制是否需要插入小程序级别公客
|
196
|
202
|
boolean inserted = false;
|