release- 多次连续签到额外积分异步处理方式

release-2024-04-25
huangyw 7 hours ago
parent 96d857d5a3
commit 8dcea9e4c3

@ -221,21 +221,32 @@ public class UserPointLogService {
List<UserPointLog> daysByUserIdAndTaskPointId3 = userPointLogDao.findDaysByUserIdAndTaskPointId(
userPointLog.getUserId(), TaskPointIdConstants.DAILY_SIGN, 3 - 1);
if (daysByUserIdAndTaskPointId3.size() == 3 - 1) {
addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_3, userPointLog.getUserId());
List<UserPointLog> sign3 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.DAILY_SIGN_3, userPointLog.getUserId());
if (sign3.isEmpty()) {
addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_3, userPointLog.getUserId());
}
}
// 连续7天签到
List<UserPointLog> daysByUserIdAndTaskPointId7 = userPointLogDao.findDaysByUserIdAndTaskPointId(
userPointLog.getUserId(), TaskPointIdConstants.DAILY_SIGN, 7 - 1);
if (daysByUserIdAndTaskPointId7.size() == 7 - 1) {
addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_7, userPointLog.getUserId());
List<UserPointLog> sign7 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.DAILY_SIGN_7, userPointLog.getUserId());
if (sign7.isEmpty()) {
addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_7, userPointLog.getUserId());
}
}
// 连续30天签到
List<UserPointLog> daysByUserIdAndTaskPointId30 = userPointLogDao.findDaysByUserIdAndTaskPointId(
userPointLog.getUserId(), TaskPointIdConstants.DAILY_SIGN, 30 - 1);
if (daysByUserIdAndTaskPointId30.size() == 30 - 1) {
addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_30, userPointLog.getUserId());
List<UserPointLog> sign30 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.DAILY_SIGN_30, userPointLog.getUserId());
if (sign30.isEmpty()) {
addByTaskDailyAndUserId(TaskPointIdConstants.DAILY_SIGN_30, userPointLog.getUserId());
}
}
}
} else {

Loading…
Cancel
Save