|
|
@ -269,7 +269,7 @@ public class UserInfoService {
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
if(isNewUser) {
|
|
|
|
if (isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -343,7 +343,7 @@ public class UserInfoService {
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
|
|
|
|
|
|
|
|
if(isNewUser) {
|
|
|
|
if (isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -383,7 +383,7 @@ public class UserInfoService {
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
if(isNewUser) {
|
|
|
|
if (isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -469,7 +469,7 @@ public class UserInfoService {
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
if(isNewUser) {
|
|
|
|
if (isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -820,7 +820,7 @@ public class UserInfoService {
|
|
|
|
long totalElements = withdrawPage.getTotalElements();
|
|
|
|
long totalElements = withdrawPage.getTotalElements();
|
|
|
|
List<Withdraw> content = withdrawPage.getContent();
|
|
|
|
List<Withdraw> content = withdrawPage.getContent();
|
|
|
|
for (Withdraw withdraw : content) {
|
|
|
|
for (Withdraw withdraw : content) {
|
|
|
|
if(withdraw.getState() != null) {
|
|
|
|
if (withdraw.getState() != null) {
|
|
|
|
withdraw.setStateStr(Objects.requireNonNull(WithdrawStateEnum.getByCode(withdraw.getState())).getDesc());
|
|
|
|
withdraw.setStateStr(Objects.requireNonNull(WithdrawStateEnum.getByCode(withdraw.getState())).getDesc());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -853,11 +853,11 @@ public class UserInfoService {
|
|
|
|
if (o == null) {
|
|
|
|
if (o == null) {
|
|
|
|
throw new BizException("二维码失效!");
|
|
|
|
throw new BizException("二维码失效!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!String.valueOf(o).equals("0") && !String.valueOf(o).equals("1")) {
|
|
|
|
if (!String.valueOf(o).equals("0") && !String.valueOf(o).equals("1")) {
|
|
|
|
throw new BizException("登录认证已完成");
|
|
|
|
throw new BizException("登录认证已完成");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(type == 1) {
|
|
|
|
if (type == 1) {
|
|
|
|
// 扫码
|
|
|
|
// 扫码
|
|
|
|
redisTemplate.opsForValue().set(token, 1, 60, TimeUnit.SECONDS);
|
|
|
|
redisTemplate.opsForValue().set(token, 1, 60, TimeUnit.SECONDS);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -884,7 +884,7 @@ public class UserInfoService {
|
|
|
|
public String createInvitationCode(String token) {
|
|
|
|
public String createInvitationCode(String token) {
|
|
|
|
UserLoginDto user = jwtUtil.getUserLoginDto(token);
|
|
|
|
UserLoginDto user = jwtUtil.getUserLoginDto(token);
|
|
|
|
UserInfo byId = userInfoDao.getById(user.getUserId());
|
|
|
|
UserInfo byId = userInfoDao.getById(user.getUserId());
|
|
|
|
if(StringUtils.isNotBlank(byId.getInvitationCode())) {
|
|
|
|
if (StringUtils.isNotBlank(byId.getInvitationCode())) {
|
|
|
|
return byId.getInvitationCode();
|
|
|
|
return byId.getInvitationCode();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -907,4 +907,14 @@ public class UserInfoService {
|
|
|
|
public List<UserInfo> getExpireVipList() {
|
|
|
|
public List<UserInfo> getExpireVipList() {
|
|
|
|
return userInfoDao.getExpireVipList();
|
|
|
|
return userInfoDao.getExpireVipList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 根据邀请码查询用户信息
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param invitationCode 邀请码
|
|
|
|
|
|
|
|
* @return 用户信息
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public UserInfo getUserInfoByInvitationCode(String invitationCode) {
|
|
|
|
|
|
|
|
return userInfoDao.findByInvitationCode(invitationCode);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|