From ee39ce190e3e25aa7d294cca39ab7ac0694e9c6d Mon Sep 17 00:00:00 2001 From: Kurisu Date: Sat, 20 Feb 2021 16:10:22 +0800 Subject: [PATCH] :sparkles: 续保跟进角色调整,跟进任务分配 --- fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/RoleChangeDTO.java | 31 +++++++++++++++++++++++++++++++ fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/task/RoleChangeTask.java | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------- fw-valhalla-service/src/main/java/cn/fw/valhalla/component/RoleChangeConsumer.java | 32 +++++++++++++------------------- fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/LeaveNeedDoBizService.java | 93 +++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/FollowBizService.java | 4 ++-- fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java | 16 +++++++++++----- fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/FollowStrategy.java | 2 +- fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java | 2 +- fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowRecordServiceImpl.java | 2 +- 9 files changed, 165 insertions(+), 85 deletions(-) create mode 100644 fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/RoleChangeDTO.java diff --git a/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/RoleChangeDTO.java b/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/RoleChangeDTO.java new file mode 100644 index 0000000..27f41f3 --- /dev/null +++ b/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/RoleChangeDTO.java @@ -0,0 +1,31 @@ +package cn.fw.valhalla.domain.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +/** + * @author : kurisu + * @className : RoleChangeDTO + * @description : 角色变动dto + * @date: 2021-02-20 15:11 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class RoleChangeDTO { + /** + * 门店 + */ + private Long shopId; + /** + * 用户id + */ + private Long userId; + /** + * 用户名称 + */ + private String userName; +} diff --git a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/task/RoleChangeTask.java b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/task/RoleChangeTask.java index d614a2a..adca4c9 100644 --- a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/task/RoleChangeTask.java +++ b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/task/RoleChangeTask.java @@ -1,7 +1,11 @@ package cn.fw.valhalla.controller.task; +import cn.fw.valhalla.common.constant.RoleCode; import cn.fw.valhalla.common.utils.StringUtils; import cn.fw.valhalla.domain.db.LeaveNeedDo; +import cn.fw.valhalla.domain.dto.RoleChangeDTO; +import cn.fw.valhalla.domain.enums.LeaveReasonEnum; +import cn.fw.valhalla.domain.enums.LeaveTodoTypeEnum; import cn.fw.valhalla.service.bus.LeaveNeedDoBizService; import com.alibaba.fastjson.JSONObject; import lombok.Getter; @@ -15,6 +19,7 @@ import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Objects; @@ -31,9 +36,9 @@ public class RoleChangeTask { private final LeaveNeedDoBizService leaveNeedDoBizService; private final StringRedisTemplate redisTemplate; - @Value("${spring.cache.custom.global-prefix}:mq:role:change") + @Value("${spring.cache.custom.global-prefix}:mq:role") @Getter - private String roleChangeKey; + private String keyPrefix; @Autowired public RoleChangeTask(final LeaveNeedDoBizService leaveNeedDoBizService, @@ -44,28 +49,71 @@ public class RoleChangeTask { /** - * 处理员工角色变动 + * 服务顾问角色变动 */ @Scheduled(initialDelay = 1000 * 30, fixedRate = 1000 * 60 * 60) - public void dealData() { + public void dealFwgwData() { List failList = new ArrayList<>(); String jsonStr; - while ((jsonStr = redisTemplate.opsForList().leftPop(getRoleChangeKey())) != null) { - LeaveNeedDo leaveNeedDo = JSONObject.parseObject(jsonStr, LeaveNeedDo.class); - if (Objects.isNull(leaveNeedDo)) { + while ((jsonStr = redisTemplate.opsForList().leftPop(getRedisKey(RoleCode.FWGW))) != null) { + RoleChangeDTO roleChangeDTO = JSONObject.parseObject(jsonStr, RoleChangeDTO.class); + if (Objects.isNull(roleChangeDTO)) { continue; } try { - leaveNeedDoBizService.add(leaveNeedDo); + leaveNeedDoBizService.add(createDb(roleChangeDTO.getUserId(), roleChangeDTO.getShopId(), roleChangeDTO.getUserName())); } catch (Exception e) { if (StringUtils.isValid(jsonStr)) { failList.add(jsonStr); } - log.error("处理员工角色变动失败", e); + log.error("处理服务接待角色变动失败", e); } } if (!CollectionUtils.isEmpty(failList)) { - redisTemplate.opsForList().rightPushAll(getRoleChangeKey(), failList); + redisTemplate.opsForList().rightPushAll(getRedisKey(RoleCode.FWGW), failList); } } + + /** + * 续保角色 + */ + @Scheduled(initialDelay = 1000 * 30, fixedRate = 1000 * 60 * 60) + public void dealXbData() { + List failList = new ArrayList<>(); + String jsonStr; + while ((jsonStr = redisTemplate.opsForList().leftPop(getRedisKey(RoleCode.XBGJ))) != null) { + RoleChangeDTO roleChangeDTO = JSONObject.parseObject(jsonStr, RoleChangeDTO.class); + if (Objects.isNull(roleChangeDTO)) { + continue; + } + try { + leaveNeedDoBizService.xbgjChanged(roleChangeDTO); + } catch (Exception e) { + if (StringUtils.isValid(jsonStr)) { + failList.add(jsonStr); + } + log.error("处理续保跟进角色变动失败", e); + } + } + if (!CollectionUtils.isEmpty(failList)) { + redisTemplate.opsForList().rightPushAll(getRedisKey(RoleCode.XBGJ), failList); + } + } + + private String getRedisKey(final String roleCode) { + return String.format("%s:change:%s", getKeyPrefix(), roleCode); + } + + private LeaveNeedDo createDb(Long userId, Long shopId, String userName) { + LeaveNeedDo leaveNeedDo = new LeaveNeedDo(); + leaveNeedDo.setDone(Boolean.FALSE); + leaveNeedDo.setEffectiveTime(new Date()); + leaveNeedDo.setReason(LeaveReasonEnum.CHANGE); + leaveNeedDo.setType(LeaveTodoTypeEnum.CUSTOMER); + leaveNeedDo.setShopId(shopId); + leaveNeedDo.setUserId(userId); + leaveNeedDo.setUserName(userName); + leaveNeedDo.setCreateTime(new Date()); + return leaveNeedDo; + } } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/component/RoleChangeConsumer.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/component/RoleChangeConsumer.java index 3514ca3..7e812ee 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/component/RoleChangeConsumer.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/component/RoleChangeConsumer.java @@ -4,6 +4,7 @@ import cn.fw.erp.sdk.api.enums.OperateTypeEnum; import cn.fw.erp.sdk.api.mq.RoleChangeEvent; import cn.fw.valhalla.common.constant.RoleCode; import cn.fw.valhalla.domain.db.LeaveNeedDo; +import cn.fw.valhalla.domain.dto.RoleChangeDTO; import cn.fw.valhalla.domain.enums.LeaveReasonEnum; import cn.fw.valhalla.domain.enums.LeaveTodoTypeEnum; import com.alibaba.fastjson.JSON; @@ -32,9 +33,9 @@ import java.util.Objects; public class RoleChangeConsumer implements RocketMQListener { private final StringRedisTemplate redisTemplate; - @Value("${spring.cache.custom.global-prefix}:mq:role:change") + @Value("${spring.cache.custom.global-prefix}:mq:role") @Getter - private String roleChangeKey; + private String keyPrefix; @Autowired public RoleChangeConsumer(final StringRedisTemplate redisTemplate) { @@ -48,28 +49,21 @@ public class RoleChangeConsumer implements RocketMQListener { if (Objects.isNull(t)) { return; } - if (OperateTypeEnum.REMOVE.getValue().equals(t.getType()) && RoleCode.FWGW.equalsIgnoreCase(t.getRoleCode())) { - Long shopId = t.getRangeValue(); - Long userId = t.getUserId(); - String userName = t.getUserName(); - LeaveNeedDo leaveNeedDo = createDb(userId, shopId, userName); - redisTemplate.boundListOps(getRoleChangeKey()).rightPush(JSONObject.toJSONString(leaveNeedDo)); + if (OperateTypeEnum.BLOCK.getValue().equals(t.getType()) && RoleCode.FWGW.equalsIgnoreCase(t.getRoleCode())) { + String jsonString = JSONObject.toJSONString(new RoleChangeDTO(t.getRangeValue(), t.getUserId(), t.getUserName())); + redisTemplate.boundListOps(getRedisKey(RoleCode.FWGW)).rightPush(jsonString); + } + + if (OperateTypeEnum.BLOCK.getValue().equals(t.getType()) && RoleCode.XBGJ.equalsIgnoreCase(t.getRoleCode())) { + String jsonString = JSONObject.toJSONString(new RoleChangeDTO(t.getRangeValue(), t.getUserId(), t.getUserName())); + redisTemplate.boundListOps(getRedisKey(RoleCode.XBGJ)).rightPush(jsonString); } } catch (Exception ex) { log.error("消费角色变动mq失败,原因:{}", JSON.toJSONString(ex)); } } - private LeaveNeedDo createDb(Long userId, Long shopId, String userName) { - LeaveNeedDo leaveNeedDo = new LeaveNeedDo(); - leaveNeedDo.setDone(Boolean.FALSE); - leaveNeedDo.setEffectiveTime(new Date()); - leaveNeedDo.setReason(LeaveReasonEnum.CHANGE); - leaveNeedDo.setType(LeaveTodoTypeEnum.CUSTOMER); - leaveNeedDo.setShopId(shopId); - leaveNeedDo.setUserId(userId); - leaveNeedDo.setUserName(userName); - leaveNeedDo.setCreateTime(new Date()); - return leaveNeedDo; + private String getRedisKey(final String roleCode) { + return String.format("%s:change:%s", getKeyPrefix(), roleCode); } } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/LeaveNeedDoBizService.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/LeaveNeedDoBizService.java index 3adfdbb..672cf53 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/LeaveNeedDoBizService.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/LeaveNeedDoBizService.java @@ -12,11 +12,11 @@ import cn.fw.valhalla.common.enums.AllocationTypeEnum; import cn.fw.valhalla.common.utils.DateUtil; import cn.fw.valhalla.domain.db.LeaveNeedDo; import cn.fw.valhalla.domain.db.customer.Customer; -import cn.fw.valhalla.domain.db.follow.FollowRecord; import cn.fw.valhalla.domain.db.follow.FollowTask; import cn.fw.valhalla.domain.db.pool.CustomerCluePool; import cn.fw.valhalla.domain.db.pool.StammkundePool; import cn.fw.valhalla.domain.dto.LeaveAllocationDTO; +import cn.fw.valhalla.domain.dto.RoleChangeDTO; import cn.fw.valhalla.domain.dto.StammkundeDto; import cn.fw.valhalla.domain.enums.*; import cn.fw.valhalla.domain.query.LeaveQueryVO; @@ -177,6 +177,41 @@ public class LeaveNeedDoBizService { } } + + @Transactional(rollbackFor = Exception.class) + public void xbgjChanged(RoleChangeDTO dto) { + final Long userId = dto.getUserId(); + final Long shopId = dto.getShopId(); + List statusList = Arrays.asList(ClueStatusEnum.WAITING, ClueStatusEnum.ONGOING); + List list = customerCluePoolService.list(Wrappers.lambdaQuery() + .in(CustomerCluePool::getClueStatus, statusList) + .eq(CustomerCluePool::getOriginalShopId, shopId) + .eq(CustomerCluePool::getClueType, FollowTypeEnum.IR) + .eq(CustomerCluePool::getOriginalUserId, userId) + ); + if (CollectionUtils.isEmpty(list)) { + return; + } + List userList = userService.getUserByRole(shopId, RoleCode.XBGJ); + BV.isNotEmpty(userList, () -> "更换跟进人员失败:没有更多续保跟进员"); + Collections.shuffle(userList); + PostUserDTO userDTO = userList.stream().filter(u -> !u.getUserId().equals(userId)).findAny().orElse(null); + BV.notNull(userDTO, () -> "更换跟进人员失败:没有更多续保跟进员"); + + for (CustomerCluePool clue : list) { + if (ClueStatusEnum.WAITING.equals(clue.getClueStatus())) { + clue.setOriginalUserId(userDTO.getUserId()); + clue.setOriginalUserName(userDTO.getUserName()); + clue.setOriginalShopId(shopId); + Optional.ofNullable(oopService.shop(shopId)).ifPresent(shop -> clue.setOriginalShopName(shop.getShortName())); + continue; + } + dealTask(clue, userDTO.getUserId(), shopId); + } + + customerCluePoolService.updateBatchById(list); + } + private void prepareAllocation(LeaveAllocationDTO dto) { AllocationTypeEnum typeEnum = AllocationTypeEnum.ofValue(dto.getAllocationType()); BV.notNull(typeEnum, () -> "分配方式不正确,请重试"); @@ -312,31 +347,27 @@ public class LeaveNeedDoBizService { customerCluePoolService.updateBatchById(list); } - private void dealTask(CustomerCluePool clue, Long adviserId, Long shopId) { - if (Boolean.FALSE.equals(clue.getRedistribution())) { - clue.setRedistribution(Boolean.TRUE); - } + private void dealTask(CustomerCluePool clue, Long userId, Long shopId) { FollowTask task = followTaskService.queryOngoingTaskByClueId(clue.getId()); if (Objects.isNull(task)) { return; } - UserInfoDTO user = userService.user(adviserId); + UserInfoDTO user = userService.user(userId); String userName = Objects.nonNull(user) ? user.getUserName() : ""; - - if (Boolean.TRUE.equals(task.getRedistribution())) { - task.setFollowUser(adviserId); - task.setFollowUserName(userName); - task.setFollowShop(shopId); - followTaskService.updateById(task); - stopRecord(task); - return; - } task.setCloseTime(new Date()); task.setState(TaskStateEnum.DEFEAT); task.setReason(TaskDefeatTypeEnum.D); followTaskService.updateById(task); followRecordService.removeByTaskId(task.getId()); + if (Boolean.TRUE.equals(task.getRedistribution())) { + clue.setCloseTime(new Date()); + clue.setClueStatus(ClueStatusEnum.FAILURE); + return; + } else { + clue.setRedistribution(Boolean.TRUE); + } + FollowTask nTask = new FollowTask(); nTask.setClueId(clue.getId()); nTask.setCustomerId(clue.getRefererId()); @@ -345,7 +376,7 @@ public class LeaveNeedDoBizService { nTask.setBeginTime(new Date()); nTask.setRedistribution(Boolean.TRUE); nTask.setDeadline(clue.getDeadline()); - nTask.setFollowUser(adviserId); + nTask.setFollowUser(userId); task.setFollowUserName(userName); nTask.setFollowShop(shopId); nTask.setGroupId(clue.getGroupId()); @@ -353,36 +384,6 @@ public class LeaveNeedDoBizService { followBizService.startTask(nTask); } - private void stopRecord(FollowTask task) { - List list = followRecordService.list(Wrappers.lambdaQuery() - .eq(FollowRecord::getTaskId, task.getId()) - .eq(FollowRecord::getOutTime, Boolean.FALSE) - .eq(FollowRecord::getAddTodo, Boolean.FALSE) - .isNull(FollowRecord::getFollowTime) - ); - if (!CollectionUtils.isEmpty(list)) { - list.forEach(r -> { - r.setUserId(task.getFollowUser()); - r.setUserName(task.getFollowUserName()); - r.setShopId(task.getFollowShop()); - }); - followRecordService.updateBatchById(list); - } - - list = followRecordService.list(Wrappers.lambdaQuery() - .eq(FollowRecord::getTaskId, task.getId()) - .eq(FollowRecord::getOutTime, Boolean.FALSE) - .eq(FollowRecord::getAddTodo, Boolean.TRUE) - .isNull(FollowRecord::getFollowTime) - ); - if (CollectionUtils.isEmpty(list)) { - return; - } - for (FollowRecord record : list) { - followBizService.completeRecordAndEnd(record, true); - } - } - private void finish(LoginAuthBean user, Long leaveId, String key) { leaveNeedDoService.dealById(leaveId); diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/FollowBizService.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/FollowBizService.java index 757267c..b7ea1eb 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/FollowBizService.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/FollowBizService.java @@ -173,10 +173,10 @@ public class FollowBizService { * @param record */ @Transactional(rollbackFor = Exception.class) - public void completeRecordAndEnd(FollowRecord record, boolean needNew) { + public void completeRecordAndEnd(FollowRecord record) { FollowStrategy strategy = followMap.get(record.getType()); Assert.notNull(strategy, "strategy cannot be null"); - strategy.completeRecordAndEnd(record, needNew); + strategy.completeRecordAndEnd(record); } /** 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 1661cbb..d582afe 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 @@ -3,6 +3,7 @@ package cn.fw.valhalla.service.bus.follow.strategy; import cn.fw.common.cache.locker.DistributedLocker; import cn.fw.common.exception.BusinessException; import cn.fw.common.web.auth.LoginAuthBean; +import cn.fw.valhalla.common.constant.RoleCode; import cn.fw.valhalla.common.utils.DateUtil; import cn.fw.valhalla.common.utils.StringUtils; import cn.fw.valhalla.domain.db.OriginalData; @@ -23,7 +24,9 @@ import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO; import cn.fw.valhalla.rpc.erp.TodoRpcService; import cn.fw.valhalla.rpc.erp.UserService; import cn.fw.valhalla.rpc.erp.dto.BackLogItemDTO; +import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; +import cn.fw.valhalla.rpc.erp.dto.UserRoleDataRangeDTO; import cn.fw.valhalla.rpc.oop.OopService; import cn.fw.valhalla.rpc.oop.dto.ShopDTO; import cn.fw.valhalla.service.bus.cust.CustomerBizService; @@ -234,7 +237,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { @Override @Transactional(rollbackFor = Exception.class) - public void completeRecordAndEnd(FollowRecord record, boolean needNew) { + public void completeRecordAndEnd(FollowRecord record) { boolean equals = Boolean.FALSE.equals(record.getOutTime()) && Objects.isNull(record.getFollowTime()); if (!equals) { return; @@ -242,9 +245,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { final Date followTime = DateUtil.localDateTime2Date(LocalDateTime.now()); record.setFollowTime(followTime); followRecordService.updateById(record); - if (needNew) { - this.addTaskRecord(record, false); - } + this.addTaskRecord(record, false); BackLogItemDTO dto = new BackLogItemDTO(record.getUserId(), getItemCode(record.getType()), String.valueOf(record.getId()), followTime, record.getShopId()); todoRpcService.complete(dto); } @@ -845,7 +846,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { if (!CollectionUtils.isEmpty(recordList)) { for (FollowRecord record : recordList) { if (Boolean.TRUE.equals(record.getAddTodo())) { - completeRecordAndEnd(record, false); + completeRecordAndEnd(record); } else { followRecordService.removeById(record.getId()); } @@ -867,6 +868,11 @@ public abstract class AbstractFollowStrategy implements FollowStrategy { if (!TaskStateEnum.ONGOING.equals(task.getState())) { return true; } + boolean isFwgw = FollowTypeEnum.FM.equals(task.getType()) || FollowTypeEnum.RM.equals(task.getType()); + List dataRange = userService.getUserRoleDataRange(task.getFollowUser(), isFwgw ? RoleCode.FWGW : RoleCode.XBGJ); + if (CollectionUtils.isEmpty(dataRange)) { + return true; + } //任务截止日期 final Date deadline = task.getDeadline(); Optional fcsetting = settingBizService.querySettingByType(record.getType(), SettingTypeEnum.FOLLOW_CYCLE, record.getGroupId()); diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/FollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/FollowStrategy.java index 1884cb4..ad8333c 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/FollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/FollowStrategy.java @@ -69,7 +69,7 @@ public interface FollowStrategy { * * @param record */ - void completeRecordAndEnd(FollowRecord record, boolean needNew); + void completeRecordAndEnd(FollowRecord record); /** * 上传跟进附件 diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java index f37e7bc..cbeed1f 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/ACFollowStrategy.java @@ -105,7 +105,7 @@ public class ACFollowStrategy extends AbstractFollowStrategy { } @Override - public void completeRecordAndEnd(FollowRecord record, boolean needNew) { + public void completeRecordAndEnd(FollowRecord record) { final Date followTime = DateUtil.localDateTime2Date(LocalDateTime.now()); BackLogItemDTO dto = new BackLogItemDTO(record.getUserId(), getItemCode(record.getType()), String.valueOf(record.getId()), followTime, record.getShopId()); if (Boolean.FALSE.equals(record.getOutTime()) && Objects.isNull(record.getFollowTime())) { diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowRecordServiceImpl.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowRecordServiceImpl.java index 48b0c57..610f0b1 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowRecordServiceImpl.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowRecordServiceImpl.java @@ -73,7 +73,7 @@ public class FollowRecordServiceImpl extends ServiceImpllambdaQuery() .eq(FollowRecord::getTaskId, taskId) - .eq(FollowRecord::getOutTime, Boolean.FALSE) + .eq(FollowRecord::getAddTodo, Boolean.FALSE) .isNull(FollowRecord::getFollowTime) ); } -- libgit2 0.22.2