|
@@ -64,7 +64,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
64
|
64
|
|
65
|
65
|
@Autowired
|
66
|
66
|
private TdCityMapper cityMapper;
|
67
|
|
-
|
|
67
|
+
|
68
|
68
|
@Autowired
|
69
|
69
|
private TaCustomerFollowUpRecordMapper customerFollowUpRecordMapper;
|
70
|
70
|
|
|
@@ -217,7 +217,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
217
|
217
|
}
|
218
|
218
|
|
219
|
219
|
@Override
|
220
|
|
- public synchronized ResponseBean recommendCust(String paramStr, String openid,Integer orgId) {
|
|
220
|
+ public synchronized ResponseBean recommendCust(String paramStr, String openid, Integer orgId) {
|
221
|
221
|
JSONObject params = JSONObject.parseObject(paramStr);
|
222
|
222
|
if (null == params) {
|
223
|
223
|
return ResponseBean.error("解析参数失败", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
@@ -233,8 +233,17 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
233
|
233
|
return ResponseBean.error(checkResult, ResponseBean.ERROR_MISSING_PARAMS);
|
234
|
234
|
}
|
235
|
235
|
|
236
|
|
- TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
|
|
236
|
+ // 报备有 10 天有效期
|
|
237
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
|
238
|
+ queryWrapper.eq("phone", params.getString("phone"));
|
|
239
|
+ queryWrapper.eq("building_id", params.getString("intention"));
|
|
240
|
+ queryWrapper.in("verify_status", CommConstant.VERIFY_AGREE, CommConstant.VERIFY_READY);
|
|
241
|
+ List<TaRecommendCustomer> result = taRecommendCustomerMapper.selectList(queryWrapper);
|
|
242
|
+ if (null != result && result.size() > 0) {
|
|
243
|
+ return ResponseBean.error("当前客户已被推荐, 不能再次推荐", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
244
|
+ }
|
237
|
245
|
|
|
246
|
+ TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
|
238
|
247
|
taRecommendCustomer.setName(params.getString("name"));
|
239
|
248
|
taRecommendCustomer.setPicture(params.getString("picture"));
|
240
|
249
|
taRecommendCustomer.setPhone(params.getString("phone"));
|
|
@@ -248,11 +257,11 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
248
|
257
|
taRecommendCustomer.setCreateDate(LocalDateTime.now());
|
249
|
258
|
taRecommendCustomer.setReportDate(LocalDateTime.now());
|
250
|
259
|
taRecommendCustomer.setOrgId(orgId);
|
251
|
|
- QueryWrapper<TaPerson> personQueryWrapper = new QueryWrapper<>();
|
252
|
|
- personQueryWrapper.eq("org_id",orgId);
|
253
|
|
- personQueryWrapper.eq("phone",params.getString("phone"));
|
|
260
|
+ QueryWrapper<TaPerson> personQueryWrapper = new QueryWrapper<>();
|
|
261
|
+ personQueryWrapper.eq("org_id", orgId);
|
|
262
|
+ personQueryWrapper.eq("phone", params.getString("phone"));
|
254
|
263
|
TaPerson currentPerson = taPersonMapper.selectOne(personQueryWrapper);
|
255
|
|
- if(null != currentPerson){
|
|
264
|
+ if (null != currentPerson) {
|
256
|
265
|
taRecommendCustomer.setPersonId(currentPerson.getPersonId());
|
257
|
266
|
}
|
258
|
267
|
|
|
@@ -277,24 +286,14 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
277
|
286
|
|
278
|
287
|
String status = params.getString("status");
|
279
|
288
|
int statusInt = 0;
|
280
|
|
- if (StringUtils.isEmpty(status)){
|
|
289
|
+ if (StringUtils.isEmpty(status)) {
|
281
|
290
|
taRecommendCustomer.setStatus(statusInt);
|
282
|
|
- }else{
|
|
291
|
+ } else {
|
283
|
292
|
taRecommendCustomer.setStatus(Integer.parseInt(status));
|
284
|
293
|
}
|
285
|
294
|
|
286
|
295
|
taRecommendCustomer.setRecommendPerson(taPerson.getPersonId());
|
287
|
296
|
|
288
|
|
- // 报备有 10 天有效期
|
289
|
|
- QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
290
|
|
- queryWrapper.eq("phone", taRecommendCustomer.getPhone());
|
291
|
|
- queryWrapper.eq("building_id",taRecommendCustomer.getBuildingId());
|
292
|
|
- queryWrapper.in("verify_status",CommConstant.VERIFY_AGREE,CommConstant.VERIFY_READY);
|
293
|
|
- List<TaRecommendCustomer> result = taRecommendCustomerMapper.selectList(queryWrapper);
|
294
|
|
- if (null != result && result.size() > 0) {
|
295
|
|
- return ResponseBean.error("当前客户已被推荐, 不能再次推荐", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
296
|
|
- }
|
297
|
|
-
|
298
|
297
|
int row = taRecommendCustomerMapper.insert(taRecommendCustomer);
|
299
|
298
|
if (row < 1) {
|
300
|
299
|
return ResponseBean.error("推荐客户失败", ResponseBean.ERROR_UNAVAILABLE);
|
|
@@ -311,9 +310,8 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
311
|
310
|
}
|
312
|
311
|
|
313
|
312
|
|
314
|
|
-
|
315
|
313
|
@Override
|
316
|
|
- public ResponseBean reportCust(String paramStr, String openid,Integer orgId) {
|
|
314
|
+ public ResponseBean reportCust(String paramStr, String openid, Integer orgId) {
|
317
|
315
|
JSONObject params = JSONObject.parseObject(paramStr);
|
318
|
316
|
if (null == params) {
|
319
|
317
|
return ResponseBean.error("解析参数失败", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
@@ -367,12 +365,12 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
367
|
365
|
// taRecommendCustomer.setDescribe(params.getString("describe"));
|
368
|
366
|
taRecommendCustomer.setRealtyConsultant(consultantUser.getUserId().toString());
|
369
|
367
|
//如果没有传building_id的情况构造building_id
|
370
|
|
- if (StringUtils.isEmpty(params.getString("buildingId")) && !StringUtils.isEmpty(params.getString("realtyConsultant"))){
|
|
368
|
+ if (StringUtils.isEmpty(params.getString("buildingId")) && !StringUtils.isEmpty(params.getString("realtyConsultant"))) {
|
371
|
369
|
QueryWrapper<TaPersonBuilding> taPersonBuildingQueryWrapper = new QueryWrapper<>();
|
372
|
370
|
taPersonBuildingQueryWrapper.eq("person_id", consultantPerson.getPersonId()).or().eq("user_id", consultantUser.getUserId());
|
373
|
371
|
List<TaPersonBuilding> taPersonBuildingList = taPersonBuildingMapper.selectList(taPersonBuildingQueryWrapper);
|
374
|
|
- if (taPersonBuildingList.size() > 0){
|
375
|
|
- params.put("buildingId",taPersonBuildingList.get(0).getBuildingId());
|
|
372
|
+ if (taPersonBuildingList.size() > 0) {
|
|
373
|
+ params.put("buildingId", taPersonBuildingList.get(0).getBuildingId());
|
376
|
374
|
}
|
377
|
375
|
}
|
378
|
376
|
taRecommendCustomer.setBuildingId(params.getString("buildingId"));
|
|
@@ -399,11 +397,11 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
399
|
397
|
taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
|
400
|
398
|
taRecommendCustomer.setStatus(CommConstant.CUSTOMER_REPORT);
|
401
|
399
|
QueryWrapper<TaPerson> personQueryWrapper = new QueryWrapper<>();
|
402
|
|
- personQueryWrapper.eq("org_id",orgId);
|
403
|
|
- personQueryWrapper.eq("phone",params.getString("phone"));
|
|
400
|
+ personQueryWrapper.eq("org_id", orgId);
|
|
401
|
+ personQueryWrapper.eq("phone", params.getString("phone"));
|
404
|
402
|
TaPerson currentPerson = taPersonMapper.selectOne(personQueryWrapper);
|
405
|
|
- if(null != currentPerson){
|
406
|
|
- if (currentPerson.getPersonType().equals(CommConstant.PERSON_REALTY_CONSULTANT)){
|
|
403
|
+ if (null != currentPerson) {
|
|
404
|
+ if (currentPerson.getPersonType().equals(CommConstant.PERSON_REALTY_CONSULTANT)) {
|
407
|
405
|
return ResponseBean.error("置业顾问不可以绑定置业顾问", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
408
|
406
|
}
|
409
|
407
|
taRecommendCustomer.setPersonId(currentPerson.getPersonId());
|
|
@@ -419,29 +417,29 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
419
|
417
|
// 报备有 10 天有效期
|
420
|
418
|
QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
421
|
419
|
queryWrapper.eq("phone", taRecommendCustomer.getPhone());
|
422
|
|
- queryWrapper.eq("building_id",taRecommendCustomer.getBuildingId());
|
|
420
|
+ queryWrapper.eq("building_id", taRecommendCustomer.getBuildingId());
|
423
|
421
|
queryWrapper.eq("org_id", taRecommendCustomer.getOrgId());
|
424
|
|
- queryWrapper.in("verify_status",CommConstant.VERIFY_AGREE,CommConstant.VERIFY_READY);
|
|
422
|
+ queryWrapper.in("verify_status", CommConstant.VERIFY_AGREE, CommConstant.VERIFY_READY);
|
425
|
423
|
List<TaRecommendCustomer> result = taRecommendCustomerMapper.selectList(queryWrapper);
|
426
|
424
|
if (null != result && result.size() > 0) {
|
427
|
425
|
String conName = "";
|
428
|
426
|
TaPerson conPerson = taPersonMapper.selectById(result.get(0).getRealtyConsultant());
|
429
|
|
- if (null != conPerson){
|
430
|
|
- if(null != consultantPerson && consultantPerson.getPersonId().equals(conPerson.getPersonId())){
|
431
|
|
- return ResponseBean.success("bound");
|
|
427
|
+ if (null != conPerson) {
|
|
428
|
+ if (null != consultantPerson && consultantPerson.getPersonId().equals(conPerson.getPersonId())) {
|
|
429
|
+ return ResponseBean.success("bound");
|
432
|
430
|
}
|
433
|
431
|
conName = conPerson.getName();
|
434
|
|
- }else {
|
|
432
|
+ } else {
|
435
|
433
|
TaUser conUser = userService.getById(result.get(0).getRealtyConsultant());
|
436
|
|
- if(null != conUser){
|
437
|
|
- if(consultantUser.getUserId().equals(conUser.getUserId())){
|
|
434
|
+ if (null != conUser) {
|
|
435
|
+ if (consultantUser.getUserId().equals(conUser.getUserId())) {
|
438
|
436
|
return ResponseBean.success("bound");
|
439
|
437
|
}
|
440
|
438
|
conName = conUser.getUserName();
|
441
|
439
|
|
442
|
440
|
}
|
443
|
441
|
}
|
444
|
|
- return ResponseBean.error("您在当前项目的置业顾问是:"+conName, ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
442
|
+ return ResponseBean.error("您在当前项目的置业顾问是:" + conName, ResponseBean.ERROR_ILLEGAL_PARAMS);
|
445
|
443
|
}
|
446
|
444
|
|
447
|
445
|
int row = taRecommendCustomerMapper.insert(taRecommendCustomer);
|
|
@@ -518,106 +516,104 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
518
|
516
|
}
|
519
|
517
|
|
520
|
518
|
|
521
|
|
-
|
522
|
|
-
|
523
|
519
|
List<TaPerson> getPersonsByOpenId(String openid) {
|
524
|
520
|
return taPersonMapper.getPersonByOpenId(openid);
|
525
|
521
|
}
|
526
|
522
|
|
527
|
523
|
@Override
|
528
|
|
- public IPage<TaRecommendCustomer> getUnSignedCustomerList(int pageNumber, int pageSize,String building,String personId){
|
529
|
|
- QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
|
|
524
|
+ public IPage<TaRecommendCustomer> getUnSignedCustomerList(int pageNumber, int pageSize, String building, String personId) {
|
|
525
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
530
|
526
|
// queryWrapper.eq("building_id",building);
|
531
|
|
- queryWrapper.eq("realty_consultant",personId);
|
|
527
|
+ queryWrapper.eq("realty_consultant", personId);
|
532
|
528
|
queryWrapper.gt("status", CommConstant.MESSAGE_UNREAD);
|
533
|
|
- IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
|
534
|
|
- return taRecommendCustomerMapper.selectPage(page,queryWrapper);
|
|
529
|
+ IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
|
|
530
|
+ return taRecommendCustomerMapper.selectPage(page, queryWrapper);
|
535
|
531
|
}
|
536
|
532
|
|
537
|
533
|
@Override
|
538
|
|
- public IPage getCustomerList(Integer status,int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus,Integer sex, String customerType, Integer orgId,List<TaPersonBuilding> taPersonBuildingList,String sceneType, String startCreateDate, String endCreateDate){
|
|
534
|
+ public IPage getCustomerList(Integer status, int pageNumber, int pageSize, String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, String customerType, Integer orgId, List<TaPersonBuilding> taPersonBuildingList, String sceneType, String startCreateDate, String endCreateDate) {
|
539
|
535
|
|
540
|
536
|
if (CommConstant.CUTOMER_TYPE_PUBLIC.equals(customerType)) {
|
541
|
537
|
// 公客
|
542
|
|
- IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
|
|
538
|
+ IPage<TaPerson> page = new Page<>(pageNumber, pageSize);
|
543
|
539
|
// 公客就不用 buildingId 进行查询
|
544
|
|
- return taRecommendCustomerMapper.getPublicCustomerList(page,name, tel, entryType, verifyStatus, sex, orgId,consultTel,sceneType, taPersonBuildingList,building, startCreateDate, endCreateDate);
|
|
540
|
+ return taRecommendCustomerMapper.getPublicCustomerList(page, name, tel, entryType, verifyStatus, sex, orgId, consultTel, sceneType, taPersonBuildingList, building, startCreateDate, endCreateDate);
|
545
|
541
|
} else {
|
546
|
542
|
// 私客
|
547
|
|
- IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
|
548
|
|
- return taRecommendCustomerMapper.getCustomerList(page, building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,taPersonBuildingList,sceneType, startCreateDate, endCreateDate);
|
|
543
|
+ IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
|
|
544
|
+ return taRecommendCustomerMapper.getCustomerList(page, building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, status, taPersonBuildingList, sceneType, startCreateDate, endCreateDate);
|
549
|
545
|
}
|
550
|
546
|
|
551
|
547
|
}
|
552
|
548
|
|
553
|
549
|
@Override
|
554
|
|
- public IPage<TaPerson> getIndependentAgents(int pageNumber, int pageSize,String name,String tel, Integer orgId){
|
555
|
|
- IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
|
556
|
|
- return taRecommendCustomerMapper.getIndependentAgents(page,name,tel, orgId);
|
|
550
|
+ public IPage<TaPerson> getIndependentAgents(int pageNumber, int pageSize, String name, String tel, Integer orgId) {
|
|
551
|
+ IPage<TaPerson> page = new Page<>(pageNumber, pageSize);
|
|
552
|
+ return taRecommendCustomerMapper.getIndependentAgents(page, name, tel, orgId);
|
557
|
553
|
}
|
558
|
554
|
|
559
|
555
|
@Override
|
560
|
|
- public IPage<TaRecommendCustomer> getRecCustomerList(int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus,Integer sex, Integer orgId,List<TaPersonBuilding> taPersonBuildingList){
|
561
|
|
- IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
|
562
|
|
- return taRecommendCustomerMapper.getRecCustomerList(page,building,name,tel,consultName,consultTel,entryType,verifyStatus,sex, orgId,taPersonBuildingList);
|
|
556
|
+ public IPage<TaRecommendCustomer> getRecCustomerList(int pageNumber, int pageSize, String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
|
|
557
|
+ IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
|
|
558
|
+ return taRecommendCustomerMapper.getRecCustomerList(page, building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, taPersonBuildingList);
|
563
|
559
|
}
|
564
|
560
|
|
565
|
561
|
|
566
|
562
|
@Override
|
567
|
|
- public IPage<TaRecommendCustomer> getRepCustomerList(int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus,Integer sex, Integer orgId,List<TaPersonBuilding> taPersonBuildingList){
|
568
|
|
- IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
|
569
|
|
- return taRecommendCustomerMapper.getRepCustomerList(page,building,name,tel,consultName,consultTel,entryType,verifyStatus,sex, orgId,taPersonBuildingList);
|
|
563
|
+ public IPage<TaRecommendCustomer> getRepCustomerList(int pageNumber, int pageSize, String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
|
|
564
|
+ IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
|
|
565
|
+ return taRecommendCustomerMapper.getRepCustomerList(page, building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, taPersonBuildingList);
|
570
|
566
|
}
|
571
|
567
|
|
572
|
568
|
@Override
|
573
|
|
- public TaRecommendCustomer getCustomerById(String customerId){
|
|
569
|
+ public TaRecommendCustomer getCustomerById(String customerId) {
|
574
|
570
|
return taRecommendCustomerMapper.getCustomerById(customerId);
|
575
|
571
|
}
|
576
|
572
|
|
577
|
573
|
|
578
|
574
|
@Override
|
579
|
|
- public TaRecommendCustomer getCustomerDetail(String customerId,int pageNumber, int pageSize,List<TaPersonBuilding> taPersonBuildingList,String buildingId){
|
|
575
|
+ public TaRecommendCustomer getCustomerDetail(String customerId, int pageNumber, int pageSize, List<TaPersonBuilding> taPersonBuildingList, String buildingId) {
|
580
|
576
|
String personId = taRecommendCustomerMapper.getCustomerById(customerId).getPersonId();
|
581
|
|
- TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId,personId);
|
|
577
|
+ TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId, personId);
|
582
|
578
|
TaPerson person = taPersonMapper.selectById(personId);
|
583
|
|
- if(!StringUtils.isEmpty(personId)){
|
584
|
|
- IPage<TaPersonVisitRecord>page = new Page<>(pageNumber,pageSize);
|
585
|
|
- IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = taPersonVisitRecordMapper.visitRecordByPersonId(page,personId,taPersonBuildingList,buildingId);
|
|
579
|
+ if (!StringUtils.isEmpty(personId)) {
|
|
580
|
+ IPage<TaPersonVisitRecord> page = new Page<>(pageNumber, pageSize);
|
|
581
|
+ IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = taPersonVisitRecordMapper.visitRecordByPersonId(page, personId, taPersonBuildingList, buildingId);
|
586
|
582
|
List<TaPersonVisitRecord> records = taPersonVisitRecordIPage.getRecords();
|
587
|
583
|
records.forEach(e -> {
|
588
|
584
|
//获取活动标题
|
589
|
|
- if ("activity".equals(e.getEventType()) && null != e.getTargetId()){
|
|
585
|
+ if ("activity".equals(e.getEventType()) && null != e.getTargetId()) {
|
590
|
586
|
TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
|
591
|
|
- if (null != taBuildingDynamic){
|
|
587
|
+ if (null != taBuildingDynamic) {
|
592
|
588
|
e.setActivityName(taBuildingDynamic.getTitle());
|
593
|
589
|
}
|
594
|
590
|
|
595
|
591
|
}
|
596
|
592
|
//获取拼团标题
|
597
|
|
- if ("group".equals(e.getEventType()) && null != e.getTargetId()){
|
|
593
|
+ if ("group".equals(e.getEventType()) && null != e.getTargetId()) {
|
598
|
594
|
TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
|
599
|
|
- if (null != taShareActivity){
|
|
595
|
+ if (null != taShareActivity) {
|
600
|
596
|
e.setActivityName(taShareActivity.getActivityName());
|
601
|
597
|
}
|
602
|
598
|
}
|
603
|
599
|
//获取助力标题
|
604
|
|
- if ("help".equals(e.getEventType()) && null != e.getTargetId()){
|
|
600
|
+ if ("help".equals(e.getEventType()) && null != e.getTargetId()) {
|
605
|
601
|
HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
|
606
|
|
- if (null != helpActivity){
|
|
602
|
+ if (null != helpActivity) {
|
607
|
603
|
e.setActivityName(helpActivity.getTitle());
|
608
|
604
|
}
|
609
|
605
|
}
|
610
|
606
|
//获取咨询标题
|
611
|
|
- if ("news".equals(e.getEventType()) && null != e.getTargetId()){
|
|
607
|
+ if ("news".equals(e.getEventType()) && null != e.getTargetId()) {
|
612
|
608
|
TaNews taNews = taNewsMapper.selectById(e.getTargetId());
|
613
|
|
- if (null != taNews){
|
|
609
|
+ if (null != taNews) {
|
614
|
610
|
e.setActivityName(taNews.getNewsName());
|
615
|
611
|
}
|
616
|
612
|
}
|
617
|
613
|
//获取H5活动标题
|
618
|
|
- if ("h5".equals(e.getEventType()) && null != e.getTargetId()){
|
|
614
|
+ if ("h5".equals(e.getEventType()) && null != e.getTargetId()) {
|
619
|
615
|
TaDrainage taDrainage = taDrainageMapper.selectById(e.getTargetId());
|
620
|
|
- if (null != taDrainage){
|
|
616
|
+ if (null != taDrainage) {
|
621
|
617
|
e.setActivityName(taDrainage.getName());
|
622
|
618
|
}
|
623
|
619
|
}
|
|
@@ -625,19 +621,19 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
625
|
621
|
taPersonVisitRecordIPage.setRecords(records);
|
626
|
622
|
taRecommendCustomer.setVisitRecords(taPersonVisitRecordIPage);
|
627
|
623
|
taRecommendCustomer.setVisitTimes(taPersonVisitRecordIPage.getRecords().size());
|
628
|
|
- taRecommendCustomer.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId,taPersonBuildingList));
|
|
624
|
+ taRecommendCustomer.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId, taPersonBuildingList));
|
629
|
625
|
}
|
630
|
|
- if(!StringUtils.isEmpty(taRecommendCustomer.getRealtyConsultant())){
|
631
|
|
- TaPerson consultant = taPersonMapper.getById(taRecommendCustomer.getRealtyConsultant());
|
|
626
|
+ if (!StringUtils.isEmpty(taRecommendCustomer.getRealtyConsultant())) {
|
|
627
|
+ TaPerson consultant = taPersonMapper.getById(taRecommendCustomer.getRealtyConsultant());
|
632
|
628
|
TaUser user = new TaUser();
|
633
|
|
- if(null == consultant){
|
|
629
|
+ if (null == consultant) {
|
634
|
630
|
user = userService.getById(taRecommendCustomer.getRealtyConsultant());
|
635
|
|
- }else {
|
|
631
|
+ } else {
|
636
|
632
|
user = userService.getById(consultant.getUserId());
|
637
|
633
|
}
|
638
|
|
- if (null != user){
|
|
634
|
+ if (null != user) {
|
639
|
635
|
List<String> projects = taPersonMapper.getUserProjects(user.getUserId());
|
640
|
|
- if (projects.size()>0){
|
|
636
|
+ if (projects.size() > 0) {
|
641
|
637
|
user.setProjects(projects);
|
642
|
638
|
}
|
643
|
639
|
taRecommendCustomer.setConsultant(user);
|
|
@@ -645,26 +641,26 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
645
|
641
|
}
|
646
|
642
|
//构造来源类型
|
647
|
643
|
taRecommendCustomer.setPersonFrom("");
|
648
|
|
- if (null != person){
|
649
|
|
- Map<String,String>geoInfo = new HashMap<>();
|
650
|
|
- geoInfo.put("provience",person.getProvince());
|
651
|
|
- geoInfo.put("country",person.getCountry());
|
|
644
|
+ if (null != person) {
|
|
645
|
+ Map<String, String> geoInfo = new HashMap<>();
|
|
646
|
+ geoInfo.put("provience", person.getProvince());
|
|
647
|
+ geoInfo.put("country", person.getCountry());
|
652
|
648
|
TdCity city = cityMapper.selectById(person.getCity());
|
653
|
|
- if(null!=city){
|
654
|
|
- geoInfo.put("city",city.getName());
|
655
|
|
- }else {
|
656
|
|
- geoInfo.put("city","未知");
|
|
649
|
+ if (null != city) {
|
|
650
|
+ geoInfo.put("city", city.getName());
|
|
651
|
+ } else {
|
|
652
|
+ geoInfo.put("city", "未知");
|
657
|
653
|
}
|
658
|
654
|
taRecommendCustomer.setGeoInfo(geoInfo);
|
659
|
655
|
|
660
|
656
|
QueryWrapper<TaPersonFromRecord> queryWrapper = new QueryWrapper<>();
|
661
|
|
- queryWrapper.eq("org_id",person.getOrgId());
|
662
|
|
- queryWrapper.eq("person_id",person.getPersonId());
|
663
|
|
- queryWrapper.eq("is_first_time",1);
|
|
657
|
+ queryWrapper.eq("org_id", person.getOrgId());
|
|
658
|
+ queryWrapper.eq("person_id", person.getPersonId());
|
|
659
|
+ queryWrapper.eq("is_first_time", 1);
|
664
|
660
|
List<TaPersonFromRecord> taPersonFromRecords = taPersonFromRecordMapper.selectList(queryWrapper);
|
665
|
|
- if (taPersonFromRecords.size() > 0){
|
|
661
|
+ if (taPersonFromRecords.size() > 0) {
|
666
|
662
|
QueryWrapper<TdWxDict> tdWxDictQueryWrapper = new QueryWrapper<>();
|
667
|
|
- tdWxDictQueryWrapper.eq("scene_id",taPersonFromRecords.get(0).getSceneId());
|
|
663
|
+ tdWxDictQueryWrapper.eq("scene_id", taPersonFromRecords.get(0).getSceneId());
|
668
|
664
|
TdWxDict tdWxDict = tdWxDictMapper.selectOne(tdWxDictQueryWrapper);
|
669
|
665
|
taRecommendCustomer.setPersonFrom(null != tdWxDict ? tdWxDict.getSceneAlias() : "");
|
670
|
666
|
}
|
|
@@ -674,46 +670,46 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
674
|
670
|
}
|
675
|
671
|
|
676
|
672
|
@Override
|
677
|
|
- public TaPerson getPublicCustomerDetail(String personId,int pageNumber, int pageSize,List<TaPersonBuilding> taPersonBuildingList,String buildingId){
|
|
673
|
+ public TaPerson getPublicCustomerDetail(String personId, int pageNumber, int pageSize, List<TaPersonBuilding> taPersonBuildingList, String buildingId) {
|
678
|
674
|
TaPerson taPerson = taPersonMapper.getById(personId);
|
679
|
|
- if(!StringUtils.isEmpty(personId)){
|
680
|
|
- IPage<TaPersonVisitRecord>page = new Page<>(pageNumber,pageSize);
|
681
|
|
- IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = taPersonVisitRecordMapper.visitRecordByPersonId(page,personId,taPersonBuildingList,buildingId);
|
|
675
|
+ if (!StringUtils.isEmpty(personId)) {
|
|
676
|
+ IPage<TaPersonVisitRecord> page = new Page<>(pageNumber, pageSize);
|
|
677
|
+ IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = taPersonVisitRecordMapper.visitRecordByPersonId(page, personId, taPersonBuildingList, buildingId);
|
682
|
678
|
List<TaPersonVisitRecord> records = taPersonVisitRecordIPage.getRecords();
|
683
|
679
|
records.forEach(e -> {
|
684
|
680
|
//获取活动标题
|
685
|
|
- if ("activity".equals(e.getEventType()) && null != e.getTargetId()){
|
|
681
|
+ if ("activity".equals(e.getEventType()) && null != e.getTargetId()) {
|
686
|
682
|
TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
|
687
|
|
- if (null != taBuildingDynamic){
|
|
683
|
+ if (null != taBuildingDynamic) {
|
688
|
684
|
e.setActivityName(taBuildingDynamic.getTitle());
|
689
|
685
|
}
|
690
|
686
|
|
691
|
687
|
}
|
692
|
688
|
//获取拼团标题
|
693
|
|
- if ("group".equals(e.getEventType()) && null != e.getTargetId()){
|
|
689
|
+ if ("group".equals(e.getEventType()) && null != e.getTargetId()) {
|
694
|
690
|
TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
|
695
|
|
- if (null != taShareActivity){
|
|
691
|
+ if (null != taShareActivity) {
|
696
|
692
|
e.setActivityName(taShareActivity.getActivityName());
|
697
|
693
|
}
|
698
|
694
|
}
|
699
|
695
|
//获取助力标题
|
700
|
|
- if ("help".equals(e.getEventType()) && null != e.getTargetId()){
|
|
696
|
+ if ("help".equals(e.getEventType()) && null != e.getTargetId()) {
|
701
|
697
|
HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
|
702
|
|
- if (null != helpActivity){
|
|
698
|
+ if (null != helpActivity) {
|
703
|
699
|
e.setActivityName(helpActivity.getTitle());
|
704
|
700
|
}
|
705
|
701
|
}
|
706
|
702
|
//获取咨询标题
|
707
|
|
- if ("news".equals(e.getEventType()) && null != e.getTargetId()){
|
|
703
|
+ if ("news".equals(e.getEventType()) && null != e.getTargetId()) {
|
708
|
704
|
TaNews taNews = taNewsMapper.selectById(e.getTargetId());
|
709
|
|
- if (null != taNews){
|
|
705
|
+ if (null != taNews) {
|
710
|
706
|
e.setActivityName(taNews.getNewsName());
|
711
|
707
|
}
|
712
|
708
|
}
|
713
|
709
|
//获取H5活动标题
|
714
|
|
- if ("h5".equals(e.getEventType()) && null != e.getTargetId()){
|
|
710
|
+ if ("h5".equals(e.getEventType()) && null != e.getTargetId()) {
|
715
|
711
|
TaDrainage taDrainage = taDrainageMapper.selectById(e.getTargetId());
|
716
|
|
- if (null != taDrainage){
|
|
712
|
+ if (null != taDrainage) {
|
717
|
713
|
e.setActivityName(taDrainage.getName());
|
718
|
714
|
}
|
719
|
715
|
}
|
|
@@ -721,25 +717,25 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
721
|
717
|
taPersonVisitRecordIPage.setRecords(records);
|
722
|
718
|
taPerson.setVisitRecords(taPersonVisitRecordIPage);
|
723
|
719
|
taPerson.setVisitTimes(taPersonVisitRecordIPage.getRecords().size());
|
724
|
|
- taPerson.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId,taPersonBuildingList));
|
|
720
|
+ taPerson.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId, taPersonBuildingList));
|
725
|
721
|
taPerson.setDuration(taPersonVisitRecordMapper.getDurationByPersonId(personId));
|
726
|
722
|
taPerson.setVisitTime(taPersonVisitRecordMapper.getFirstVisitTimeByPersonId(personId));
|
727
|
723
|
TdCity city = cityMapper.selectById(taPerson.getCity());
|
728
|
|
- if(null != city){
|
|
724
|
+ if (null != city) {
|
729
|
725
|
taPerson.setCity(city.getName());
|
730
|
726
|
}
|
731
|
727
|
|
732
|
728
|
//构造来源类型
|
733
|
729
|
taPerson.setPersonFrom("");
|
734
|
|
- if (null != taPerson){
|
|
730
|
+ if (null != taPerson) {
|
735
|
731
|
QueryWrapper<TaPersonFromRecord> queryWrapper = new QueryWrapper<>();
|
736
|
|
- queryWrapper.eq("org_id",taPerson.getOrgId());
|
737
|
|
- queryWrapper.eq("person_id",taPerson.getPersonId());
|
738
|
|
- queryWrapper.eq("is_first_time",1);
|
|
732
|
+ queryWrapper.eq("org_id", taPerson.getOrgId());
|
|
733
|
+ queryWrapper.eq("person_id", taPerson.getPersonId());
|
|
734
|
+ queryWrapper.eq("is_first_time", 1);
|
739
|
735
|
List<TaPersonFromRecord> taPersonFromRecords = taPersonFromRecordMapper.selectList(queryWrapper);
|
740
|
|
- if (taPersonFromRecords.size() > 0){
|
|
736
|
+ if (taPersonFromRecords.size() > 0) {
|
741
|
737
|
QueryWrapper<TdWxDict> tdWxDictQueryWrapper = new QueryWrapper<>();
|
742
|
|
- tdWxDictQueryWrapper.eq("scene_id",taPersonFromRecords.get(0).getSceneId());
|
|
738
|
+ tdWxDictQueryWrapper.eq("scene_id", taPersonFromRecords.get(0).getSceneId());
|
743
|
739
|
TdWxDict tdWxDict = tdWxDictMapper.selectOne(tdWxDictQueryWrapper);
|
744
|
740
|
taPerson.setPersonFrom(null != tdWxDict ? tdWxDict.getSceneAlias() : "");
|
745
|
741
|
}
|
|
@@ -749,17 +745,17 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
749
|
745
|
}
|
750
|
746
|
|
751
|
747
|
@Override
|
752
|
|
- public IPage<TaRecommendCustomer>getCustomersIRecommended(int pageNumber, int pageSize,String customerId,Integer orgId,List<TaPersonBuilding> taPersonBuildingList){
|
|
748
|
+ public IPage<TaRecommendCustomer> getCustomersIRecommended(int pageNumber, int pageSize, String customerId, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
|
753
|
749
|
|
754
|
|
- QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
|
|
750
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
755
|
751
|
// todo
|
756
|
752
|
// 此处可能不是 person_id 而是 recommend_person
|
757
|
|
- IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
|
|
753
|
+ IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
|
758
|
754
|
// queryWrapper.eq("recommend_person",customerId);
|
759
|
755
|
//// queryWrapper.eq("building_id",building);
|
760
|
756
|
// queryWrapper.eq("status", CommConstant.VERIFY_AGREE);
|
761
|
757
|
// queryWrapper.eq("org_id", orgId);
|
762
|
|
- return taRecommendCustomerMapper.getCustomersIRecommended(page,customerId,CommConstant.STATUS_NORMAL,orgId,taPersonBuildingList);
|
|
758
|
+ return taRecommendCustomerMapper.getCustomersIRecommended(page, customerId, CommConstant.STATUS_NORMAL, orgId, taPersonBuildingList);
|
763
|
759
|
}
|
764
|
760
|
|
765
|
761
|
@Override
|
|
@@ -801,8 +797,8 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
801
|
797
|
|
802
|
798
|
@Override
|
803
|
799
|
public ResponseBean batchConsultantAssist(TaUser taUser, Integer orgId) {
|
804
|
|
- if (CollectionUtils.isNotEmpty(taUser.getPersonIds())){
|
805
|
|
- for (TaPerson taPerson : taUser.getPersonIds()){
|
|
800
|
+ if (CollectionUtils.isNotEmpty(taUser.getPersonIds())) {
|
|
801
|
+ for (TaPerson taPerson : taUser.getPersonIds()) {
|
806
|
802
|
consultantAssist(taUser, taPerson.getPersonId(), orgId);
|
807
|
803
|
}
|
808
|
804
|
}
|
|
@@ -881,24 +877,24 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
881
|
877
|
|
882
|
878
|
|
883
|
879
|
@Override
|
884
|
|
- public List<ExcelRecommendCustomer> getRecCustomerExport(Integer orgId, Integer pageCode, Integer pageSize,List<TaPersonBuilding> taPersonBuildingList) {
|
885
|
|
- return taRecommendCustomerMapper.getRecCustomerExport(orgId, pageCode, pageSize,taPersonBuildingList);
|
|
880
|
+ public List<ExcelRecommendCustomer> getRecCustomerExport(Integer orgId, Integer pageCode, Integer pageSize, List<TaPersonBuilding> taPersonBuildingList) {
|
|
881
|
+ return taRecommendCustomerMapper.getRecCustomerExport(orgId, pageCode, pageSize, taPersonBuildingList);
|
886
|
882
|
}
|
887
|
883
|
|
888
|
884
|
@Override
|
889
|
|
- public Integer getRecCustomerExportCount(Integer orgId,List<TaPersonBuilding> taPersonBuildingList) {
|
890
|
|
- return taRecommendCustomerMapper.getRecCustomerExportCount(orgId,taPersonBuildingList);
|
|
885
|
+ public Integer getRecCustomerExportCount(Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
|
|
886
|
+ return taRecommendCustomerMapper.getRecCustomerExportCount(orgId, taPersonBuildingList);
|
891
|
887
|
}
|
892
|
888
|
|
893
|
889
|
|
894
|
890
|
@Override
|
895
|
|
- public Integer getRepCustomerReportCount(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex,Integer orgId,List<TaPersonBuilding> taPersonBuildingList) {
|
896
|
|
- return taRecommendCustomerMapper.getRepCustomerReportCount(building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,taPersonBuildingList);
|
|
891
|
+ public Integer getRepCustomerReportCount(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
|
|
892
|
+ return taRecommendCustomerMapper.getRepCustomerReportCount(building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, taPersonBuildingList);
|
897
|
893
|
}
|
898
|
894
|
|
899
|
895
|
@Override
|
900
|
|
- public List<ReporRecommendCustomer> getRepCustomerReportExport(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, Integer pageCode, Integer pageSize,List<TaPersonBuilding> taPersonBuildingList) {
|
901
|
|
- return taRecommendCustomerMapper.getRepCustomerReportExport(building, name, tel, consultName, consultTel, entryType,verifyStatus,sex, orgId, pageCode, pageSize,taPersonBuildingList);
|
|
896
|
+ public List<ReporRecommendCustomer> getRepCustomerReportExport(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, Integer pageCode, Integer pageSize, List<TaPersonBuilding> taPersonBuildingList) {
|
|
897
|
+ return taRecommendCustomerMapper.getRepCustomerReportExport(building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, pageCode, pageSize, taPersonBuildingList);
|
902
|
898
|
}
|
903
|
899
|
|
904
|
900
|
|
|
@@ -911,7 +907,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
911
|
907
|
public List<AgentsRecommendCustomer> getIndependentAgentsExport(Integer orgId, Integer pageCode, Integer pageSize) {
|
912
|
908
|
return taRecommendCustomerMapper.getIndependentAgentsExport(orgId, pageCode, pageSize);
|
913
|
909
|
}
|
914
|
|
-
|
|
910
|
+
|
915
|
911
|
/**
|
916
|
912
|
* 查询我的客户人数集合
|
917
|
913
|
*
|
|
@@ -924,12 +920,12 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
924
|
920
|
if (null == taPersons || taPersons.size() != 1) {
|
925
|
921
|
return ResponseBean.error("验证当前人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
926
|
922
|
}
|
927
|
|
-
|
|
923
|
+
|
928
|
924
|
TaPerson taPerson = taPersons.get(0);
|
929
|
|
- Map<String,Object> map = taRecommendCustomerMapper.getMyCustStatistics(taPerson.getPersonId(),taPerson.getUserId(),taPerson.getOrgId());
|
|
925
|
+ Map<String, Object> map = taRecommendCustomerMapper.getMyCustStatistics(taPerson.getPersonId(), taPerson.getUserId(), taPerson.getOrgId());
|
930
|
926
|
return ResponseBean.success(map);
|
931
|
927
|
}
|
932
|
|
-
|
|
928
|
+
|
933
|
929
|
/**
|
934
|
930
|
* 分页查询我的跟进客户集合
|
935
|
931
|
*
|
|
@@ -951,18 +947,18 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
951
|
947
|
if (null == taPersons || taPersons.size() != 1) {
|
952
|
948
|
return ResponseBean.error("验证当前人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
953
|
949
|
}
|
954
|
|
-
|
|
950
|
+
|
955
|
951
|
TaPerson taPerson = taPersons.get(0);
|
956
|
|
-
|
|
952
|
+
|
957
|
953
|
IPage<TaRecommendCustomer> page = new Page<>();
|
958
|
954
|
page.setCurrent(pageNumber);
|
959
|
955
|
page.setSize(pageSize);
|
960
|
|
-
|
|
956
|
+
|
961
|
957
|
//分页获取跟进客户status != 4的为跟进客户, status = 4的为成交客户 根据type区分 follow 跟进 clinch 成交
|
962
|
|
- IPage<TaRecommendCustomer> result = taRecommendCustomerMapper.getMyCustFollowOrClinch(page, taPerson.getPersonId(),taPerson.getUserId(),taPerson.getOrgId(), type,name,phone,status,startReportDate,endReportDate,startArrivalDate,endArrivalDate);
|
|
958
|
+ IPage<TaRecommendCustomer> result = taRecommendCustomerMapper.getMyCustFollowOrClinch(page, taPerson.getPersonId(), taPerson.getUserId(), taPerson.getOrgId(), type, name, phone, status, startReportDate, endReportDate, startArrivalDate, endArrivalDate);
|
963
|
959
|
return ResponseBean.success(result);
|
964
|
960
|
}
|
965
|
|
-
|
|
961
|
+
|
966
|
962
|
/**
|
967
|
963
|
* 获取盘客工具下我的客户详情
|
968
|
964
|
*
|
|
@@ -976,14 +972,14 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
976
|
972
|
if (null == taPersons || taPersons.size() != 1) {
|
977
|
973
|
return ResponseBean.error("验证当前人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
978
|
974
|
}
|
979
|
|
-
|
|
975
|
+
|
980
|
976
|
TaPerson taPerson = taPersons.get(0);
|
981
|
977
|
TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getMyCustDetailById(customerId);
|
982
|
978
|
//添加跟进行为
|
983
|
|
- addCustomerFpllowUp(taPerson,taRecommendCustomer,"查看客户详情");
|
|
979
|
+ addCustomerFpllowUp(taPerson, taRecommendCustomer, "查看客户详情");
|
984
|
980
|
return ResponseBean.success(taRecommendCustomer);
|
985
|
981
|
}
|
986
|
|
-
|
|
982
|
+
|
987
|
983
|
/**
|
988
|
984
|
* 更新我的客户基本信息
|
989
|
985
|
*
|
|
@@ -997,16 +993,16 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
997
|
993
|
if (null == taPersons || taPersons.size() != 1) {
|
998
|
994
|
return ResponseBean.error("验证当前人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
999
|
995
|
}
|
1000
|
|
-
|
|
996
|
+
|
1001
|
997
|
TaPerson taPerson = taPersons.get(0);
|
1002
|
998
|
taRecommendCustomerMapper.updateById(taRecommendCustomer);
|
1003
|
999
|
//添加跟进行为
|
1004
|
|
- addCustomerFpllowUp(taPerson,taRecommendCustomer,"编辑客户信息");
|
|
1000
|
+ addCustomerFpllowUp(taPerson, taRecommendCustomer, "编辑客户信息");
|
1005
|
1001
|
return ResponseBean.success(taRecommendCustomer);
|
1006
|
1002
|
}
|
1007
|
|
-
|
|
1003
|
+
|
1008
|
1004
|
//添加跟进行为
|
1009
|
|
- private void addCustomerFpllowUp(TaPerson taPerson,TaRecommendCustomer taRecommendCustomer,String recordType) {
|
|
1005
|
+ private void addCustomerFpllowUp(TaPerson taPerson, TaRecommendCustomer taRecommendCustomer, String recordType) {
|
1010
|
1006
|
TaCustomerFollowUpRecord taCustomerFollowUpRecord = new TaCustomerFollowUpRecord();
|
1011
|
1007
|
taCustomerFollowUpRecord.setOrgId(taPerson.getOrgId());
|
1012
|
1008
|
taCustomerFollowUpRecord.setCreateDate(LocalDateTime.now());
|