release- 填写邀请码自动互相关注

release-2024-04-25
pikaqiudeshujia 2 months ago
parent 5ac5dde8a9
commit 539f3e2bc4

@ -70,14 +70,13 @@ public class UserInfoService {
private final UserPointLogService userPointLogService; private final UserPointLogService userPointLogService;
private final UserPointLogDao userPointLogDao; private final UserCollectInfoService userCollectInfoService;
public UserInfoService(UserInfoDao userInfoDao, IdWorker idWorker, RedisTemplate redisTemplate, public UserInfoService(UserInfoDao userInfoDao, IdWorker idWorker, RedisTemplate redisTemplate,
RabbitTemplate rabbitTemplate, BCryptPasswordEncoder encoder, RabbitTemplate rabbitTemplate, BCryptPasswordEncoder encoder,
HttpServletRequest request, HttpServletRequest request,
JwtUtil jwtUtil, UserRealNameDao userRealNameDao, UserBankDao userBankDao, JwtUtil jwtUtil, UserRealNameDao userRealNameDao, UserBankDao userBankDao,
WithdrawDao withdrawDao, UserPointLogService userPointLogService, WithdrawDao withdrawDao, UserPointLogService userPointLogService, UserCollectInfoService userCollectInfoService) {
UserPointLogDao userPointLogDao) {
this.userInfoDao = userInfoDao; this.userInfoDao = userInfoDao;
this.idWorker = idWorker; this.idWorker = idWorker;
this.redisTemplate = redisTemplate; this.redisTemplate = redisTemplate;
@ -89,7 +88,7 @@ public class UserInfoService {
this.userBankDao = userBankDao; this.userBankDao = userBankDao;
this.withdrawDao = withdrawDao; this.withdrawDao = withdrawDao;
this.userPointLogService = userPointLogService; this.userPointLogService = userPointLogService;
this.userPointLogDao = userPointLogDao; this.userCollectInfoService = userCollectInfoService;
} }
/** /**
@ -293,6 +292,14 @@ public class UserInfoService {
userInfoDaoByInvitationCode.getId()); userInfoDaoByInvitationCode.getId());
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.NEW_USER_INVITE, userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.NEW_USER_INVITE,
userInfo.getId()); 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 { } else {
throw new BizException(ErrorConstants.INVITATION_CODE_IS_INCORRECT); throw new BizException(ErrorConstants.INVITATION_CODE_IS_INCORRECT);
} }

Loading…
Cancel
Save