Commit eb6b6529cd5a59cd684b7ad1a3d569487fa4daa0
1 parent
df11956c
修复DeviceChannelMapper的存储错误
Showing
2 changed files
with
1 additions
and
36 deletions
src/main/java/com/genersoft/iot/vmp/conf/ApplicationCheckRunner.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.conf; | |
| 2 | - | |
| 3 | -import org.slf4j.Logger; | |
| 4 | -import org.slf4j.LoggerFactory; | |
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | -import org.springframework.beans.factory.annotation.Value; | |
| 7 | -import org.springframework.boot.CommandLineRunner; | |
| 8 | -import org.springframework.core.annotation.Order; | |
| 9 | -import org.springframework.stereotype.Component; | |
| 10 | - | |
| 11 | - | |
| 12 | -/** | |
| 13 | - * 对配置文件进行校验 | |
| 14 | - */ | |
| 15 | -@Component | |
| 16 | -@Order(value=2) | |
| 17 | -public class ApplicationCheckRunner implements CommandLineRunner { | |
| 18 | - | |
| 19 | - private Logger logger = LoggerFactory.getLogger("ApplicationCheckRunner"); | |
| 20 | - | |
| 21 | - @Autowired | |
| 22 | - private MediaConfig mediaConfig; | |
| 23 | - | |
| 24 | - @Autowired | |
| 25 | - private SipConfig sipConfig; | |
| 26 | - | |
| 27 | - @Override | |
| 28 | - public void run(String... args) throws Exception { | |
| 29 | - if (sipConfig.getSipIp().equals("localhost") || sipConfig.getSipIp().equals("127.0.0.1")) { | |
| 30 | - logger.error("sip.ip不能使用 {} ,请使用类似192.168.1.44这样的来自网卡的IP!!!", sipConfig.getSipIp() ); | |
| 31 | - System.exit(1); | |
| 32 | - } | |
| 33 | - | |
| 34 | - } | |
| 35 | -} |
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
| ... | ... | @@ -19,7 +19,7 @@ public interface DeviceChannelMapper { |
| 19 | 19 | "ipAddress, port, password, PTZType, status, streamId, longitude, latitude) " + |
| 20 | 20 | "VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," + |
| 21 | 21 | "'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " + |
| 22 | - "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}'), ${longitude}, ${latitude}") | |
| 22 | + "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude})") | |
| 23 | 23 | int add(DeviceChannel channel); |
| 24 | 24 | |
| 25 | 25 | @Update(value = {" <script>" + | ... | ... |