From adccc27ecee1a4acd814ebcc0bc734e1b97f5075 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Mon, 30 Dec 2024 18:27:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E7=B4=A2=E8=8F=B2=E4=BA=9A?= =?UTF-8?q?=E5=B7=A5=E5=8E=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 增加华之韵物流对接 --- .../suofeiya/interceptor/FactoryAccountsInterceptor.java | 6 ++++-- .../suofeiya/pros/FactoryDataSuoFeiYaProperties.java | 2 +- .../suofeiya/service/impl/DeliveryNoteServiceImpl.java | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java index e3351d28b..31740be1b 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java @@ -134,12 +134,14 @@ public class FactoryAccountsInterceptor implements HandlerInterceptor { request = wrappedRequest; RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); return true; + } else { + returnJson(response, JSONObject.toJSONString(R.fail(1, "认证不通过,配置缺失"))); + return false; } - }else{ + } else { returnJson(response, JSONObject.toJSONString(R.fail(1, "缺少参数 companyCode"))); return false; } - return false; } catch (Exception e) { e.printStackTrace(); returnJson(response, JSONObject.toJSONString(R.fail(5, "服务异常,请联系管理员"))); diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java index 45cdf1d01..184147872 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java @@ -18,7 +18,7 @@ public class FactoryDataSuoFeiYaProperties { private String auth; /** auth过期时间 */ - private Long authTime; + private Long authTime = 5L; /** 回传配置 */ private PushProperties push; diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/DeliveryNoteServiceImpl.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/DeliveryNoteServiceImpl.java index e5b1bcc02..f78dd87fb 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/DeliveryNoteServiceImpl.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/DeliveryNoteServiceImpl.java @@ -254,13 +254,13 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl factoryAuth = baseMapper.findFactoryAuth(companyCode); - if(CollUtil.isNotEmpty(factoryAuth)){ + if (CollUtil.isNotEmpty(factoryAuth)) { FactoryAuthVO authVO = factoryAuth.get(0); bladeRedis.setEx(key, JSONUtil.toJsonStr(authVO), Duration.ofDays(1)); return authVO; @@ -274,7 +274,7 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl