Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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
|
||||
kubectl rollout restart deployment property -n smartparks
|
||||
|
@@ -0,0 +1,75 @@
|
||||
//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;
|
||||
////
|
||||
//// @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;
|
||||
//// }
|
||||
//
|
||||
//}
|
@@ -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;
|
||||
|
||||
}
|
||||
|
@@ -0,0 +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<MessageExt> {
|
||||
//
|
||||
// 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);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
@@ -0,0 +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;
|
||||
//
|
||||
//// @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) {
|
||||
//// try {
|
||||
//// String destination = topic + ":" + tag;
|
||||
//// // 使用 RocketMQTemplate 的同步发送方法
|
||||
//// rocketMQTemplateClusterTwo.syncSend(destination, msg);
|
||||
////
|
||||
//// log.info("发送RocketMQTwo消息成功, nameServer:{}", rocketMQTemplateClusterTwo.getProducer().getNamesrvAddr());
|
||||
//// } catch (Exception e) {
|
||||
//// log.error("发送RocketMQTwo消息失败", e);
|
||||
//// }
|
||||
//// }
|
||||
//}
|
@@ -142,7 +142,6 @@ public class SisAccessControlServiceImpl implements ISisAccessControlService {
|
||||
SisAccessControl update = MapstructUtils.convert(bo, SisAccessControl.class);
|
||||
boolean b = baseMapper.updateById(update) > 0;
|
||||
if (bo.getBindDeviceId() != null) {
|
||||
|
||||
// 检验设备是否存在
|
||||
SisDeviceManageVo sisDeviceManageVo = sisDeviceManageService.queryById(bo.getBindDeviceId());
|
||||
Assert.isTrue(sisDeviceManageVo != null, "设备-{}信息不存在.", bo.getBindDeviceId());
|
||||
@@ -158,6 +157,9 @@ public class SisAccessControlServiceImpl implements ISisAccessControlService {
|
||||
// 重新构建绑定关系
|
||||
Boolean insert = sisDeviceBindRefService.insert(sisDeviceBindRef);
|
||||
Assert.isTrue(insert, "写入设备关联表失败!");
|
||||
} else {
|
||||
// 删除设备绑定关系
|
||||
sisDeviceBindRefService.deleteByBindId(bo.getId());
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(bo.getDevicePoint())) {
|
||||
@@ -178,6 +180,10 @@ public class SisAccessControlServiceImpl implements ISisAccessControlService {
|
||||
// 构建新的关联关系
|
||||
Boolean b2 = sisAcDeviceRefService.batchInsert(refs);
|
||||
log.info("门禁-监控设备关联关系构建完成, result={}", b2);
|
||||
} else {
|
||||
// 删除监控点管理
|
||||
Boolean b1 = sisAcDeviceRefService.deleteByAcId(bo.getId());
|
||||
log.info("门禁-监控关联关系删除完成, result={}, acId={}", b1, bo.getId());
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
@@ -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());
|
||||
|
@@ -7,10 +7,19 @@
|
||||
<select id="queryByAcIds" resultType="org.dromara.sis.domain.model.SisAcDevice">
|
||||
SELECT
|
||||
b.*,
|
||||
a.ac_id
|
||||
a.ac_id,
|
||||
c.channel_no,
|
||||
c.channel_state,
|
||||
c.nvr_factory_no,
|
||||
c.nvr_ip,
|
||||
c.nvr_port,
|
||||
c.nvr_account,
|
||||
c.nvr_pwd,
|
||||
c.nvr_channel_no
|
||||
FROM
|
||||
sis_ac_device_ref a
|
||||
LEFT JOIN sis_device_manage b ON a.dp_id = b.id
|
||||
sis_ac_device_ref a
|
||||
LEFT JOIN sis_device_manage b ON a.dp_id = b.id
|
||||
LEFT JOIN sis_device_channel c on c.device_id = b.id
|
||||
where a.ac_id IN
|
||||
<foreach collection="acIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user