From 7d8c2d92b008b38f4f0f128a23fbe17805a0fa1c Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 20 Oct 2025 18:15:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E5=9C=A8=E9=BA=A6=E6=97=B6?= =?UTF-8?q?=E9=95=BF=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/service/task/TaskServiceImpl.java | 6 ++++ .../circle/other/app/dto/task/TaskDTO.java | 28 +++++-------------- 2 files changed, 13 insertions(+), 21 deletions(-) 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; - } }