diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/task/TaskServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/task/TaskServiceImpl.java index bfea4417..45d3d38a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/task/TaskServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/task/TaskServiceImpl.java @@ -293,6 +293,12 @@ public class TaskServiceImpl implements TaskService { .cover(activity.getActivityRewardProps().get(0).getCover()) .quantity(activity.getActivityRewardProps().get(0).getQuantity()) .build(); + + if (item.getTaskId() == 1) { + String redisKey = "mic:heartbeat:" + userId; + String inc = redisService.getString(redisKey); + build.setConditionValue(inc); + } resultList.add(build); } }); diff --git a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/task/TaskDTO.java b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/task/TaskDTO.java index 7eb9a84f..f624e0ed 100644 --- a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/task/TaskDTO.java +++ b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/task/TaskDTO.java @@ -1,14 +1,15 @@ package com.red.circle.other.app.dto.task; +import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.Date; - @Data @NoArgsConstructor +@Builder +@AllArgsConstructor public class TaskDTO { private Integer taskType; @@ -18,6 +19,10 @@ public class TaskDTO { //类型 1 2 3 金币 头像 气泡 private String conditionType; + /** + * 条件值(如:600秒)(预留) + */ + private String conditionValue; private Integer sortOrder; private Long taskId; @@ -29,28 +34,9 @@ public class TaskDTO { private String taskIcon; private Integer isRewardCollected; - - - /** * 数量. */ private Integer quantity; - @Builder - - public TaskDTO(Integer taskType, String taskName, String taskDesc, String jumpPage, String conditionType, Integer sortOrder, Long taskId, Integer taskStatus, String cover, String taskIcon, Integer isRewardCollected, Integer quantity) { - this.taskType = taskType; - this.taskName = taskName; - this.taskDesc = taskDesc; - this.jumpPage = jumpPage; - this.conditionType = conditionType; - this.sortOrder = sortOrder; - this.taskId = taskId; - this.taskStatus = taskStatus; - this.cover = cover; - this.taskIcon = taskIcon; - this.isRewardCollected = isRewardCollected; - this.quantity = quantity; - } }