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