add log
parent
f5d0f4e473
commit
40cca10e8b
|
@ -30,15 +30,19 @@ public class CacheRequestGatewayFilter implements GatewayFilter {
|
||||||
String userId = exchange.getRequest().getHeaders().getFirst(SecurityConstants.DETAILS_USER_ID);
|
String userId = exchange.getRequest().getHeaders().getFirst(SecurityConstants.DETAILS_USER_ID);
|
||||||
log.info("经过公司过滤器,{}", userId);
|
log.info("经过公司过滤器,{}", userId);
|
||||||
log.info("请求的uri是:{}",exchange.getRequest().getPath().toString());
|
log.info("请求的uri是:{}",exchange.getRequest().getPath().toString());
|
||||||
// GET DELETE 不过滤
|
if ("/firm/firm/by/userId".equals(exchange.getRequest().getPath().toString())){
|
||||||
RedisService redisService = SpringUtils.getBean(RedisService.class);
|
// GET DELETE 不过滤
|
||||||
FirmInfoCache firmInfoCache = redisService.getCacheObject("company:" + userId);
|
RedisService redisService = SpringUtils.getBean(RedisService.class);
|
||||||
log.info("企业对象是{}:", JSONObject.toJSONString(firmInfoCache));
|
FirmInfoCache firmInfoCache = redisService.getCacheObject("company:" + userId);
|
||||||
|
log.info("企业对象是{}:", JSONObject.toJSONString(firmInfoCache));
|
||||||
|
|
||||||
if (firmInfoCache == null) {
|
if (firmInfoCache == null) {
|
||||||
log.error("[鉴权异常处理]请求路径:{}", exchange.getRequest().getPath());
|
log.error("[鉴权异常处理]请求路径:{}", exchange.getRequest().getPath());
|
||||||
return ServletUtils.webFluxResponseWriter(exchange.getResponse(), "您还未进行企业认证", HttpStatus.UNAUTHORIZED);
|
return ServletUtils.webFluxResponseWriter(exchange.getResponse(), "您还未进行企业认证", HttpStatus.UNAUTHORIZED);
|
||||||
|
}
|
||||||
|
return chain.filter(exchange);
|
||||||
}
|
}
|
||||||
|
|
||||||
return chain.filter(exchange);
|
return chain.filter(exchange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue