diff --git a/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java b/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java index eb453748a..e722ad78f 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java @@ -33,7 +33,9 @@ import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.core.Ordered; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; +import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.stereotype.Component; import org.springframework.util.AntPathMatcher; @@ -61,6 +63,10 @@ public class AuthFilter implements GlobalFilter, Ordered { public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { //校验 Token 放行 String originalRequestUrl = RequestProvider.getOriginalRequestUrl(exchange); +// ServerHttpRequest request = exchange.getRequest(); + +// HttpHeaders headers = request.getHeaders(); +// headers.add("hwy_req","1"); String path = exchange.getRequest().getURI().getPath(); if (isSkip(path) || isSkip(originalRequestUrl)) { return chain.filter(exchange); @@ -88,6 +94,8 @@ public class AuthFilter implements GlobalFilter, Ordered { return unAuth(resp, "令牌已失效"); } } + + return chain.filter(exchange); } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java b/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java index b351716ca..c23b199e7 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java @@ -40,6 +40,7 @@ public class RequestFilter implements GlobalFilter, Ordered { // 1. 清洗请求头中from 参数 ServerHttpRequest request = exchange.getRequest().mutate() .headers(httpHeaders -> httpHeaders.remove("X")) + .headers(httpHeaders -> httpHeaders.add("hwy-req","1")) .build(); // 2. 重写StripPrefix diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java index bfcc3910d..07336fcec 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java @@ -86,11 +86,12 @@ public class QualityDeliverListener { exchange = @Exchange(name = ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE, type = ExchangeTypes.TOPIC), key = ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY )) - public void data(String msg) { + public void data(String msg) throws InterruptedException { log.info("配送明细基础表处理: {}", msg); if (StrUtil.isEmpty(msg)) { return; } + Thread.sleep(1000*10); ReportQualityDeliverDTO bean = JSONUtil.toBean(msg, ReportQualityDeliverDTO.class); String data = bean.getData(); QualityDeliverEntity qualityDeliverEntity = JSONUtil.toBean(data, QualityDeliverEntity.class); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java index d56b33b43..36182e8c4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java @@ -55,6 +55,8 @@ public class ReservationPlanReportListener { )) @Transactional(rollbackFor = Exception.class) public void buildReport(String msg) { + + log.info("预约计划生成明细报表: {}", msg); if (StrUtil.isEmpty(msg)) { return;