@ -125,9 +125,9 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
}
//登录成功,token生成
long times = 8460000;
long times = 86400;
if(loginRequest.getTenDayEffective() == 1){
times = 846000000;
times = 864000;
String token = JwtUtils.createJWT(userEntity.getId()+"","token", times);
Token userToken = tokenService.getOne(new QueryWrapper<Token>().eq("user_id", userEntity.getId()));
@ -25,6 +25,7 @@ public class JwtUtils {
*
*/
public static String createJWT(String id, String subject, long ttlMillis) {
ttlMillis = ttlMillis * 1000;
SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
long nowMillis = System.currentTimeMillis();
Date now = new Date(nowMillis);