dev
This commit is contained in:
parent
bbb70e9847
commit
db14bc53ed
|
|
@ -9,7 +9,6 @@ import com.syjiaer.clinic.server.common.util.ParmsUtil;
|
|||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jws;
|
||||
import io.jsonwebtoken.JwtException;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.security.Keys;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
|
@ -51,9 +50,9 @@ public class MvcInterceptor implements HandlerInterceptor {
|
|||
return true; // 如果方法上有 @NoAuthCheck 注解,则跳过检查
|
||||
}
|
||||
}
|
||||
return checkManage(response);
|
||||
return checkManager(response);
|
||||
}
|
||||
private Boolean checkManage(HttpServletResponse response) throws IOException {
|
||||
private Boolean checkManager(HttpServletResponse response) throws IOException {
|
||||
Map<String, String> headers =headersUtil.getMap();
|
||||
String token = headers.get("authorization");
|
||||
if (token == null || token.isEmpty()) {
|
||||
|
|
@ -66,9 +65,6 @@ public class MvcInterceptor implements HandlerInterceptor {
|
|||
.verifyWith(Keys.hmacShaKeyFor(jwtSecret.getBytes()))
|
||||
.build()
|
||||
.parseSignedClaims(token);
|
||||
} catch (JwtException e) {
|
||||
setErrorResult(response,"登录令牌已失效,请重新登陆",301);
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
setErrorResult(response,"登录令牌已失效,请重新登陆",301);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ public class SocialDirectoryService extends BaseService {
|
|||
queryWrapper.in("code", code_list);
|
||||
socialDirectoryMapper.delete(queryWrapper);
|
||||
}
|
||||
return insertSocialDirectorys(version_name, type, tab_list);
|
||||
return insertAll(version_name, type, tab_list);
|
||||
}
|
||||
|
||||
private String insertSocialDirectorys(String version_name, int type, List<String[]> tab_list) {
|
||||
private String insertAll(String version_name, int type, List<String[]> tab_list) {
|
||||
Map<String, String> title_map = dictoryUtil.getTitleMap(String.valueOf(type));
|
||||
List<SocialDirectory> list = new ArrayList<>();
|
||||
HashMap<String, SocialDirectory> tmp_map = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue