Commit d310204d00b3701999da87090845c50ba9adc146

Authored by 648540858
1 parent 05323631

去除多余字段

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