From 235c7c3fef903d5cb91a75a333b81e8139b2ebd9 Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Mon, 1 Dec 2025 09:59:58 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AC=E7=95=AA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index e50ba69..3e2f29b 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ TECHSOR_dataCenter_receiver 17 - 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com + 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com pf-receiver-stg 4.2.2.Final @@ -581,41 +581,19 @@ - - - - - - - - - - - - - - - - - - - - - - - + io.fabric8 docker-maven-plugin 0.38.1 - AKIAQNYBBSGDVT3VF4ON - DEhPMTHAIsKK7L2klURQrmMe3r2Tqgbaa6z2FYQu + AKIAR26KHSVRUEAKRBPZ + wmMPx9vypaNi5ZIlyz4c018hKCb2M1dnGBdA+oh2 - ${aws.ecr.registryTest}/aeon/s${aws.ecr.repository}:latest + ${aws.ecr.registry}/${aws.ecr.repository}:latest ${aws.ecr.registry} ${project.basedir}/Dockerfile @@ -625,6 +603,28 @@ + + + + + + + + + + + + + + + + + + + + + + From e19a91f47a1f2421de51da3c407d779f7e0160ad Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Mon, 1 Dec 2025 15:26:54 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AC=E7=95=AA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3e2f29b..37af611 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 17 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com - pf-receiver-stg + spf-receiver 4.2.2.Final @@ -593,7 +593,7 @@ - ${aws.ecr.registry}/${aws.ecr.repository}:latest + ${aws.ecr.registry}/aeon-prod/${aws.ecr.repository}:latest ${aws.ecr.registry} ${project.basedir}/Dockerfile From a325e473b4c2a27ebb81e79568cd4602434f23bc Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Wed, 17 Dec 2025 16:33:06 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3fb8452..d8b9163 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ -FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest +# FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest +FROM amazoncorretto:17-alpine +# 安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包) +RUN apk --no-cache add fontconfig ttf-dejavu + WORKDIR /app COPY target/data-center-receiver.jar app.jar EXPOSE 8200 From 5a3a23f3e4339de6efae7ee126182eb1a8794871 Mon Sep 17 00:00:00 2001 From: "review512jwy@163.com" <“review512jwy@163.com”> Date: Wed, 17 Dec 2025 17:01:50 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index 37af611..d2ef78d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.12 + 3.5.7 com.techsor @@ -17,7 +17,7 @@ 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com spf-receiver - 4.2.2.Final + 4.2.9.Final @@ -326,7 +326,7 @@ org.apache.tomcat.embed tomcat-embed-core - 10.1.42 + 10.1.49 org.springframework.boot @@ -382,7 +382,7 @@ com.mysql mysql-connector-j - 9.3.0 + 9.5.0 org.projectlombok @@ -399,7 +399,7 @@ org.apache.commons commons-text - 1.13.1 + 1.15.0 - - org.springframework - spring-context - 6.1.21 - - - - - org.springframework - spring-context-support - 6.1.21 - ch.qos.logback logback-classic - 1.5.18 + 1.5.21 compile ch.qos.logback logback-core - 1.5.18 + 1.5.21 compile From ca98f4371500c65b947bcc09de5583cc649bf121 Mon Sep 17 00:00:00 2001 From: "review512jwy@163.com" <“review512jwy@163.com”> Date: Wed, 17 Dec 2025 19:15:08 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index d2ef78d..64c55b2 100644 --- a/pom.xml +++ b/pom.xml @@ -342,9 +342,13 @@ org.springframework.integration spring-integration-mqtt - 5.5.1 + 6.5.3 - + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + 1.2.5 + org.springframework.boot @@ -401,6 +405,18 @@ commons-text 1.15.0 + + + org.apache.commons + commons-lang3 + 3.20.0 + + + + org.jetbrains.kotlin + kotlin-stdlib + 2.2.21 + + + at.yawk.lz4 + lz4-java + 1.10.2 From 00b8beb5075ffecb74024fd7bb554845651e1121 Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Wed, 17 Dec 2025 22:46:20 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index d2ef78d..7ebad58 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ 17 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com + spf-receiver-stg spf-receiver 4.2.9.Final @@ -566,41 +567,19 @@ - - - io.fabric8 - docker-maven-plugin - 0.38.1 - - - AKIAR26KHSVRUEAKRBPZ - wmMPx9vypaNi5ZIlyz4c018hKCb2M1dnGBdA+oh2 - - - - ${aws.ecr.registry}/aeon-prod/${aws.ecr.repository}:latest - ${aws.ecr.registry} - - ${project.basedir}/Dockerfile - - - - - - - + - - + + - + @@ -610,6 +589,28 @@ + + + io.fabric8 + docker-maven-plugin + 0.38.1 + + + AKIAQNYBBSGDVT3VF4ON + DEhPMTHAIsKK7L2klURQrmMe3r2Tqgbaa6z2FYQu + + + + ${aws.ecr.registryTest}/aeon/${aws.ecr.repositoryTest}:latest + ${aws.ecr.registry} + + ${project.basedir}/Dockerfile + + + + + + From 310741ce87882a30f937d0c95f1f365ad5a00052 Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Wed, 17 Dec 2025 22:47:24 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E5=8E=BB=E9=99=A4mqtt=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=B2=A1=E6=9C=89=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/receiver/service/impl/MQTTServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/techsor/datacenter/receiver/service/impl/MQTTServiceImpl.java b/src/main/java/com/techsor/datacenter/receiver/service/impl/MQTTServiceImpl.java index c66e2ae..3cb4c2b 100644 --- a/src/main/java/com/techsor/datacenter/receiver/service/impl/MQTTServiceImpl.java +++ b/src/main/java/com/techsor/datacenter/receiver/service/impl/MQTTServiceImpl.java @@ -218,7 +218,7 @@ class MqttConsumer { } adapter.setCompletionTimeout(5000); - adapter.setRecoveryInterval(5000); +// adapter.set(5000); adapter.setConverter(new DefaultPahoMessageConverter()); if (!Objects.nonNull(config.getQos())){ adapter.setQos(1); From 7a5a0afd95ea3fb1a31d84201d436856d5851f9f Mon Sep 17 00:00:00 2001 From: "review512jwy@163.com" <“review512jwy@163.com”> Date: Wed, 24 Dec 2025 19:32:38 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=8D=87=E7=BA=A7log4j?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pom.xml b/pom.xml index 685f046..1853e32 100644 --- a/pom.xml +++ b/pom.xml @@ -566,6 +566,18 @@ 33.4.8-jre + + + org.apache.logging.log4j + log4j-core + 2.25.3 + + + org.apache.logging.log4j + log4j-api + 2.25.3 + + From 1dd2724239e3b544b36a5e600ddd83a19b3a2989 Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Wed, 24 Dec 2025 20:12:22 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=9B=B4=E6=8D=A2mqtt=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 685f046..a678b2a 100644 --- a/pom.xml +++ b/pom.xml @@ -394,12 +394,17 @@ lombok - - - io.joynr.java.messaging.mqtt - paho-mqtt-client - 1.14.2 - + + + + + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + 1.2.5 + org.apache.commons From 68453a6a10353d527780347decad8d49451c0291 Mon Sep 17 00:00:00 2001 From: "zhczyx@163.com" Date: Fri, 16 Jan 2026 15:18:02 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0trendLog=E5=8D=95?= =?UTF-8?q?=E6=9D=A1=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84=E7=9A=84=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E8=BD=AC=E5=8F=91=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../receiver/config/DataCenterEnvConfig.java | 9 +++++++- .../receiver/service/DataTransService.java | 23 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/techsor/datacenter/receiver/config/DataCenterEnvConfig.java b/src/main/java/com/techsor/datacenter/receiver/config/DataCenterEnvConfig.java index 5885559..567247a 100644 --- a/src/main/java/com/techsor/datacenter/receiver/config/DataCenterEnvConfig.java +++ b/src/main/java/com/techsor/datacenter/receiver/config/DataCenterEnvConfig.java @@ -26,7 +26,10 @@ public class DataCenterEnvConfig { @Value("${data.center.ioserver_process.api:#{'/v1/generic/ioserver_process'}}") private String processIoserverUrl; - @Value("${data.center.ioserver_process.api:#{'/v1/generic/st150_process'}}") + @Value("${data.center.trendLog.api:#{'/v1/generic/trendLog_process'}}") + private String processTrendLogUrl; + + @Value("${data.center.st150_process.api:#{'/v1/generic/st150_process'}}") private String processGW150Url; @Value("${data.center.zaiot_process.api:#{'/v1/generic/zaiot_process'}}") @@ -69,6 +72,10 @@ public class DataCenterEnvConfig { return apiAddress+processIoserverUrl; } + public String getProcessTrendLogUrl() { + return apiAddress+processTrendLogUrl; + } + public void setProcessIoserverUrl(String processIoserverUrl) { this.processIoserverUrl = processIoserverUrl; } diff --git a/src/main/java/com/techsor/datacenter/receiver/service/DataTransService.java b/src/main/java/com/techsor/datacenter/receiver/service/DataTransService.java index f784f30..c058ab7 100644 --- a/src/main/java/com/techsor/datacenter/receiver/service/DataTransService.java +++ b/src/main/java/com/techsor/datacenter/receiver/service/DataTransService.java @@ -80,6 +80,10 @@ public class DataTransService { //单独处理ST-150网关数据 logger.debug("CustomSend Data :{} ,To: {}", jsonParams,dataCenterEnvConfig.getProcessIoserverUrl()); response = this.defaultHttpRequestUtil.postJson(dataCenterEnvConfig.getGW150ProcessUrl(), jsonParams); + }else if (isTrendLog(rawJson)){ + //单独处理TrendLog数据 + logger.debug("CustomSend Data :{} ,To: {}", jsonParams,dataCenterEnvConfig.getProcessTrendLogUrl()); + response = this.defaultHttpRequestUtil.postJson(dataCenterEnvConfig.getProcessTrendLogUrl(), jsonParams); }else{ logger.debug("CustomSend Data :{} ,To: {}", jsonParams,dataCenterEnvConfig.getProcessApiUrl()); response = this.defaultHttpRequestUtil.postJson(dataCenterEnvConfig.getProcessApiUrl(), jsonParams); @@ -138,4 +142,23 @@ public class DataTransService { return hasD && hasTs; } + /** + * 检查JSON字符串是否包含特定的字段,用于判断是否符合GW150数据格式 + * + * @param jsonStr 待检查的JSON字符串 + * @return 如果JSON字符串同时包含字段"Instance"、"DeviceId"和"log_buffer",则返回true,否则返回false + */ + private Boolean isTrendLog(String jsonStr){ + // 解析JSON字符串为JsonObject,以便进行字段检查 + JsonObject json = JsonParser.parseString(jsonStr).getAsJsonObject(); + + // 检查JSON对象中是否包含字段"Instance" + boolean hasInstance = json.has("Instance"); + // 检查JSON对象中是否包含字段"DeviceId" + boolean hasDeviceId = json.has("DeviceId"); + // 检查JSON对象中是否包含字段"hasLogBuffer" + boolean hasLogBuffer = json.has("log_buffer"); + + return hasInstance && hasDeviceId && hasLogBuffer; + } }