From eb6b6529cd5a59cd684b7ad1a3d569487fa4daa0 Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: Mon, 7 Jun 2021 15:51:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DDeviceChannelMapper=E7=9A=84?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/conf/ApplicationCheckRunner.java | 35 ------------------- .../vmp/storager/dao/DeviceChannelMapper.java | 2 +- 2 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 src/main/java/com/genersoft/iot/vmp/conf/ApplicationCheckRunner.java diff --git a/src/main/java/com/genersoft/iot/vmp/conf/ApplicationCheckRunner.java b/src/main/java/com/genersoft/iot/vmp/conf/ApplicationCheckRunner.java deleted file mode 100644 index 14283332..00000000 --- a/src/main/java/com/genersoft/iot/vmp/conf/ApplicationCheckRunner.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.genersoft.iot.vmp.conf; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.CommandLineRunner; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; - - -/** - * 对配置文件进行校验 - */ -@Component -@Order(value=2) -public class ApplicationCheckRunner implements CommandLineRunner { - - private Logger logger = LoggerFactory.getLogger("ApplicationCheckRunner"); - - @Autowired - private MediaConfig mediaConfig; - - @Autowired - private SipConfig sipConfig; - - @Override - public void run(String... args) throws Exception { - if (sipConfig.getSipIp().equals("localhost") || sipConfig.getSipIp().equals("127.0.0.1")) { - logger.error("sip.ip不能使用 {} ,请使用类似192.168.1.44这样的来自网卡的IP!!!", sipConfig.getSipIp() ); - System.exit(1); - } - - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java index ca66809f..2f534cf6 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java @@ -19,7 +19,7 @@ public interface DeviceChannelMapper { "ipAddress, port, password, PTZType, status, streamId, longitude, latitude) " + "VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," + "'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " + - "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}'), ${longitude}, ${latitude}") + "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude})") int add(DeviceChannel channel); @Update(value = {"