优化首页

This commit is contained in:
zhujj 2019-01-09 11:02:08 +08:00
parent 427e457e9f
commit cc8517e771
2 changed files with 10 additions and 9 deletions

View File

@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="name" column="name" />
<result property="price" column="price" />
<result property="enableControlTime" column="enable_control_time" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectExamPracticeVo">
id, dept_id, name, enable_control_time, start_time, end_time, practice_user_limit, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
id, dept_id, name, price,enable_control_time, start_time, end_time, practice_user_limit, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
<select id="selectExamPracticeList" parameterType="ExamPractice" resultMap="ExamPracticeResult">
select

View File

@ -1,5 +1,5 @@
package com.ruoyi.framework.jwt;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
@ -8,16 +8,16 @@ import com.auth0.jwt.interfaces.DecodedJWT;
import com.ruoyi.framework.web.util.ServletUtils;
import java.util.Date;
/**
* @author Mr.Li
* @create 2018-07-12 14:23
* @desc JWT工具类
**/
public class JwtUtil {
private static final long EXPIRE_TIME = 5 * 60 * 1000;
/**
* 校验token是否正确
*
@ -39,7 +39,7 @@ public class JwtUtil {
return false;
}
}
/**
* 获得token中的信息无需secret解密也能获得
*
@ -47,14 +47,14 @@ public class JwtUtil {
*/
public static String getLoginName() {
try {
String token = ServletUtils.getRequest().getHeader("Authorization");
String token = ServletUtils.getRequest().getHeader("token");
DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim("loginName").asString();
} catch (JWTDecodeException e) {
return null;
}
}
/**
* 生成签名,5min后过期
*
@ -70,6 +70,6 @@ public class JwtUtil {
.withClaim("loginName", loginName)
.withExpiresAt(date)
.sign(algorithm);
}
}