From 6306618e5aa9ed532c14dc4b0b3690d5b8163165 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Wed, 2 Apr 2025 15:05:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(all):=20=E7=99=BE=E5=BE=97=E8=83=9C?= =?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 增加百得胜工厂数据对接 --- .../FactoryAccountsInterceptor.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java index 7097255c3..3b7abf9f9 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java @@ -1,6 +1,9 @@ package com.logpm.factorydata.paterson.interceptor; import cn.hutool.core.codec.Base64; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUnit; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.digest.MD5; @@ -35,7 +38,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; -import java.time.Instant; import java.util.Objects; import java.util.concurrent.TimeUnit; @@ -93,13 +95,23 @@ public class FactoryAccountsInterceptor implements HandlerInterceptor { FactoryAuthVO authVO = jpFactoryShipmentService.findFactoryAuth(companyCode); if (ObjectUtil.isNotEmpty(authVO)) { Long authTime1 = authVO.getAuthTime(); - long secondTimestamp = Instant.now().getEpochSecond(); - // 验证时间 不能大于5秒 + long secondTimestamp = DateUtil.current(); + DateTime currentDate = DateUtil.date(); + // 验证时间 if (secondTimestamp - authTime > authTime1) { log.info("##########preHandle: 时间戳过期"); returnJson(response, JSONObject.toJSONString(R.fail("认证不通过,时间戳过期"))); return false; } + // 将 authTime 转换为时间并与当前时间比较 + DateTime authDateTime = DateUtil.date(authTime * 1000); // 将时间戳转换为 DateTime + // 将 authTime 转换为时间并与当前时间比较 + long timeDifferenceInSeconds = DateUtil.between(authDateTime, currentDate, DateUnit.MS); + if (timeDifferenceInSeconds > authTime1) { + log.info("##########preHandle: 认证时间过期"); + returnJson(response, JSONObject.toJSONString(R.fail("认证不通过,认证时间过期"))); + return false; + } // 验证签名 String auth = authVO.getAppKey(); String md5Hex = Base64.encode(MD5.create().digestHex(params + auth + authTime)).toUpperCase(); From 2fe1e29e02f66beeb9c26152bcd8f35a7baea89d Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Wed, 2 Apr 2025 15:29:29 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat(all):=20=E7=99=BE=E5=BE=97=E8=83=9C?= =?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 增加百得胜工厂数据对接 --- .../paterson/interceptor/FactoryAccountsInterceptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java index 3b7abf9f9..ac71ee9ab 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-paterson/src/main/java/com/logpm/factorydata/paterson/interceptor/FactoryAccountsInterceptor.java @@ -104,7 +104,7 @@ public class FactoryAccountsInterceptor implements HandlerInterceptor { return false; } // 将 authTime 转换为时间并与当前时间比较 - DateTime authDateTime = DateUtil.date(authTime * 1000); // 将时间戳转换为 DateTime + DateTime authDateTime = DateUtil.date(authTime); // 将时间戳转换为 DateTime // 将 authTime 转换为时间并与当前时间比较 long timeDifferenceInSeconds = DateUtil.between(authDateTime, currentDate, DateUnit.MS); if (timeDifferenceInSeconds > authTime1) { From 153f19b6d87047db544bf19397bca8fccaa2d589 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Wed, 2 Apr 2025 16:32:42 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat(all):=202B=E9=85=8D=E9=80=81=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改数据不正确问题 --- .../main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml index 82dceb980..52b9a0fbc 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml @@ -295,7 +295,7 @@ when ifnull(ldsa.type_service, '1') = '4' then '三方中转' end as type_service, count(distinct t.order_code) orderNum, sum(t.quantity) num from logpm_distribution_parcel_list t - join logpm_distribution_stock_article ldsa on ldsa.order_code = t.order_code and ldsa.is_deleted = 0 + join logpm_distribution_stock_article ldsa on ldsa.id = t.stock_article_id and ldsa.is_deleted = 0 left join logpm_warehouse_warehouse lww on lww.id = t.warehouse_id where t.warehouse_entry_time_end >= #{query.startCreateTime} and t.warehouse_entry_time_end <= #{query.endCreateTime} and t.is_transfer = 0 and ldsa.type_service != '2' From 343d9801d6deb7dd8f67f05a7d12c38847aae3e1 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Wed, 2 Apr 2025 16:43:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat(all):=202B=E9=85=8D=E9=80=81=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改查询总页数不正确问题 --- .../main/java/com/logpm/report/config/MybatisPlusConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/config/MybatisPlusConfig.java b/blade-service/logpm-report/src/main/java/com/logpm/report/config/MybatisPlusConfig.java index 53c8a37e5..10998183b 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/config/MybatisPlusConfig.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/config/MybatisPlusConfig.java @@ -63,7 +63,7 @@ public class MybatisPlusConfig implements WebMvcConfigurer { AnnotationAwareOrderComparator.sort(queryInterceptorArray); paginationInterceptor.setQueryInterceptors(queryInterceptorArray); } - paginationInterceptor.setMaxLimit(mybatisPlusProperties.getPageLimit()); + paginationInterceptor.setMaxLimit(-1L); paginationInterceptor.setOverflow(mybatisPlusProperties.getOverflow()); paginationInterceptor.setOptimizeJoin(mybatisPlusProperties.getOptimizeJoin()); paginationInterceptor.setDbType(DbType.MYSQL);