Commit adc3bca7d9ac8148515c020d2edfcc199c69375d
1 parent
1ec4380a
feature(*): 修复bug
- 修复bug
Showing
3 changed files
with
7 additions
and
16 deletions
fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml
... | ... | @@ -98,6 +98,7 @@ |
98 | 98 | </if> |
99 | 99 | <if test="condition.ignoreChangeRole != null"> |
100 | 100 | and (t1.reason is null or t1.reason not in (4)) |
101 | + and t1.redistribution = 0 | |
101 | 102 | </if> |
102 | 103 | </where> |
103 | 104 | <if test="condition.orderString != null and condition.orderString !='' "> |
... | ... | @@ -179,6 +180,7 @@ |
179 | 180 | </if> |
180 | 181 | <if test="condition.ignoreChangeRole != null"> |
181 | 182 | and (t1.reason is null or t1.reason not in (4)) |
183 | + and t1.redistribution = 0 | |
182 | 184 | </if> |
183 | 185 | </where> |
184 | 186 | </select> | ... | ... |
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 { |
738 | 738 | redistributionTask.setFollowUserName(staffInfoDTO.getName()); |
739 | 739 | } |
740 | 740 | redistributionTask.setGroupId(clue.getGroupId()); |
741 | - redistributionTask.setRpcSuccess(Boolean.FALSE); | |
742 | 741 | redistributionTask.setVersion(2); |
743 | 742 | clueTaskService.save(redistributionTask); |
744 | 743 | FollowInitDTO followInitDTO = creteRedistributionFollowInitDTO(clue, redistributionTask); | ... | ... |
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 { |
165 | 165 | Long clueId = task.getClueId(); |
166 | 166 | FollowClue clue = followClueService.getById(clueId); |
167 | 167 | BV.notNull(clue, () -> "跟进线索不存在: " + clueId); |
168 | - Customer customer = customerService.queryByFrameNo(clue.getVin(), clue.getGroupId()); | |
169 | - Long adviserId = Optional.ofNullable(customer).map(Customer::getAdviserId).orElse(null); | |
170 | 168 | |
171 | 169 | Optional<SettingVO> settingVO = settingBizService.querySettingByType(getFollowType(), SettingTypeEnum.MODE, clue.getGroupId(), COMMON_BRAND_ID); |
172 | 170 | // 模式 1、续保角色 2、续保角色+服务接待/新车销售 |
... | ... | @@ -183,25 +181,17 @@ public class IRFollowStrategy extends AbstractFollowStrategy { |
183 | 181 | PostUserDTO userDTO = userByRole.get(randomIndex); |
184 | 182 | createSecondaryTask(clue, userDTO.getUserId()); |
185 | 183 | } else { |
186 | - if (Objects.isNull(adviserId)) { | |
187 | - List<PostUserDTO> userByRole = userService.getShopRolesUser(task.getFollowShop(), RoleCode.XBGJ, RoleCode.FWGW); | |
188 | - BV.isNotEmpty(userByRole, () -> String.format("该门店[mode: %s]没有【跟进】人员", mode)); | |
189 | - int randomIndex = new Random().nextInt(userByRole.size()); | |
190 | - PostUserDTO userDTO = userByRole.get(randomIndex); | |
191 | - adviserId = userDTO.getUserId(); | |
192 | - } else { | |
193 | - if (task.getFollowUser().equals(adviserId)) { | |
194 | - return; | |
195 | - } | |
196 | - } | |
197 | - | |
198 | 184 | boolean rpcSucess = rpcStopTask(task); |
199 | 185 | if (!rpcSucess) { |
200 | 186 | log.info("跟进系统终止任务失败"); |
201 | 187 | } |
202 | 188 | task.setRpcSuccess(rpcSucess); |
203 | 189 | clueTaskService.updateById(task); |
204 | - this.createSecondaryTask(clue, adviserId); | |
190 | + clue.setClueState(ClueStatusEnum.FAILURE); | |
191 | + clue.setCloseTime(LocalDateTime.now()); | |
192 | + followClueService.updateById(clue); | |
193 | + afterStopClue(clue); | |
194 | + redisTemplate.opsForSet().add(generateStopKey(), String.valueOf(task.getId())); | |
205 | 195 | } |
206 | 196 | } |
207 | 197 | ... | ... |