From 21dc7eb2c39223e4c8256872df101bc8ff1e8a9d Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期五, 08 十一月 2024 17:50:40 +0800 Subject: [PATCH] 1、使用静态配置配置摄像头截图路径及回调url 2、调通websocket消息发送local模式及rabbitmq模式 3、修改文档系统删除文档时id选择错误的bug,会删错文档 4、移除framework中的build,加快构建速度 --- iailab-framework/iailab-common-job/pom.xml | 27 -- iailab-framework/iailab-common-websocket/pom.xml | 57 +--- iailab-framework/iailab-common-excel/pom.xml | 27 -- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java | 6 iailab-module-infra/iailab-module-infra-biz/src/main/resources/application-dev.yaml | 6 iailab-module-data/iailab-module-data-biz/pom.xml | 8 iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yaml | 8 iailab-framework/iailab-common-biz-data-permission/pom.xml | 27 -- iailab-framework/iailab-common-mq/pom.xml | 33 -- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageMessage.java | 5 iailab-framework/iailab-common/pom.xml | 28 -- iailab-module-data/iailab-module-data-biz/src/main/resources/application-dev.yaml | 13 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/service/impl/CameraServiceImpl.java | 4 iailab-framework/iailab-common-redis/pom.xml | 27 -- iailab-framework/iailab-common-biz-tenant/pom.xml | 28 -- iailab-framework/iailab-common-env/pom.xml | 27 -- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageConsumer.java | 37 --- iailab-module-infra/iailab-module-infra-biz/pom.xml | 8 iailab-framework/iailab-common-biz-ip/pom.xml | 27 -- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHSavePath.java | 10 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHConfiguration.java | 32 ++ iailab-framework/iailab-common-protection/pom.xml | 27 -- iailab-framework/iailab-common-mybatis/pom.xml | 27 -- iailab-framework/iailab-common-security/pom.xml | 31 -- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCapturePictureClient.java | 7 iailab-module-infra/iailab-module-infra-biz/src/main/resources/application.yaml | 6 iailab-framework/iailab-common-monitor/pom.xml | 27 -- iailab-framework/iailab-common-web/pom.xml | 26 -- iailab-framework/iailab-common-rpc/pom.xml | 26 -- 29 files changed, 96 insertions(+), 526 deletions(-) diff --git a/iailab-framework/iailab-common-biz-data-permission/pom.xml b/iailab-framework/iailab-common-biz-data-permission/pom.xml index 785ab6d..2fd16fe 100644 --- a/iailab-framework/iailab-common-biz-data-permission/pom.xml +++ b/iailab-framework/iailab-common-biz-data-permission/pom.xml @@ -60,31 +60,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-biz-ip/pom.xml b/iailab-framework/iailab-common-biz-ip/pom.xml index e241eeb..9ca6b36 100644 --- a/iailab-framework/iailab-common-biz-ip/pom.xml +++ b/iailab-framework/iailab-common-biz-ip/pom.xml @@ -51,31 +51,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-biz-tenant/pom.xml b/iailab-framework/iailab-common-biz-tenant/pom.xml index 19d06b4..3c4431e 100644 --- a/iailab-framework/iailab-common-biz-tenant/pom.xml +++ b/iailab-framework/iailab-common-biz-tenant/pom.xml @@ -93,32 +93,4 @@ </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-env/pom.xml b/iailab-framework/iailab-common-env/pom.xml index f646993..2170152 100644 --- a/iailab-framework/iailab-common-env/pom.xml +++ b/iailab-framework/iailab-common-env/pom.xml @@ -63,31 +63,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-excel/pom.xml b/iailab-framework/iailab-common-excel/pom.xml index 8fa27cb..a069490 100644 --- a/iailab-framework/iailab-common-excel/pom.xml +++ b/iailab-framework/iailab-common-excel/pom.xml @@ -79,31 +79,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-job/pom.xml b/iailab-framework/iailab-common-job/pom.xml index f687975..38dd07a 100644 --- a/iailab-framework/iailab-common-job/pom.xml +++ b/iailab-framework/iailab-common-job/pom.xml @@ -47,31 +47,4 @@ </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-monitor/pom.xml b/iailab-framework/iailab-common-monitor/pom.xml index 91ac8fd..2746113 100644 --- a/iailab-framework/iailab-common-monitor/pom.xml +++ b/iailab-framework/iailab-common-monitor/pom.xml @@ -70,31 +70,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-mq/pom.xml b/iailab-framework/iailab-common-mq/pom.xml index d8db8af..29b9b2b 100644 --- a/iailab-framework/iailab-common-mq/pom.xml +++ b/iailab-framework/iailab-common-mq/pom.xml @@ -26,45 +26,18 @@ <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId> - <optional>true</optional> +<!-- <optional>true</optional>--> </dependency> <dependency> <groupId>org.springframework.amqp</groupId> <artifactId>spring-rabbit</artifactId> - <optional>true</optional> +<!-- <optional>true</optional>--> </dependency> <dependency> <groupId>org.apache.rocketmq</groupId> <artifactId>rocketmq-spring-boot-starter</artifactId> - <optional>true</optional> +<!-- <optional>true</optional>--> </dependency> </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> </project> diff --git a/iailab-framework/iailab-common-mybatis/pom.xml b/iailab-framework/iailab-common-mybatis/pom.xml index be357ab..a2f0ab6 100644 --- a/iailab-framework/iailab-common-mybatis/pom.xml +++ b/iailab-framework/iailab-common-mybatis/pom.xml @@ -92,31 +92,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-protection/pom.xml b/iailab-framework/iailab-common-protection/pom.xml index 78f1195..85ca482 100644 --- a/iailab-framework/iailab-common-protection/pom.xml +++ b/iailab-framework/iailab-common-protection/pom.xml @@ -44,31 +44,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-redis/pom.xml b/iailab-framework/iailab-common-redis/pom.xml index 5da123c..5940dae 100644 --- a/iailab-framework/iailab-common-redis/pom.xml +++ b/iailab-framework/iailab-common-redis/pom.xml @@ -38,31 +38,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-framework/iailab-common-rpc/pom.xml b/iailab-framework/iailab-common-rpc/pom.xml index 30f055e..d27e89a 100644 --- a/iailab-framework/iailab-common-rpc/pom.xml +++ b/iailab-framework/iailab-common-rpc/pom.xml @@ -44,30 +44,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> </project> diff --git a/iailab-framework/iailab-common-security/pom.xml b/iailab-framework/iailab-common-security/pom.xml index 67afab5..feb7855 100644 --- a/iailab-framework/iailab-common-security/pom.xml +++ b/iailab-framework/iailab-common-security/pom.xml @@ -73,37 +73,6 @@ <groupId>io.github.mouzt</groupId> <artifactId>bizlog-sdk</artifactId> </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> -<!-- <descriptors>--> -<!-- <descriptor>src/main/resources/assembly.xml</descriptor>--> -<!-- </descriptors>--> - </configuration> - </plugin> - </plugins> - </build> </project> diff --git a/iailab-framework/iailab-common-web/pom.xml b/iailab-framework/iailab-common-web/pom.xml index 02aa5b3..6fb1917 100644 --- a/iailab-framework/iailab-common-web/pom.xml +++ b/iailab-framework/iailab-common-web/pom.xml @@ -96,30 +96,4 @@ </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> </project> diff --git a/iailab-framework/iailab-common-websocket/pom.xml b/iailab-framework/iailab-common-websocket/pom.xml index 111975e..a566d80 100644 --- a/iailab-framework/iailab-common-websocket/pom.xml +++ b/iailab-framework/iailab-common-websocket/pom.xml @@ -43,21 +43,21 @@ <groupId>com.iailab</groupId> <artifactId>iailab-common-mq</artifactId> </dependency> - <dependency> - <groupId>org.springframework.kafka</groupId> - <artifactId>spring-kafka</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.springframework.amqp</groupId> - <artifactId>spring-rabbit</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.apache.rocketmq</groupId> - <artifactId>rocketmq-spring-boot-starter</artifactId> - <optional>true</optional> - </dependency> +<!-- <dependency>--> +<!-- <groupId>org.springframework.kafka</groupId>--> +<!-- <artifactId>spring-kafka</artifactId>--> +<!-- <optional>true</optional>--> +<!-- </dependency>--> +<!-- <dependency>--> +<!-- <groupId>org.springframework.amqp</groupId>--> +<!-- <artifactId>spring-rabbit</artifactId>--> +<!-- <optional>true</optional>--> +<!-- </dependency>--> +<!-- <dependency>--> +<!-- <groupId>org.apache.rocketmq</groupId>--> +<!-- <artifactId>rocketmq-spring-boot-starter</artifactId>--> +<!-- <optional>true</optional>--> +<!-- </dependency>--> <!-- 业务组件 --> <dependency> @@ -69,32 +69,5 @@ <scope>provided</scope> </dependency> </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> </project> \ No newline at end of file diff --git a/iailab-framework/iailab-common/pom.xml b/iailab-framework/iailab-common/pom.xml index 856b77d..ad63de0 100644 --- a/iailab-framework/iailab-common/pom.xml +++ b/iailab-framework/iailab-common/pom.xml @@ -156,32 +156,4 @@ </dependency> </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/iailab-module-data/iailab-module-data-biz/pom.xml b/iailab-module-data/iailab-module-data-biz/pom.xml index 82daa6a..1944423 100644 --- a/iailab-module-data/iailab-module-data-biz/pom.xml +++ b/iailab-module-data/iailab-module-data-biz/pom.xml @@ -238,10 +238,10 @@ <artifactId>jna</artifactId> <version>1.0</version> </dependency> - <dependency> - <groupId>org.springframework.amqp</groupId> - <artifactId>spring-rabbit</artifactId> - </dependency> +<!-- <dependency>--> +<!-- <groupId>org.springframework.amqp</groupId>--> +<!-- <artifactId>spring-rabbit</artifactId>--> +<!-- </dependency>--> </dependencies> diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageConsumer.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageConsumer.java index 8b664dc..215b5b7 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageConsumer.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageConsumer.java @@ -1,6 +1,5 @@ package com.iailab.module.data.mq.consumer; -import org.springframework.amqp.core.ExchangeTypes; import org.springframework.amqp.rabbit.annotation.*; import org.springframework.stereotype.Component; @@ -12,43 +11,13 @@ * @createTime 2024年11月05日 */ @Component -@RabbitListener( - bindings = @QueueBinding( - value = @Queue( - // 在 Queue 的名字上,使用 UUID 生成其后缀。这样,启动的 Consumer 的 Queue 不同,以达到广播消费的目的 - name = ImageMessage.DAHUA_ROUTING_KEY, - // Consumer 关闭时,该队列就可以被自动删除了 - autoDelete = "true" - ), - exchange = @Exchange( - name = ImageMessage.EXCHANGE, - type = ExchangeTypes.TOPIC, - declare = "false", - autoDelete = "true" - ) - ) -) -@RabbitListener( - bindings = @QueueBinding( - value = @Queue( - // 在 Queue 的名字上,使用 UUID 生成其后缀。这样,启动的 Consumer 的 Queue 不同,以达到广播消费的目的 - name = ImageMessage.HIKVISION_ROUTING_KEY, - // Consumer 关闭时,该队列就可以被自动删除了 - autoDelete = "true" - ), - exchange = @Exchange( - name = ImageMessage.EXCHANGE, - type = ExchangeTypes.TOPIC, - declare = "false", - autoDelete = "true" - ) - ) -) +@RabbitListener(queues = ImageMessage.DAHUA_ROUTING_KEY) +@RabbitListener(queues = ImageMessage.HIKVISION_ROUTING_KEY) public class ImageConsumer { // @RabbitHandler public void process(ImageMessage imageMessage) throws InterruptedException { - System.out.println("1111111111111111111111111"); + System.out.println("测试消费摄像头截图RabbitMQ消息----------------------"); Thread.sleep(5000); System.out.println(imageMessage.toString()); System.out.println(new Date()); diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageMessage.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageMessage.java index afd7a3c..0193fec 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageMessage.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/mq/consumer/ImageMessage.java @@ -9,10 +9,7 @@ @Data public class ImageMessage implements Serializable { - //暂时取消queue,使用routing自动生成 -// public static final String QUEUE = "topic.image"; - - public static final String EXCHANGE = "imageExchange"; + public static final String EXCHANGE = "data-server-image-exchange"; public static final String ROUTING_KEY = RoutingConstant.Iailab_Data_Image; diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCapturePictureClient.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCapturePictureClient.java index 0c79602..b84bdf7 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCapturePictureClient.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCapturePictureClient.java @@ -13,6 +13,7 @@ import com.sun.jna.ptr.IntByReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; import java.awt.*; import java.io.File; @@ -26,7 +27,9 @@ public class DHCapturePictureClient { private Logger logger = LoggerFactory.getLogger(getClass()); - private String url = "http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback"; +// private String url = "http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback"; +// @Value("${video.dahua.callback.url}") +// public String url; // 登陆句柄 public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE; @@ -300,7 +303,7 @@ Map<String, String> params = new HashMap<>(); params.put("strFileName", strFileName); params.put("cmdSerial", cmdSerial); - HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", ""); + HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", ""); } return true; } catch (Exception ex) { diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java index d81663c..764c241 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java @@ -6,6 +6,7 @@ import com.sun.jna.Pointer; import org.springframework.beans.factory.annotation.Value; +import javax.annotation.PostConstruct; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; @@ -23,9 +24,6 @@ * @createTime 2024年03月06日 */ public class DHCaptureReceiveCB implements NetSDKLib.fSnapRev { - - @Value("${dahua.callback.url}") - public String url; @Override public void invoke(NetSDKLib.LLong lLoginID, Pointer pBuf, int revLen, int encodeType, int cmdSerial, Pointer dwUser) { @@ -54,7 +52,7 @@ Map<String, String> params = new HashMap<>(); params.put("strFileName", strFileName); params.put("cmdSerial", Integer.valueOf(cmdSerial).toString()); - HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", ""); + HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", ""); } } diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHConfiguration.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHConfiguration.java new file mode 100644 index 0000000..310dadd --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHConfiguration.java @@ -0,0 +1,32 @@ +package com.iailab.module.data.video.dahua; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +import javax.annotation.PostConstruct; + +@Configuration +public class DHConfiguration { + + @Value("${video.dahua.path.capturePath}") + public String capturePath; + + @Value("${video.dahua.path.modelPath}") + public String modelPath; + + @Value("${video.dahua.callback.url}") + public String url; + + public static String staticCapturePath; + + public static String staticModelPath; + + public static String staticUrl; + + @PostConstruct + public void initUrl() { + staticCapturePath = this.capturePath; + staticModelPath = this.modelPath; + staticUrl = this.url; + } +} diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHSavePath.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHSavePath.java index 8488e51..031681a 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHSavePath.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHSavePath.java @@ -17,10 +17,6 @@ private static DHSavePath instance = new DHSavePath(); - public final static String capturePath = "D:/irs/Capture/"; - - public final static String modelPath = "D:/irs/Model/"; - public static DHSavePath getSavePath() { return instance; } @@ -31,12 +27,12 @@ * @return */ public String getSaveCapturePath(String channel, Date curDate) { - File path1 = new File(capturePath); + File path1 = new File(DHConfiguration.staticCapturePath); if (!path1.exists()) { path1.mkdir(); } - File path2 = new File(capturePath + ToolKits.getDay() + "/" + channel + "/"); + File path2 = new File(DHConfiguration.staticCapturePath + ToolKits.getDay() + "/" + channel + "/"); if (!path2.exists()) { path2.mkdirs(); } @@ -59,7 +55,7 @@ // path1.mkdir(); // } - File path2 = new File(modelPath + ToolKits.getDay() + "/" + cameraCode + "/"); + File path2 = new File(DHConfiguration.staticModelPath + ToolKits.getDay() + "/" + cameraCode + "/"); // if (!path2.exists()) { // path2.mkdirs(); // } diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/service/impl/CameraServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/service/impl/CameraServiceImpl.java index 12f46e9..5084c84 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/service/impl/CameraServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/service/impl/CameraServiceImpl.java @@ -10,6 +10,7 @@ import com.iailab.framework.web.core.util.WebFrameworkUtils; import com.iailab.module.data.mq.consumer.ImageMessage; import com.iailab.module.data.video.controller.admin.camera.vo.CameraPageReqVO; +import com.iailab.module.data.video.dahua.DHConfiguration; import com.iailab.module.data.video.dahua.DHSavePath; import com.iailab.module.data.video.dao.CameraDao; import com.iailab.module.data.video.dao.ImageDao; @@ -98,7 +99,7 @@ CameraDTO devCamera = getByCode(params.get("cmdSerial")); String strFileName = params.get("strFileName"); String imagePath = strFileName.replace("\\", "/"); - String imageUrl = imagePath.replace(DHSavePath.capturePath, ""); + String imageUrl = imagePath.replace(DHConfiguration.staticCapturePath, ""); ImageEntity image = new ImageEntity(); image.setCameraId(devCamera.getId()); image.setImagePath(imagePath); @@ -157,6 +158,7 @@ imageMessage.setCreateTime(createTime); imageMessage.setImageDTO(BeanUtils.toBean(image, ImageDTO.class)); rabbitTemplate.convertAndSend(ImageMessage.EXCHANGE, ImageMessage.DAHUA_ROUTING_KEY, imageMessage); + rabbitTemplate.convertAndSend(ImageMessage.EXCHANGE, ImageMessage.HIKVISION_ROUTING_KEY, imageMessage); } } \ No newline at end of file diff --git a/iailab-module-data/iailab-module-data-biz/src/main/resources/application-dev.yaml b/iailab-module-data/iailab-module-data-biz/src/main/resources/application-dev.yaml index bdd2afd..7521d5c 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/resources/application-dev.yaml +++ b/iailab-module-data/iailab-module-data-biz/src/main/resources/application-dev.yaml @@ -80,10 +80,11 @@ iems: upload-dir: D:/DLUT/upload/ -dahua: - path: - capturePath: D:/irs/Capture/ - modelPath: D:/irs/Model/ - callback: - url: http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback +video: + dahua: + path: + capturePath: D:/irs/Capture/ + modelPath: D:/irs/Model/ + callback: + url: http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback diff --git a/iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yaml b/iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yaml index 3f9ce6a..f384b30 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yaml +++ b/iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yaml @@ -60,3 +60,11 @@ iems: upload-dir: D:/DLUT/upload/ +video: + dahua: + path: + capturePath: D:/irs/Capture/ + modelPath: D:/irs/Model/ + callback: + url: http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback + diff --git a/iailab-module-infra/iailab-module-infra-biz/pom.xml b/iailab-module-infra/iailab-module-infra-biz/pom.xml index c5265da..0bd2a06 100644 --- a/iailab-module-infra/iailab-module-infra-biz/pom.xml +++ b/iailab-module-infra/iailab-module-infra-biz/pom.xml @@ -88,10 +88,10 @@ </dependency> <!-- 消息队列相关 --> - <dependency> - <groupId>com.iailab</groupId> - <artifactId>iailab-common-mq</artifactId> - </dependency> +<!-- <dependency>--> +<!-- <groupId>com.iailab</groupId>--> +<!-- <artifactId>iailab-common-mq</artifactId>--> +<!-- </dependency>--> <!-- Test 测试相关 --> <dependency> diff --git a/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application-dev.yaml b/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application-dev.yaml index 54f313b..f00ba68 100644 --- a/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application-dev.yaml +++ b/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application-dev.yaml @@ -78,10 +78,10 @@ spring: # RabbitMQ 配置项,对应 RabbitProperties 配置类 rabbitmq: - host: 172.16.8.100 # RabbitMQ 服务的地址 + host: 172.16.8.200 # RabbitMQ 服务的地址 port: 5672 # RabbitMQ 服务的端口 - username: guest # RabbitMQ 服务的账号 - password: guest # RabbitMQ 服务的密码 + username: admin # RabbitMQ 服务的账号 + password: admin123 # RabbitMQ 服务的密码 # Kafka 配置项,对应 KafkaProperties 配置类 kafka: bootstrap-servers: 172.16.8.100:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔 diff --git a/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application.yaml b/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application.yaml index 0d3e1f0..b5f49c2 100644 --- a/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application.yaml +++ b/iailab-module-infra/iailab-module-infra-biz/src/main/resources/application.yaml @@ -57,7 +57,7 @@ logging: file: - name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 + name: D:/DLUT/IailabPlat/webapp/infra/logs/${spring.application.name}.log # 日志文件名,全路径 --- #################### 接口文档配置 #################### @@ -140,7 +140,7 @@ job: executor: appname: ${spring.application.name} # 执行器 AppName - logpath: @log.path@/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 + logpath: D:/DLUT/IailabPlat/webapp/infra/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 accessToken: default_token # 执行器通讯TOKEN --- #################### 平台相关配置 #################### @@ -160,7 +160,7 @@ websocket: enable: true # websocket的开关 path: /infra/ws # 路径 - sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq + sender-type: rabbitmq # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq sender-rocketmq: topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group -- Gitblit v1.9.3