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 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);
}

Loading…
Cancel
Save