From 8dcea9e4c30a028511feef1fa0a9ac7a7314b066 Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Sat, 23 Nov 2024 12:37:45 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E5=A4=9A=E6=AC=A1=E8=BF=9E=E7=BB=AD?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E9=A2=9D=E5=A4=96=E7=A7=AF=E5=88=86=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E5=A4=84=E7=90=86=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/service/UserPointLogService.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java b/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java index cda9c5a..fdeaa28 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java @@ -221,21 +221,32 @@ public class UserPointLogService { List daysByUserIdAndTaskPointId3 = userPointLogDao.findDaysByUserIdAndTaskPointId( userPointLog.getUserId(), TaskPointIdConstants.DAILY_SIGN, 3 - 1); if (daysByUserIdAndTaskPointId3.size() == 3 - 1) { - addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_3, userPointLog.getUserId()); + List sign3 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( + TaskPointIdConstants.DAILY_SIGN_3, userPointLog.getUserId()); + if (sign3.isEmpty()) { + addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_3, userPointLog.getUserId()); + } } // 连续7天签到 List daysByUserIdAndTaskPointId7 = userPointLogDao.findDaysByUserIdAndTaskPointId( userPointLog.getUserId(), TaskPointIdConstants.DAILY_SIGN, 7 - 1); if (daysByUserIdAndTaskPointId7.size() == 7 - 1) { - addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_7, userPointLog.getUserId()); + List sign7 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( + TaskPointIdConstants.DAILY_SIGN_7, userPointLog.getUserId()); + if (sign7.isEmpty()) { + addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_7, userPointLog.getUserId()); + } } - // 连续30天签到 List daysByUserIdAndTaskPointId30 = userPointLogDao.findDaysByUserIdAndTaskPointId( userPointLog.getUserId(), TaskPointIdConstants.DAILY_SIGN, 30 - 1); if (daysByUserIdAndTaskPointId30.size() == 30 - 1) { - addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_30, userPointLog.getUserId()); + List sign30 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( + TaskPointIdConstants.DAILY_SIGN_30, userPointLog.getUserId()); + if (sign30.isEmpty()) { + addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_30, userPointLog.getUserId()); + } } } } else {