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

release-2024-04-25
huangyw 11 hours ago
parent e2011afa8a
commit 96d857d5a3

@ -68,12 +68,9 @@ public class UserPointLogService {
private final LotteryUserDao lotteryUserDao; private final LotteryUserDao lotteryUserDao;
private final UserPointLogService userPointLogService;
public UserPointLogService(UserPointLogDao userPointLogDao, IdWorker idWorker, JwtUtil jwtUtil, public UserPointLogService(UserPointLogDao userPointLogDao, IdWorker idWorker, JwtUtil jwtUtil,
TaskPointDao taskPointDao, RabbitTemplate rabbitTemplate, UserInfoDao userInfoDao, TaskPointDao taskPointDao, RabbitTemplate rabbitTemplate, UserInfoDao userInfoDao,
JPAQueryFactory jpaQueryFactory, LotteryUserDao lotteryUserDao, JPAQueryFactory jpaQueryFactory, LotteryUserDao lotteryUserDao) {
UserPointLogService userPointLogService) {
this.userPointLogDao = userPointLogDao; this.userPointLogDao = userPointLogDao;
this.idWorker = idWorker; this.idWorker = idWorker;
this.jwtUtil = jwtUtil; this.jwtUtil = jwtUtil;
@ -82,7 +79,6 @@ public class UserPointLogService {
this.userInfoDao = userInfoDao; this.userInfoDao = userInfoDao;
this.jpaQueryFactory = jpaQueryFactory; this.jpaQueryFactory = jpaQueryFactory;
this.lotteryUserDao = lotteryUserDao; this.lotteryUserDao = lotteryUserDao;
this.userPointLogService = userPointLogService;
} }
private TaskPointService taskPointService; private TaskPointService taskPointService;
@ -250,7 +246,7 @@ public class UserPointLogService {
List<UserPointLog> userPointLogsByUserIdAndTaskPointId3 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( List<UserPointLog> userPointLogsByUserIdAndTaskPointId3 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.INVITE_USER_3, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_3, userPointLog.getUserId());
if (userPointLogsByUserIdAndTaskPointId3.isEmpty()) { if (userPointLogsByUserIdAndTaskPointId3.isEmpty()) {
userPointLogService.addByTaskDailyAndUserId( addByTaskDailyAndUserId(
TaskPointIdConstants.INVITE_USER_3, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_3, userPointLog.getUserId());
} }
} }
@ -259,7 +255,7 @@ public class UserPointLogService {
List<UserPointLog> userPointLogsByUserIdAndTaskPointId6 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( List<UserPointLog> userPointLogsByUserIdAndTaskPointId6 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.INVITE_USER_6, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_6, userPointLog.getUserId());
if (userPointLogsByUserIdAndTaskPointId6.isEmpty()) { if (userPointLogsByUserIdAndTaskPointId6.isEmpty()) {
userPointLogService.addByTaskDailyAndUserId( addByTaskDailyAndUserId(
TaskPointIdConstants.INVITE_USER_6, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_6, userPointLog.getUserId());
} }
} }
@ -268,7 +264,7 @@ public class UserPointLogService {
List<UserPointLog> userPointLogsByUserIdAndTaskPointId10 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( List<UserPointLog> userPointLogsByUserIdAndTaskPointId10 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.INVITE_USER_10, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_10, userPointLog.getUserId());
if (userPointLogsByUserIdAndTaskPointId10.isEmpty()) { if (userPointLogsByUserIdAndTaskPointId10.isEmpty()) {
userPointLogService.addByTaskDailyAndUserId( addByTaskDailyAndUserId(
TaskPointIdConstants.INVITE_USER_10, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_10, userPointLog.getUserId());
} }
} }
@ -277,7 +273,7 @@ public class UserPointLogService {
List<UserPointLog> userPointLogsByUserIdAndTaskPointId20 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId( List<UserPointLog> userPointLogsByUserIdAndTaskPointId20 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
TaskPointIdConstants.INVITE_USER_20, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_20, userPointLog.getUserId());
if (userPointLogsByUserIdAndTaskPointId20.isEmpty()) { if (userPointLogsByUserIdAndTaskPointId20.isEmpty()) {
userPointLogService.addByTaskDailyAndUserId( addByTaskDailyAndUserId(
TaskPointIdConstants.INVITE_USER_20, userPointLog.getUserId()); TaskPointIdConstants.INVITE_USER_20, userPointLog.getUserId());
} }
} }

Loading…
Cancel
Save