傅行帆 3 anni fa
parent
commit
1012ecf1d2

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

@@ -260,18 +260,35 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
260 260
                 recommendCustomer.setRecommendPerson(customer.getRecommendPerson());
261 261
                 recommendCustomer.setVerifyStatus(CommConstant.VERIFY_DISAGREE);
262 262
                 recommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
263
+                recommendCustomer.setBuildingId(null);
264
+                recommendCustomer.setRealtyConsultant(null);
265
+                recommendCustomer.setRecommendPerson(null);
266
+                recommendCustomer.setEntryType(null);
263 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 289
             customer.setStatus(CommConstant.CHANNEL_CUSTOMER_DISAGREE);
267 290
             channelCustomerMapper.updateById(customer);
268 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 293
         return ResponseBean.error("无效操作", ResponseBean.ERROR_UNAVAILABLE);
277 294
     }