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 {