|
|
@ -267,14 +267,13 @@ public class UserInfoService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
if(isNewUser) {
|
|
|
|
if(isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, userInfo.getId());
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return token;
|
|
|
|
return Constants.TOKEN_PREFIX
|
|
|
|
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -338,14 +337,14 @@ public class UserInfoService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
|
|
|
|
|
|
|
|
if(isNewUser) {
|
|
|
|
if(isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, userInfo.getId());
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return token;
|
|
|
|
return Constants.TOKEN_PREFIX
|
|
|
|
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String appleLoginOrRegister(UserInfo loginUserInfo) {
|
|
|
|
public String appleLoginOrRegister(UserInfo loginUserInfo) {
|
|
|
@ -376,13 +375,13 @@ public class UserInfoService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
if(isNewUser) {
|
|
|
|
if(isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, userInfo.getId());
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return Constants.TOKEN_PREFIX
|
|
|
|
return token;
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -459,13 +458,13 @@ public class UserInfoService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfo.setLastLoginTime(new Date());
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
userInfoDao.save(userInfo);
|
|
|
|
|
|
|
|
String token = Constants.TOKEN_PREFIX
|
|
|
|
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
if(isNewUser) {
|
|
|
|
if(isNewUser) {
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
// 只有新用户会获得积分
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, userInfo.getId());
|
|
|
|
userPointLogService.addByTaskNew(TaskPointIdConstants.NEW_USER_WELCOME_AWARD, token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return Constants.TOKEN_PREFIX
|
|
|
|
return token;
|
|
|
|
+ jwtUtil.createJWT(userInfo.getId(), userInfo.getNickName(), Constants.TOKEN_ROLE_APP_USER, userInfo.getAvatar());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|