Commit b2fb8da15a55e192c11a998eaa34eb1f0255a5a5

Authored by 张志伟
1 parent 5588019f

:bug: 修复档案不存在的时候跟进列表报错

fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java
... ... @@ -794,6 +794,13 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
794 794 followTaskService.updateById(task);
795 795 }
796 796  
  797 + protected void onCustomerIsNil(FollowRecord record) {
  798 + BackLogItemDTO dto = new BackLogItemDTO(record.getUserId(), getItemCode(record.getType()), String.valueOf(record.getId()), new Date(), record.getShopId());
  799 + todoRpcService.complete(dto);
  800 + record.setFollowTime(new Date());
  801 + followRecordService.updateById(record);
  802 + }
  803 +
797 804 private void onStopClue(CustomerCluePool clue, TaskDefeatTypeEnum defeatTypeEnum) {
798 805 clue.setClueStatus(ClueStatusEnum.FAILURE);
799 806 clue.setCloseTime(new Date());
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java
... ... @@ -55,12 +55,14 @@ public class FMFollowStrategy extends AbstractFollowStrategy {
55 55 vo.setCustomerId(followRecord.getCustomerId());
56 56 vo.setDeadline(followRecord.getDeadline());
57 57 CustomerDetailDto customerDetailDto = customerBizService.queryById(followRecord.getCustomerId());
58   - if (Objects.nonNull(customerDetailDto)) {
59   - vo.setName(customerDetailDto.getName());
60   - vo.setPlateNo(customerDetailDto.getPlateNo());
61   - vo.setCarImage(customerDetailDto.getCarImage());
62   - vo.setBuyDate(customerDetailDto.getBuyDate());
  58 + if (Objects.isNull(customerDetailDto)) {
  59 + onCustomerIsNil(followRecord);
  60 + continue;
63 61 }
  62 + vo.setName(customerDetailDto.getName());
  63 + vo.setPlateNo(customerDetailDto.getPlateNo());
  64 + vo.setCarImage(customerDetailDto.getCarImage());
  65 + vo.setBuyDate(customerDetailDto.getBuyDate());
64 66 Optional<FollowTask> followTask = Optional.ofNullable(followTaskService.getById(followRecord.getTaskId()));
65 67 followTask.ifPresent(task -> vo.setFMExpiration(task.getDeadline()));
66 68 voList.add(vo);
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java
... ... @@ -17,6 +17,7 @@ import cn.fw.valhalla.domain.enums.*;
17 17 import cn.fw.valhalla.domain.vo.follow.*;
18 18 import cn.fw.valhalla.domain.vo.setting.SettingVO;
19 19 import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO;
  20 +import cn.fw.valhalla.rpc.erp.dto.BackLogItemDTO;
20 21 import cn.fw.valhalla.rpc.erp.dto.PostUserDTO;
21 22 import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO;
22 23 import cn.fw.valhalla.rpc.oop.dto.ShopDTO;
... ... @@ -64,6 +65,10 @@ public class IRFollowStrategy extends AbstractFollowStrategy {
64 65 vo.setCustomerId(followRecord.getCustomerId());
65 66 vo.setDeadline(followRecord.getDeadline());
66 67 CustomerDetailDto customerDetailDto = customerBizService.queryById(followRecord.getCustomerId());
  68 + if (Objects.isNull(customerDetailDto)) {
  69 + onCustomerIsNil(followRecord);
  70 + continue;
  71 + }
67 72 vo.setName(customerDetailDto.getName());
68 73 vo.setCarImage(customerDetailDto.getCarImage());
69 74 vo.setPlateNo(customerDetailDto.getPlateNo());
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/RMFollowStrategy.java
... ... @@ -76,11 +76,14 @@ public class RMFollowStrategy extends AbstractFollowStrategy {
76 76 vo.setCustomerId(followRecord.getCustomerId());
77 77 vo.setDeadline(followRecord.getDeadline());
78 78 CustomerDetailDto customerDetailDto = customerBizService.queryById(followRecord.getCustomerId());
  79 + if (Objects.isNull(customerDetailDto)) {
  80 + onCustomerIsNil(followRecord);
  81 + continue;
  82 + }
79 83 vo.setName(customerDetailDto.getName());
80 84 vo.setCarImage(customerDetailDto.getCarImage());
81 85 vo.setPlateNo(customerDetailDto.getPlateNo());
82 86 vo.setLastMileage(customerDetailDto.getCurrentMileage());
83   -
84 87 OriginalData originalData = originalDataService.getOne(Wrappers.<OriginalData>lambdaQuery()
85 88 .eq(OriginalData::getCustomerId, followRecord.getCustomerId())
86 89 .eq(OriginalData::getType, DataTypeEnum.FS)
... ...