傅行帆 3 years ago
parent
commit
1012ecf1d2

+ 24
- 7
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java View File

260
                 recommendCustomer.setRecommendPerson(customer.getRecommendPerson());
260
                 recommendCustomer.setRecommendPerson(customer.getRecommendPerson());
261
                 recommendCustomer.setVerifyStatus(CommConstant.VERIFY_DISAGREE);
261
                 recommendCustomer.setVerifyStatus(CommConstant.VERIFY_DISAGREE);
262
                 recommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
262
                 recommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
263
+                recommendCustomer.setBuildingId(null);
264
+                recommendCustomer.setRealtyConsultant(null);
265
+                recommendCustomer.setRecommendPerson(null);
266
+                recommendCustomer.setEntryType(null);
263
                 taRecommendCustomerMapper.updateById(recommendCustomer);
267
                 taRecommendCustomerMapper.updateById(recommendCustomer);
264
-
268
+            }else {
269
+                TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
270
+                taRecommendCustomer.setName(customer.getName());
271
+                taRecommendCustomer.setPicture(customer.getPicture());
272
+                taRecommendCustomer.setPhone(customer.getPhone());
273
+                taRecommendCustomer.setSex(customer.getSex());
274
+                taRecommendCustomer.setRecommendPerson(null);
275
+                taRecommendCustomer.setBuildingId(null);
276
+                taRecommendCustomer.setReportRecommendStatus(CommConstant.RECOMMENDED);
277
+                taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
278
+                taRecommendCustomer.setCreateDate(LocalDateTime.now());
279
+                taRecommendCustomer.setReportDate(LocalDateTime.now());
280
+                taRecommendCustomer.setOrgId(customer.getOrgId());
281
+                taRecommendCustomer.setPersonId(customer.getPersonId());
282
+                taRecommendCustomer.setEntryType(null);
283
+                taRecommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
284
+                taRecommendCustomer.setRealtyConsultant(null);
285
+                taRecommendCustomer.setCirculationTime(LocalDateTime.now());
286
+                taRecommendCustomerMapper.insert(taRecommendCustomer);
287
+                customer.setCustomerId(taRecommendCustomer.getCustomerId());
265
             }
288
             }
266
             customer.setStatus(CommConstant.CHANNEL_CUSTOMER_DISAGREE);
289
             customer.setStatus(CommConstant.CHANNEL_CUSTOMER_DISAGREE);
267
             channelCustomerMapper.updateById(customer);
290
             channelCustomerMapper.updateById(customer);
268
             return ResponseBean.success("审核成功");
291
             return ResponseBean.success("审核成功");
269
-        }else if ("customer".equals(params.getType())) {
270
-            // 置业顾问 经纪人推荐的客户
271
-            TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectById(params.getId());
272
-            taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_DISAGREE);
273
-            taRecommendCustomerMapper.updateById(taRecommendCustomer);
274
-            return ResponseBean.success("审核成功");
275
         }
292
         }
276
         return ResponseBean.error("无效操作", ResponseBean.ERROR_UNAVAILABLE);
293
         return ResponseBean.error("无效操作", ResponseBean.ERROR_UNAVAILABLE);
277
     }
294
     }