diff --git a/fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml b/fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml index d7a6dc5..9e9ab2e 100644 --- a/fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml +++ b/fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml @@ -98,6 +98,7 @@ and (t1.reason is null or t1.reason not in (4)) + and t1.redistribution = 0 @@ -179,6 +180,7 @@ and (t1.reason is null or t1.reason not in (4)) + and t1.redistribution = 0 diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java index f4c458e..45cb8ab 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java @@ -738,7 +738,6 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { redistributionTask.setFollowUserName(staffInfoDTO.getName()); } redistributionTask.setGroupId(clue.getGroupId()); - redistributionTask.setRpcSuccess(Boolean.FALSE); redistributionTask.setVersion(2); clueTaskService.save(redistributionTask); FollowInitDTO followInitDTO = creteRedistributionFollowInitDTO(clue, redistributionTask); diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java index f75cc75..1bd8fc5 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java @@ -165,8 +165,6 @@ public class IRFollowStrategy extends AbstractFollowStrategy { Long clueId = task.getClueId(); FollowClue clue = followClueService.getById(clueId); BV.notNull(clue, () -> "跟进线索不存在: " + clueId); - Customer customer = customerService.queryByFrameNo(clue.getVin(), clue.getGroupId()); - Long adviserId = Optional.ofNullable(customer).map(Customer::getAdviserId).orElse(null); Optional settingVO = settingBizService.querySettingByType(getFollowType(), SettingTypeEnum.MODE, clue.getGroupId(), COMMON_BRAND_ID); // 模式 1、续保角色 2、续保角色+服务接待/新车销售 @@ -183,25 +181,17 @@ public class IRFollowStrategy extends AbstractFollowStrategy { PostUserDTO userDTO = userByRole.get(randomIndex); createSecondaryTask(clue, userDTO.getUserId()); } else { - if (Objects.isNull(adviserId)) { - List userByRole = userService.getShopRolesUser(task.getFollowShop(), RoleCode.XBGJ, RoleCode.FWGW); - BV.isNotEmpty(userByRole, () -> String.format("该门店[mode: %s]没有【跟进】人员", mode)); - int randomIndex = new Random().nextInt(userByRole.size()); - PostUserDTO userDTO = userByRole.get(randomIndex); - adviserId = userDTO.getUserId(); - } else { - if (task.getFollowUser().equals(adviserId)) { - return; - } - } - boolean rpcSucess = rpcStopTask(task); if (!rpcSucess) { log.info("跟进系统终止任务失败"); } task.setRpcSuccess(rpcSucess); clueTaskService.updateById(task); - this.createSecondaryTask(clue, adviserId); + clue.setClueState(ClueStatusEnum.FAILURE); + clue.setCloseTime(LocalDateTime.now()); + followClueService.updateById(clue); + afterStopClue(clue); + redisTemplate.opsForSet().add(generateStopKey(), String.valueOf(task.getId())); } }