Commit d310204d00b3701999da87090845c50ba9adc146

Authored by 648540858
1 parent 05323631

去除多余字段

sql/2.6.8升级2.6.9.sql
@@ -38,7 +38,7 @@ alter table device @@ -38,7 +38,7 @@ alter table device
38 change geoCoordSys geo_coord_sys varchar(50) not null; 38 change geoCoordSys geo_coord_sys varchar(50) not null;
39 39
40 alter table device 40 alter table device
41 - change treeType tree_type varchar(50) not null; 41 + drop column treeType;
42 42
43 alter table device 43 alter table device
44 change mediaServerId media_server_id varchar(50) default 'auto' null; 44 change mediaServerId media_server_id varchar(50) default 'auto' null;
@@ -297,7 +297,7 @@ alter table parent_platform @@ -297,7 +297,7 @@ alter table parent_platform
297 change updateTime update_time varchar(50) null; 297 change updateTime update_time varchar(50) null;
298 298
299 alter table parent_platform 299 alter table parent_platform
300 - change treeType tree_type varchar(50) not null; 300 + drop column treeType;
301 301
302 alter table parent_platform 302 alter table parent_platform
303 change asMessageChannel as_message_channel bool default false; 303 change asMessageChannel as_message_channel bool default false;
sql/初始化.sql
@@ -24,7 +24,6 @@ create table wvp_device ( @@ -24,7 +24,6 @@ create table wvp_device (
24 charset character varying(50), 24 charset character varying(50),
25 ssrc_check bool default false, 25 ssrc_check bool default false,
26 geo_coord_sys character varying(50), 26 geo_coord_sys character varying(50),
27 - tree_type character varying(50),  
28 media_server_id character varying(50), 27 media_server_id character varying(50),
29 custom_name character varying(255), 28 custom_name character varying(255),
30 sdp_ip character varying(50), 29 sdp_ip character varying(50),
@@ -187,7 +186,6 @@ create table wvp_platform ( @@ -187,7 +186,6 @@ create table wvp_platform (
187 catalog_group integer, 186 catalog_group integer,
188 create_time character varying(50), 187 create_time character varying(50),
189 update_time character varying(50), 188 update_time character varying(50),
190 - tree_type character varying(50),  
191 as_message_channel bool default false, 189 as_message_channel bool default false,
192 constraint uk_platform_unique_server_gb_id unique (server_gb_id) 190 constraint uk_platform_unique_server_gb_id unique (server_gb_id)
193 ); 191 );
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
@@ -173,12 +173,6 @@ public class Device { @@ -173,12 +173,6 @@ public class Device {
173 @Schema(description = "地理坐标系, 目前支持 WGS84,GCJ02") 173 @Schema(description = "地理坐标系, 目前支持 WGS84,GCJ02")
174 private String geoCoordSys; 174 private String geoCoordSys;
175 175
176 - /**  
177 - * 树类型 国标规定了两种树的展现方式 行政区划:CivilCode 和业务分组:BusinessGroup  
178 - */  
179 - @Schema(description = "树类型 国标规定了两种树的展现方式 行政区划:CivilCode 和业务分组:BusinessGroup")  
180 - private String treeType;  
181 -  
182 @Schema(description = "密码") 176 @Schema(description = "密码")
183 private String password; 177 private String password;
184 178
@@ -406,14 +400,6 @@ public class Device { @@ -406,14 +400,6 @@ public class Device {
406 this.geoCoordSys = geoCoordSys; 400 this.geoCoordSys = geoCoordSys;
407 } 401 }
408 402
409 - public String getTreeType() {  
410 - return treeType;  
411 - }  
412 -  
413 - public void setTreeType(String treeType) {  
414 - this.treeType = treeType;  
415 - }  
416 -  
417 public String getPassword() { 403 public String getPassword() {
418 return password; 404 return password;
419 } 405 }
src/main/java/com/genersoft/iot/vmp/gb28181/bean/ParentPlatform.java
@@ -183,12 +183,6 @@ public class ParentPlatform { @@ -183,12 +183,6 @@ public class ParentPlatform {
183 @Schema(description = "创建时间") 183 @Schema(description = "创建时间")
184 private String createTime; 184 private String createTime;
185 185
186 - /**  
187 - * 树类型 国标规定了两种树的展现方式 行政区划 CivilCode 和业务分组:BusinessGroup  
188 - */  
189 - @Schema(description = "树类型 国标规定了两种树的展现方式 行政区划 CivilCode 和业务分组:BusinessGrou")  
190 - private String treeType;  
191 -  
192 @Schema(description = "是否作为消息通道") 186 @Schema(description = "是否作为消息通道")
193 private boolean asMessageChannel; 187 private boolean asMessageChannel;
194 188
@@ -424,14 +418,6 @@ public class ParentPlatform { @@ -424,14 +418,6 @@ public class ParentPlatform {
424 this.createTime = createTime; 418 this.createTime = createTime;
425 } 419 }
426 420
427 - public String getTreeType() {  
428 - return treeType;  
429 - }  
430 -  
431 - public void setTreeType(String treeType) {  
432 - this.treeType = treeType;  
433 - }  
434 -  
435 public boolean isAsMessageChannel() { 421 public boolean isAsMessageChannel() {
436 return asMessageChannel; 422 return asMessageChannel;
437 } 423 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java
@@ -164,7 +164,6 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen @@ -164,7 +164,6 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
164 device.setStreamMode("UDP"); 164 device.setStreamMode("UDP");
165 device.setCharset("GB2312"); 165 device.setCharset("GB2312");
166 device.setGeoCoordSys("WGS84"); 166 device.setGeoCoordSys("WGS84");
167 - device.setTreeType("CivilCode");  
168 device.setDeviceId(deviceId); 167 device.setDeviceId(deviceId);
169 device.setOnLine(false); 168 device.setOnLine(false);
170 } 169 }
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
@@ -470,7 +470,6 @@ public class DeviceServiceImpl implements IDeviceService { @@ -470,7 +470,6 @@ public class DeviceServiceImpl implements IDeviceService {
470 } 470 }
471 deviceInStore.setSdpIp(device.getSdpIp()); 471 deviceInStore.setSdpIp(device.getSdpIp());
472 deviceInStore.setCharset(device.getCharset()); 472 deviceInStore.setCharset(device.getCharset());
473 - deviceInStore.setTreeType(device.getTreeType());  
474 473
475 // 目录订阅相关的信息 474 // 目录订阅相关的信息
476 if (device.getSubscribeCycleForCatalog() > 0) { 475 if (device.getSubscribeCycleForCatalog() > 0) {
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
@@ -130,8 +130,6 @@ public class PlatformServiceImpl implements IPlatformService { @@ -130,8 +130,6 @@ public class PlatformServiceImpl implements IPlatformService {
130 @Override 130 @Override
131 public boolean update(ParentPlatform parentPlatform) { 131 public boolean update(ParentPlatform parentPlatform) {
132 logger.info("[国标级联]更新平台 {}", parentPlatform.getDeviceGBId()); 132 logger.info("[国标级联]更新平台 {}", parentPlatform.getDeviceGBId());
133 - // TODO 后续版本去除  
134 - parentPlatform.setTreeType("");  
135 parentPlatform.setCharacterSet(parentPlatform.getCharacterSet().toUpperCase()); 133 parentPlatform.setCharacterSet(parentPlatform.getCharacterSet().toUpperCase());
136 ParentPlatform parentPlatformOld = platformMapper.getParentPlatById(parentPlatform.getId()); 134 ParentPlatform parentPlatformOld = platformMapper.getParentPlatById(parentPlatform.getId());
137 ParentPlatformCatch parentPlatformCatchOld = redisCatchStorage.queryPlatformCatchInfo(parentPlatformOld.getServerGBId()); 135 ParentPlatformCatch parentPlatformCatchOld = redisCatchStorage.queryPlatformCatchInfo(parentPlatformOld.getServerGBId());
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -40,7 +40,6 @@ public interface DeviceMapper { @@ -40,7 +40,6 @@ public interface DeviceMapper {
40 "ssrc_check," + 40 "ssrc_check," +
41 "as_message_channel," + 41 "as_message_channel," +
42 "geo_coord_sys," + 42 "geo_coord_sys," +
43 - "tree_type," +  
44 "on_line," + 43 "on_line," +
45 "media_server_id," + 44 "media_server_id," +
46 "(SELECT count(0) FROM wvp_device_channel WHERE device_id=wvp_device.device_id) as channel_count "+ 45 "(SELECT count(0) FROM wvp_device_channel WHERE device_id=wvp_device.device_id) as channel_count "+
@@ -74,7 +73,6 @@ public interface DeviceMapper { @@ -74,7 +73,6 @@ public interface DeviceMapper {
74 "ssrc_check,"+ 73 "ssrc_check,"+
75 "as_message_channel,"+ 74 "as_message_channel,"+
76 "geo_coord_sys,"+ 75 "geo_coord_sys,"+
77 - "tree_type,"+  
78 "on_line"+ 76 "on_line"+
79 ") VALUES (" + 77 ") VALUES (" +
80 "#{deviceId}," + 78 "#{deviceId}," +
@@ -103,7 +101,6 @@ public interface DeviceMapper { @@ -103,7 +101,6 @@ public interface DeviceMapper {
103 "#{ssrcCheck}," + 101 "#{ssrcCheck}," +
104 "#{asMessageChannel}," + 102 "#{asMessageChannel}," +
105 "#{geoCoordSys}," + 103 "#{geoCoordSys}," +
106 - "#{treeType}," +  
107 "#{onLine}" + 104 "#{onLine}" +
108 ")") 105 ")")
109 int add(Device device); 106 int add(Device device);
@@ -158,7 +155,6 @@ public interface DeviceMapper { @@ -158,7 +155,6 @@ public interface DeviceMapper {
158 "ssrc_check,"+ 155 "ssrc_check,"+
159 "as_message_channel,"+ 156 "as_message_channel,"+
160 "geo_coord_sys,"+ 157 "geo_coord_sys,"+
161 - "tree_type,"+  
162 "on_line,"+ 158 "on_line,"+
163 "media_server_id,"+ 159 "media_server_id,"+
164 "(SELECT count(0) FROM wvp_device_channel WHERE device_id=de.device_id) as channel_count " + 160 "(SELECT count(0) FROM wvp_device_channel WHERE device_id=de.device_id) as channel_count " +
@@ -199,7 +195,6 @@ public interface DeviceMapper { @@ -199,7 +195,6 @@ public interface DeviceMapper {
199 "ssrc_check,"+ 195 "ssrc_check,"+
200 "as_message_channel,"+ 196 "as_message_channel,"+
201 "geo_coord_sys,"+ 197 "geo_coord_sys,"+
202 - "tree_type,"+  
203 "on_line"+ 198 "on_line"+
204 " FROM wvp_device WHERE on_line = true") 199 " FROM wvp_device WHERE on_line = true")
205 List<Device> getOnlineDevices(); 200 List<Device> getOnlineDevices();
@@ -230,7 +225,6 @@ public interface DeviceMapper { @@ -230,7 +225,6 @@ public interface DeviceMapper {
230 "ssrc_check,"+ 225 "ssrc_check,"+
231 "as_message_channel,"+ 226 "as_message_channel,"+
232 "geo_coord_sys,"+ 227 "geo_coord_sys,"+
233 - "tree_type,"+  
234 "on_line"+ 228 "on_line"+
235 " FROM wvp_device WHERE ip = #{host} AND port=#{port}") 229 " FROM wvp_device WHERE ip = #{host} AND port=#{port}")
236 Device getDeviceByHostAndPort(String host, int port); 230 Device getDeviceByHostAndPort(String host, int port);
@@ -252,7 +246,6 @@ public interface DeviceMapper { @@ -252,7 +246,6 @@ public interface DeviceMapper {
252 "<if test=\"ssrcCheck != null\">, ssrc_check=#{ssrcCheck}</if>" + 246 "<if test=\"ssrcCheck != null\">, ssrc_check=#{ssrcCheck}</if>" +
253 "<if test=\"asMessageChannel != null\">, as_message_channel=#{asMessageChannel}</if>" + 247 "<if test=\"asMessageChannel != null\">, as_message_channel=#{asMessageChannel}</if>" +
254 "<if test=\"geoCoordSys != null\">, geo_coord_sys=#{geoCoordSys}</if>" + 248 "<if test=\"geoCoordSys != null\">, geo_coord_sys=#{geoCoordSys}</if>" +
255 - "<if test=\"treeType != null\">, tree_type=#{treeType}</if>" +  
256 "<if test=\"mediaServerId != null\">, media_server_id=#{mediaServerId}</if>" + 249 "<if test=\"mediaServerId != null\">, media_server_id=#{mediaServerId}</if>" +
257 "WHERE device_id=#{deviceId}"+ 250 "WHERE device_id=#{deviceId}"+
258 " </script>"}) 251 " </script>"})
@@ -269,7 +262,6 @@ public interface DeviceMapper { @@ -269,7 +262,6 @@ public interface DeviceMapper {
269 "ssrc_check,"+ 262 "ssrc_check,"+
270 "as_message_channel,"+ 263 "as_message_channel,"+
271 "geo_coord_sys,"+ 264 "geo_coord_sys,"+
272 - "tree_type,"+  
273 "on_line,"+ 265 "on_line,"+
274 "media_server_id"+ 266 "media_server_id"+
275 ") VALUES (" + 267 ") VALUES (" +
@@ -283,7 +275,6 @@ public interface DeviceMapper { @@ -283,7 +275,6 @@ public interface DeviceMapper {
283 "#{ssrcCheck}," + 275 "#{ssrcCheck}," +
284 "#{asMessageChannel}," + 276 "#{asMessageChannel}," +
285 "#{geoCoordSys}," + 277 "#{geoCoordSys}," +
286 - "#{treeType}," +  
287 "#{onLine}," + 278 "#{onLine}," +
288 "#{mediaServerId}" + 279 "#{mediaServerId}" +
289 ")") 280 ")")
src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java
@@ -16,10 +16,10 @@ public interface ParentPlatformMapper { @@ -16,10 +16,10 @@ public interface ParentPlatformMapper {
16 16
17 @Insert("INSERT INTO wvp_platform (enable, name, server_gb_id, server_gb_domain, server_ip, server_port,device_gb_id,device_ip,"+ 17 @Insert("INSERT INTO wvp_platform (enable, name, server_gb_id, server_gb_domain, server_ip, server_port,device_gb_id,device_ip,"+
18 "device_port,username,password,expires,keep_timeout,transport,character_set,ptz,rtcp,as_message_channel,"+ 18 "device_port,username,password,expires,keep_timeout,transport,character_set,ptz,rtcp,as_message_channel,"+
19 - "status,start_offline_push,catalog_id,administrative_division,catalog_group,create_time,update_time,tree_type) " + 19 + "status,start_offline_push,catalog_id,administrative_division,catalog_group,create_time,update_time) " +
20 " VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " + 20 " VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
21 " #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, #{asMessageChannel}, " + 21 " #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, #{asMessageChannel}, " +
22 - " #{status}, #{startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime}, #{treeType})") 22 + " #{status}, #{startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime})")
23 int addParentPlatform(ParentPlatform parentPlatform); 23 int addParentPlatform(ParentPlatform parentPlatform);
24 24
25 @Update("UPDATE wvp_platform " + 25 @Update("UPDATE wvp_platform " +
@@ -47,7 +47,6 @@ public interface ParentPlatformMapper { @@ -47,7 +47,6 @@ public interface ParentPlatformMapper {
47 "administrative_division=#{administrativeDivision}, " + 47 "administrative_division=#{administrativeDivision}, " +
48 "create_time=#{createTime}, " + 48 "create_time=#{createTime}, " +
49 "update_time=#{updateTime}, " + 49 "update_time=#{updateTime}, " +
50 - "tree_type=#{treeType}, " +  
51 "catalog_id=#{catalogId} " + 50 "catalog_id=#{catalogId} " +
52 "WHERE id=#{id}") 51 "WHERE id=#{id}")
53 int updateParentPlatform(ParentPlatform parentPlatform); 52 int updateParentPlatform(ParentPlatform parentPlatform);