From 6e84a1c64636c8d4a961abcb8956212ff287ecb4 Mon Sep 17 00:00:00 2001 From: mocheng <3057647414@qq.com> Date: Tue, 26 Aug 2025 10:52:59 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/master.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/master.yml b/.gitea/workflows/master.yml index 52fde7ea..68acf51b 100644 --- a/.gitea/workflows/master.yml +++ b/.gitea/workflows/master.yml @@ -15,7 +15,7 @@ jobs: - name: 拉取代码 uses: http://git.missmoc.top/mocheng/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 0 - name: 使用Maven构建项目 run: | @@ -87,8 +87,8 @@ jobs: echo "===== 清理操作 =====" docker system prune -f echo "===== 所有操作完成 ====" - + - name: 重启服务 run: | kubectl rollout restart deployment sis -n smartparks - kubectl rollout restart deployment property -n smartparks \ No newline at end of file + kubectl rollout restart deployment property -n smartparks From 19e259a15ec9beb929c9697f6d363531a571b204 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Wed, 27 Aug 2025 18:10:11 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/config/RocketMQClusterConfig.java | 120 +++++++++--------- .../src/main/resources/application.properties | 4 +- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/config/RocketMQClusterConfig.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/config/RocketMQClusterConfig.java index 8096dfc1..3ece5107 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/config/RocketMQClusterConfig.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/config/RocketMQClusterConfig.java @@ -1,61 +1,32 @@ -package org.dromara.sis.config; - -import org.apache.rocketmq.client.producer.DefaultMQProducer; -import org.apache.rocketmq.spring.core.RocketMQTemplate; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * @author lsm - * @apiNote RocketMQClusterConfig - * @since 2025/8/26 - */ -@Configuration -public class RocketMQClusterConfig { - - // 从配置文件中读取 cluster 的配置 - @Value("${rocketmq.cluster1.name-server}") - private String nameServer1; - - @Value("${rocketmq.cluster1.producer.group}") - private String producerGroup1; - - // 为第一个集群创建生产者实例 - @Bean({"clusterProducerOne"}) - public DefaultMQProducer clusterProducerOne() throws Exception { - DefaultMQProducer producer = new DefaultMQProducer(producerGroup1); - producer.setNamesrvAddr(nameServer1); - // 设置发送超时时间 - producer.setSendMsgTimeout(5000); - // 设置重试次数 - producer.setRetryTimesWhenSendFailed(2); - producer.setRetryTimesWhenSendAsyncFailed(2); - return producer; - } - - // 使用上面的生产者实例创建 RocketMQTemplate - @Bean("rocketMQTemplateClusterOne") - public RocketMQTemplate rocketMQTemplateClusterOne(@Qualifier("clusterProducerOne") DefaultMQProducer producer) { - RocketMQTemplate template = new RocketMQTemplate(); - template.setProducer(producer); - return template; - } - - - // 从配置文件中读取 cluster 的配置 -// @Value("${rocketmq.cluster2.name-server}") -// private String nameServer2; +//package org.dromara.sis.config; // -// @Value("${rocketmq.cluster2.producer.group}") -// private String producerGroup2; +//import org.apache.rocketmq.client.producer.DefaultMQProducer; +//import org.apache.rocketmq.spring.core.RocketMQTemplate; +//import org.springframework.beans.factory.annotation.Qualifier; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; // -// // 为第二个集群创建生产者实例 -// @Bean({"clusterProducerTwo"}) -// public DefaultMQProducer clusterProducerTwo() throws Exception { -// DefaultMQProducer producer = new DefaultMQProducer(producerGroup2); -// producer.setNamesrvAddr(nameServer2); +///** +// * @author lsm +// * @apiNote RocketMQClusterConfig +// * @since 2025/8/26 +// */ +//@Configuration +//public class RocketMQClusterConfig { +// +// // 从配置文件中读取 cluster 的配置 +// @Value("${rocketmq.cluster1.name-server}") +// private String nameServer1; +// +// @Value("${rocketmq.cluster1.producer.group}") +// private String producerGroup1; +// +// // 为第一个集群创建生产者实例 +// @Bean({"clusterProducerOne"}) +// public DefaultMQProducer clusterProducerOne() throws Exception { +// DefaultMQProducer producer = new DefaultMQProducer(producerGroup1); +// producer.setNamesrvAddr(nameServer1); // // 设置发送超时时间 // producer.setSendMsgTimeout(5000); // // 设置重试次数 @@ -65,11 +36,40 @@ public class RocketMQClusterConfig { // } // // // 使用上面的生产者实例创建 RocketMQTemplate -// @Bean("rocketMQTemplateClusterTwo") -// public RocketMQTemplate rocketMQTemplateClusterTwo(@Qualifier("clusterProducerTwo") DefaultMQProducer producer) { +// @Bean("rocketMQTemplateClusterOne") +// public RocketMQTemplate rocketMQTemplateClusterOne(@Qualifier("clusterProducerOne") DefaultMQProducer producer) { // RocketMQTemplate template = new RocketMQTemplate(); // template.setProducer(producer); // return template; // } - -} +// +// +// // 从配置文件中读取 cluster 的配置 +//// @Value("${rocketmq.cluster2.name-server}") +//// private String nameServer2; +//// +//// @Value("${rocketmq.cluster2.producer.group}") +//// private String producerGroup2; +//// +//// // 为第二个集群创建生产者实例 +//// @Bean({"clusterProducerTwo"}) +//// public DefaultMQProducer clusterProducerTwo() throws Exception { +//// DefaultMQProducer producer = new DefaultMQProducer(producerGroup2); +//// producer.setNamesrvAddr(nameServer2); +//// // 设置发送超时时间 +//// producer.setSendMsgTimeout(5000); +//// // 设置重试次数 +//// producer.setRetryTimesWhenSendFailed(2); +//// producer.setRetryTimesWhenSendAsyncFailed(2); +//// return producer; +//// } +//// +//// // 使用上面的生产者实例创建 RocketMQTemplate +//// @Bean("rocketMQTemplateClusterTwo") +//// public RocketMQTemplate rocketMQTemplateClusterTwo(@Qualifier("clusterProducerTwo") DefaultMQProducer producer) { +//// RocketMQTemplate template = new RocketMQTemplate(); +//// template.setProducer(producer); +//// return template; +//// } +// +//} diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index 4385908f..ef3ece6a 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://113.249.101.254:18000/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://10.20.1.65:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=by@2025?? +db.password.0=By@2025! ### the maximum retry times for push nacos.config.push.maxRetryTime=50 From 1eb95bf6f6a365a05180db3ebc932f7be7d2d959 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Wed, 27 Aug 2025 18:37:12 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consumer/MeterRecordConsumer.java | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java index 8360613a..3a0a80d0 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java @@ -1,44 +1,44 @@ -package org.dromara.sis.rocketmq.consumer; - -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.rocketmq.common.message.MessageExt; -import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; -import org.apache.rocketmq.spring.core.RocketMQListener; -import org.dromara.sis.rocketmq.RocketMqConstants; -import org.dromara.sis.rocketmq.producer.ProducerService; -import org.springframework.stereotype.Component; - -/** - * @author lsm - * @apiNote MeterRecordConsumer - * @since 2025/8/25 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@RocketMQMessageListener( - topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.METER_GROUP, - selectorExpression = RocketMqConstants.METER_RECORD, - nameServer = "${rocketmq.cluster1.name-server}" -) -public class MeterRecordConsumer implements RocketMQListener { - - private final ProducerService producerService; - - @Override - public void onMessage(MessageExt ext) { - try { - if (ext.getBody() == null) { - log.info("仪表上报消息数据,不转发!"); - } else { - producerService.defaultSend(RocketMqConstants.TOPIC, RocketMqConstants.METER_RECORD, new String(ext.getBody())); - log.info("转发仪表上报数据处理成功"); - } - } catch (Exception e) { - log.error("转发仪表上报数据处理失败,", e); - } - - } -} +//package org.dromara.sis.rocketmq.consumer; +// +//import lombok.RequiredArgsConstructor; +//import lombok.extern.slf4j.Slf4j; +//import org.apache.rocketmq.common.message.MessageExt; +//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; +//import org.apache.rocketmq.spring.core.RocketMQListener; +//import org.dromara.sis.rocketmq.RocketMqConstants; +//import org.dromara.sis.rocketmq.producer.ProducerService; +//import org.springframework.stereotype.Component; +// +///** +// * @author lsm +// * @apiNote MeterRecordConsumer +// * @since 2025/8/25 +// */ +//@Slf4j +//@Component +//@RequiredArgsConstructor +//@RocketMQMessageListener( +// topic = RocketMqConstants.TOPIC, +// consumerGroup = RocketMqConstants.METER_GROUP, +// selectorExpression = RocketMqConstants.METER_RECORD, +// nameServer = "${rocketmq.cluster1.name-server}" +//) +//public class MeterRecordConsumer implements RocketMQListener { +// +// private final ProducerService producerService; +// +// @Override +// public void onMessage(MessageExt ext) { +// try { +// if (ext.getBody() == null) { +// log.info("仪表上报消息数据,不转发!"); +// } else { +// producerService.defaultSend(RocketMqConstants.TOPIC, RocketMqConstants.METER_RECORD, new String(ext.getBody())); +// log.info("转发仪表上报数据处理成功"); +// } +// } catch (Exception e) { +// log.error("转发仪表上报数据处理失败,", e); +// } +// +// } +//} From 0330b023a307a938273e8f4dee0c6b96229739b4 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Wed, 27 Aug 2025 19:18:46 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rocketmq/producer/ProducerService.java | 114 +++++++++--------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/producer/ProducerService.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/producer/ProducerService.java index 7c40a8de..aa14c739 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/producer/ProducerService.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/producer/ProducerService.java @@ -1,65 +1,65 @@ -package org.dromara.sis.rocketmq.producer; - -import lombok.extern.slf4j.Slf4j; -import org.apache.rocketmq.common.message.Message; -import org.apache.rocketmq.spring.core.RocketMQTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Component; - -/** - * @author lsm - * @apiNote ProducerService - * @since 2025/8/26 - */ -@Slf4j -@Component -public class ProducerService { - - @Autowired - @Qualifier("rocketMQTemplateClusterOne") - private RocketMQTemplate rocketMQTemplateClusterOne; - +//package org.dromara.sis.rocketmq.producer; +// +//import lombok.extern.slf4j.Slf4j; +//import org.apache.rocketmq.common.message.Message; +//import org.apache.rocketmq.spring.core.RocketMQTemplate; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Qualifier; +//import org.springframework.stereotype.Component; +// +///** +// * @author lsm +// * @apiNote ProducerService +// * @since 2025/8/26 +// */ +//@Slf4j +//@Component +//public class ProducerService { +// // @Autowired -// @Qualifier("rocketMQTemplateClusterTwo") -// private RocketMQTemplate rocketMQTemplateClusterTwo; - - /** - * 向mq写入消息 - * - * @param topic 消息topic - * @param tag 消息tag - * @param msg 消息 - */ - public void defaultSend(String topic, String tag, String msg) { - try { - String destination = topic + ":" + tag; - // 使用 RocketMQTemplate 的同步发送方法 - rocketMQTemplateClusterOne.syncSend(destination, msg); - - log.info("发送RocketMQOne消息成功, nameServer:{}", rocketMQTemplateClusterOne.getProducer().getNamesrvAddr()); - } catch (Exception e) { - log.error("发送RocketMQOne消息失败", e); - } - } - - - /** - * 向mq写入消息 - * - * @param topic 消息topic - * @param tag 消息tag - * @param msg 消息 - */ -// public void clusterSend(String topic, String tag, String msg) { +// @Qualifier("rocketMQTemplateClusterOne") +// private RocketMQTemplate rocketMQTemplateClusterOne; +// +//// @Autowired +//// @Qualifier("rocketMQTemplateClusterTwo") +//// private RocketMQTemplate rocketMQTemplateClusterTwo; +// +// /** +// * 向mq写入消息 +// * +// * @param topic 消息topic +// * @param tag 消息tag +// * @param msg 消息 +// */ +// public void defaultSend(String topic, String tag, String msg) { // try { // String destination = topic + ":" + tag; // // 使用 RocketMQTemplate 的同步发送方法 -// rocketMQTemplateClusterTwo.syncSend(destination, msg); +// rocketMQTemplateClusterOne.syncSend(destination, msg); // -// log.info("发送RocketMQTwo消息成功, nameServer:{}", rocketMQTemplateClusterTwo.getProducer().getNamesrvAddr()); +// log.info("发送RocketMQOne消息成功, nameServer:{}", rocketMQTemplateClusterOne.getProducer().getNamesrvAddr()); // } catch (Exception e) { -// log.error("发送RocketMQTwo消息失败", e); +// log.error("发送RocketMQOne消息失败", e); // } // } -} +// +// +// /** +// * 向mq写入消息 +// * +// * @param topic 消息topic +// * @param tag 消息tag +// * @param msg 消息 +// */ +//// public void clusterSend(String topic, String tag, String msg) { +//// try { +//// String destination = topic + ":" + tag; +//// // 使用 RocketMQTemplate 的同步发送方法 +//// rocketMQTemplateClusterTwo.syncSend(destination, msg); +//// +//// log.info("发送RocketMQTwo消息成功, nameServer:{}", rocketMQTemplateClusterTwo.getProducer().getNamesrvAddr()); +//// } catch (Exception e) { +//// log.error("发送RocketMQTwo消息失败", e); +//// } +//// } +//} From c2f0b64e6f5b36fd2025405892fe08457b9f1c13 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Wed, 27 Aug 2025 19:42:33 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AF=94=E5=AF=B9?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=B2=A1=E5=86=99=E5=85=A5=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/service/impl/ZeroSensationPassageServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java index 22281ef9..aeb09875 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java @@ -63,7 +63,7 @@ public class ZeroSensationPassageServiceImpl implements IZeroSensationPassageSer if (result.getCode() != 200) { log.info("华为盒子比对失败,msg={}", result.getMessage()); // 产生告警数据 -// alarmEventsService.createAlarmRecord(deviceIp, 1, 1, "人脸比对失败", smallImg, bigImg); + alarmEventsService.createAlarmRecord(deviceIp, 1, 1, "人脸比对失败", smallImg, bigImg); return; } log.info("人脸比对执行完成,耗时:{}ms", interval.intervalMs()); From 92cb1fcd63e58f189182af8df47c8a747f01480c Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Thu, 28 Aug 2025 19:48:04 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E6=97=A0=E6=B3=95=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/sis/domain/model/SisAcDevice.java | 40 +++++++++++++++++++ .../mapper/sis/SisAcDeviceRefMapper.xml | 15 +++++-- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/model/SisAcDevice.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/model/SisAcDevice.java index 22088fbb..4d13565b 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/model/SisAcDevice.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/model/SisAcDevice.java @@ -10,4 +10,44 @@ public class SisAcDevice extends SisDeviceManage { private Long acId; + /** + * 设备通道编号 + */ + private String channelNo; + + /** + * 通道状态.0-离线;1-在线 + */ + private Integer channelState; + + /** + * nvr 设备厂商编号 + */ + private String nvrFactoryNo; + + /** + * nvr设备ip + */ + private String nvrIp; + + /** + * nvr 端口 + */ + private Integer nvrPort; + + /** + * nvr 账号 + */ + private String nvrAccount; + + /** + * nvr 密码 + */ + private String nvrPwd; + + /** + * nvr 通道编号 + */ + private String nvrChannelNo; + } diff --git a/ruoyi-modules/Sis/src/main/resources/mapper/sis/SisAcDeviceRefMapper.xml b/ruoyi-modules/Sis/src/main/resources/mapper/sis/SisAcDeviceRefMapper.xml index 9119e40f..d533b0fa 100644 --- a/ruoyi-modules/Sis/src/main/resources/mapper/sis/SisAcDeviceRefMapper.xml +++ b/ruoyi-modules/Sis/src/main/resources/mapper/sis/SisAcDeviceRefMapper.xml @@ -7,10 +7,19 @@