张延森 3 years ago
parent
commit
d740ecbb66

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

325
             TaRecommendCustomer customer = copyFromPerosn(person, new TaRecommendCustomer());
325
             TaRecommendCustomer customer = copyFromPerosn(person, new TaRecommendCustomer());
326
             fillSomeFieldsOfCustomer(customer, recommender, now);
326
             fillSomeFieldsOfCustomer(customer, recommender, now);
327
             customer.setBuildingId(building.getBuildingId());
327
             customer.setBuildingId(building.getBuildingId());
328
-            customer.setInstitutionId(getInstitutionId(building.getBuildingId()));
328
+//            customer.setInstitutionId(getInstitutionId(building.getBuildingId()));
329
+            customer.setInstitutionId(building.getInstitutionId());
329
             taRecommendCustomerMapper.insert(customer);
330
             taRecommendCustomerMapper.insert(customer);
330
             result.add(customer);
331
             result.add(customer);
331
 
332
 
354
         if (!hasOrgCust && null == consultant) {
355
         if (!hasOrgCust && null == consultant) {
355
             TaRecommendCustomer customer = copyFromPerosn(person, new TaRecommendCustomer());
356
             TaRecommendCustomer customer = copyFromPerosn(person, new TaRecommendCustomer());
356
             fillSomeFieldsOfCustomer(customer, recommender, now);
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
             taRecommendCustomerMapper.insert(customer);
363
             taRecommendCustomerMapper.insert(customer);
359
             result.add(customer);
364
             result.add(customer);
360
 
365