Browse Source

1.验证工厂token打印日志改为error级别

training
zhenghaoyu 1 year ago
parent
commit
9ef6866abb
  1. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryTokenServiceImpl.java

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryTokenServiceImpl.java

@ -32,14 +32,14 @@ public class FactoryTokenServiceImpl extends BaseServiceImpl<FactoryTokenMapper,
.eq("corpid",corpId);
FactoryToken factoryToken = baseMapper.selectOne(queryWrapper);
if(Objects.isNull(factoryToken)){
logger.warn("#########verifyToken: token验证不通过 token={},corpid={}",token,corpId);
logger.error("#########verifyToken: token验证不通过 token={},corpid={}",token,corpId);
return false;
}
Long expireTimeLong = factoryToken.getExpireTime().getTime();
Long now = new Date().getTime();
//判断是否过期
if(now > expireTimeLong){
logger.warn("#########verifyToken: token验证不通过 已过期 token={},corpId={}",token,corpId);
logger.error("#########verifyToken: token验证不通过 已过期 token={},corpId={}",token,corpId);
return false;
}
return true;

Loading…
Cancel
Save