Merge remote-tracking branch 'origin/master'

master
shijie 4 years ago
commit 65ecebc84d
  1. 4
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  2. 1
      dq-framework-common/src/main/java/com/daqing/framework/util/JwtUtils.java

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

Loading…
Cancel
Save