Commit 2095ebcf16ec70b272ed7e4fd125dad534f891e2

Authored by Kurisu
1 parent 595df60c

:ambulance: bug修复

- bug修复
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java
... ... @@ -212,18 +212,14 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
212 212 clueTaskService.updateById(task);
213 213 redisTemplate.opsForSet().add(generateStopKey(), String.valueOf(task.getId()));
214 214  
215   - if (Boolean.TRUE.equals(task.getRedistribution())) {
216   - if (Objects.nonNull(clue)) {
217   - clue.setCloseTime(task.getCloseTime());
218   - clue.setClueState(ClueStatusEnum.FAILURE);
219   - followClueService.updateById(clue);
220   - customerBizService.taskEndAbandon(task, clue);
221   - }
  215 + if (Boolean.TRUE.equals(task.getRedistribution()) || !task.getDeadline().isBefore(clue.getEndTime())) {
  216 + clue.setCloseTime(task.getCloseTime());
  217 + clue.setClueState(ClueStatusEnum.FAILURE);
  218 + followClueService.updateById(clue);
  219 + customerBizService.taskEndAbandon(task, clue);
222 220 } else {
223   - if (Objects.nonNull(clue)) {
224   - // 需要做二次分配的任务
225   - redisTemplate.opsForSet().add(getClueSecondKey(), String.valueOf(task.getId()));
226   - }
  221 + // 需要做二次分配的任务
  222 + redisTemplate.opsForSet().add(getClueSecondKey(), String.valueOf(task.getId()));
227 223 }
228 224 }
229 225  
... ... @@ -243,7 +239,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
243 239 if (Objects.isNull(clue)) {
244 240 boolean rpcSucess = rpcStopTask(task);
245 241 if (!rpcSucess) {
246   - log.info("跟进系统终止任务失败");
  242 + log.info("跟进系统终止任务失败 clueId:{}", clueId);
247 243 }
248 244 task.setRpcSuccess(rpcSucess);
249 245 clueTaskService.updateById(task);
... ... @@ -262,7 +258,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
262 258 if (Objects.isNull(adviserId)) {
263 259 boolean rpcSuccess = rpcStopTask(task);
264 260 if (!rpcSuccess) {
265   - log.info("跟进系统终止任务失败");
  261 + log.info("跟进系统终止任务失败:clueId[{}]", clueId);
266 262 }
267 263 task.setRpcSuccess(rpcSuccess);
268 264 clueTaskService.updateById(task);
... ... @@ -296,7 +292,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
296 292 boolean rpcSucess = rpcStopTask(task);
297 293 task.setRpcSuccess(rpcSucess);
298 294 clueTaskService.updateById(task);
299   - if (Boolean.TRUE.equals(task.getRedistribution())) {
  295 + if (Boolean.TRUE.equals(task.getRedistribution()) || !task.getDeadline().isBefore(clue.getEndTime())) {
300 296 clue.setClueState(ClueStatusEnum.FAILURE);
301 297 clue.setCloseTime(LocalDateTime.now());
302 298 followClueService.updateById(clue);
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java
... ... @@ -182,7 +182,7 @@ public class IRFollowStrategy extends AbstractFollowStrategy {
182 182 task.setRpcSuccess(rpcSucess);
183 183 if (Objects.nonNull(clue)) {
184 184 boolean asFollow = clue.getId() % 2 == 0;
185   - if (!Boolean.TRUE.equals(task.getRedistribution()) && asFollow) {
  185 + if (!Boolean.TRUE.equals(task.getRedistribution()) && asFollow && task.getDeadline().isBefore(clue.getEndTime())) {
186 186 // 需要做二次分配的任务
187 187 redisTemplate.opsForSet().add(getClueSecondKey(), String.valueOf(task.getId()));
188 188 } else {
... ...