From 539f3e2bc4bab690048dbb3918cb37b20c8ba462 Mon Sep 17 00:00:00 2001 From: pikaqiudeshujia Date: Mon, 25 Nov 2024 08:24:26 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E5=A1=AB=E5=86=99=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E7=A0=81=E8=87=AA=E5=8A=A8=E4=BA=92=E7=9B=B8=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../luoo/user/service/UserInfoService.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index 127eff0..5c42df7 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -70,14 +70,13 @@ public class UserInfoService { private final UserPointLogService userPointLogService; - private final UserPointLogDao userPointLogDao; + private final UserCollectInfoService userCollectInfoService; public UserInfoService(UserInfoDao userInfoDao, IdWorker idWorker, RedisTemplate redisTemplate, - RabbitTemplate rabbitTemplate, BCryptPasswordEncoder encoder, - HttpServletRequest request, - JwtUtil jwtUtil, UserRealNameDao userRealNameDao, UserBankDao userBankDao, - WithdrawDao withdrawDao, UserPointLogService userPointLogService, - UserPointLogDao userPointLogDao) { + RabbitTemplate rabbitTemplate, BCryptPasswordEncoder encoder, + HttpServletRequest request, + JwtUtil jwtUtil, UserRealNameDao userRealNameDao, UserBankDao userBankDao, + WithdrawDao withdrawDao, UserPointLogService userPointLogService, UserCollectInfoService userCollectInfoService) { this.userInfoDao = userInfoDao; this.idWorker = idWorker; this.redisTemplate = redisTemplate; @@ -89,8 +88,8 @@ public class UserInfoService { this.userBankDao = userBankDao; this.withdrawDao = withdrawDao; this.userPointLogService = userPointLogService; - this.userPointLogDao = userPointLogDao; - } + this.userCollectInfoService = userCollectInfoService; + } /** * token解析示例 @@ -293,6 +292,14 @@ public class UserInfoService { userInfoDaoByInvitationCode.getId()); userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.NEW_USER_INVITE, userInfo.getId()); + + // 互相关注 + userCollectInfoService.saveCollect(userInfo.getId(), userInfoDaoByInvitationCode.getId(), 2); + userCollectInfoService.saveCollect(userInfoDaoByInvitationCode.getId(), userInfo.getId(), 2); + + // 首次关注有积分 + userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.SUCCESS_FOLLOW_ONE_USER, userInfo.getId()); + userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.SUCCESS_FOLLOW_ONE_USER, userInfoDaoByInvitationCode.getId()); } else { throw new BizException(ErrorConstants.INVITATION_CODE_IS_INCORRECT); }