张延森 3 anni fa
parent
commit
d740ecbb66

+ 7
- 2
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java Vedi File

@@ -325,7 +325,8 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
325 325
             TaRecommendCustomer customer = copyFromPerosn(person, new TaRecommendCustomer());
326 326
             fillSomeFieldsOfCustomer(customer, recommender, now);
327 327
             customer.setBuildingId(building.getBuildingId());
328
-            customer.setInstitutionId(getInstitutionId(building.getBuildingId()));
328
+//            customer.setInstitutionId(getInstitutionId(building.getBuildingId()));
329
+            customer.setInstitutionId(building.getInstitutionId());
329 330
             taRecommendCustomerMapper.insert(customer);
330 331
             result.add(customer);
331 332
 
@@ -354,7 +355,11 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
354 355
         if (!hasOrgCust && null == consultant) {
355 356
             TaRecommendCustomer customer = copyFromPerosn(person, new TaRecommendCustomer());
356 357
             fillSomeFieldsOfCustomer(customer, recommender, now);
357
-            customer.setInstitutionId(getInstitutionId(building.getBuildingId()));
358
+            if (null != building) {
359
+                customer.setInstitutionId(building.getInstitutionId());
360
+            } else {
361
+                customer.setInstitutionId("1");
362
+            }
358 363
             taRecommendCustomerMapper.insert(customer);
359 364
             result.add(customer);
360 365