From c404a10a7e9a308ef7857c2dd52f8035c03dedf3 Mon Sep 17 00:00:00 2001 From: huangyawei Date: Sat, 12 Oct 2024 21:50:42 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E6=AF=8F=E6=97=A5=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BF=AE=E5=A4=8D=E7=8A=B6=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/constants/ErrorConstants.java | 2 +- .../com/luoo/user/service/TaskPointService.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/luoo_common/src/main/java/constants/ErrorConstants.java b/luoo_common/src/main/java/constants/ErrorConstants.java index 6001b96..769629d 100644 --- a/luoo_common/src/main/java/constants/ErrorConstants.java +++ b/luoo_common/src/main/java/constants/ErrorConstants.java @@ -61,6 +61,6 @@ public class ErrorConstants { public static final String POINT_NOT_ENOUGH = "积分不足"; // 积分部分 - public static final String DAILY_SIGN_ALREADY = "进入已签到"; + public static final String DAILY_SIGN_ALREADY = "今日已签到"; } diff --git a/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java b/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java index e4b4fa6..7524002 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/TaskPointService.java @@ -193,14 +193,15 @@ public class TaskPointService { } else { taskPoint.setUserStatus(PointEnums.NOT_PARTICIPATED.getCode()); } - } - if (Objects.equals(taskPoint.getType(), Integer.valueOf(TaskPointIdConstants.DAILY_SIGN))) { - // 校验今日是否已签到 - UserPointLog todayByUserIdAndTaskPointId = userPointLogDao.findTodayByUserIdAndTaskPointId(userLoginDto.getUserId(), TaskPointIdConstants.DAILY_SIGN); - if(todayByUserIdAndTaskPointId != null) { - taskPoint.setUserStatus(PointEnums.PARTICIPATED.getCode()); - } else { - taskPoint.setUserStatus(PointEnums.NOT_PARTICIPATED.getCode()); + } else { + if (!Objects.equals(taskPoint.getId(), TaskPointIdConstants.NEW_USER_INVITE)) { + // 校验今日是否已签到 + UserPointLog todayByUserIdAndTaskPointId = userPointLogDao.findTodayByUserIdAndTaskPointId(userLoginDto.getUserId(), taskPoint.getId()); + if(todayByUserIdAndTaskPointId != null) { + taskPoint.setUserStatus(PointEnums.PARTICIPATED.getCode()); + } else { + taskPoint.setUserStatus(PointEnums.NOT_PARTICIPATED.getCode()); + } } }