Merge remote-tracking branch 'origin/master' into 重构/1078

# Conflicts:
#	src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/dao/provider/ChannelProvider.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java
#	数据库/2.7.3/初始化-mysql-2.7.3.sql
#	数据库/2.7.3/初始化-postgresql-kingbase-2.7.3.sql
This commit is contained in:
lin
2025-03-18 15:30:35 +08:00
231 changed files with 15701 additions and 4618 deletions

View File

@@ -31,8 +31,11 @@ create table wvp_device
local_ip character varying(50),
password character varying(255),
as_message_channel bool default false,
keepalive_interval_time integer,
heart_beat_interval integer,
heart_beat_count integer,
position_capability integer,
broadcast_push_after_ack bool default false,
server_id character varying(50),
constraint uk_device_device unique (device_id)
);
@@ -70,7 +73,6 @@ create table wvp_device_mobile_position
create table wvp_device_channel
(
id serial primary key,
device_db_id integer,
device_id character varying(50),
name character varying(255),
manufacturer character varying(50),
@@ -148,18 +150,11 @@ create table wvp_device_channel
gb_svc_space_support_mod integer,
gb_svc_time_support_mode integer,
record_plan_id integer,
stream_push_id integer,
stream_proxy_id integer,
jt_channel_id integer,
constraint uk_wvp_device_channel_unique_device_channel unique (device_db_id, device_id),
constraint uk_wvp_unique_channel unique (gb_device_id),
constraint uk_wvp_unique_stream_push_id unique (stream_push_id),
constraint uk_wvp_unique_stream_proxy_id unique (stream_proxy_id),
constraint uk_wvp_unique_jt_channel_id unique (jt_channel_id)
data_type integer not null,
data_device_id integer not null,
constraint uk_wvp_unique_channel unique (gb_device_id)
);
create index uk_wvp_device_db_id on wvp_device_channel (device_db_id);
create table wvp_media_server
(
id character varying(255) primary key,
@@ -192,7 +187,8 @@ create table wvp_media_server
record_path character varying(255),
record_day integer default 7,
transcode_suffix character varying(255),
constraint uk_media_server_unique_ip_http_port unique (ip, http_port)
server_id character varying(50),
constraint uk_media_server_unique_ip_http_port unique (ip, http_port, server_id)
);
create table wvp_platform
@@ -231,6 +227,7 @@ create table wvp_platform
catalog_with_region integer default 1,
auto_push_channel bool default true,
send_stream_ip character varying(50),
server_id character varying(50),
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
);
@@ -314,7 +311,9 @@ create table wvp_stream_proxy
name character varying(255),
update_time character varying(50),
stream_key character varying(255),
server_id character varying(50),
enable_disable_none_reader bool default false,
relates_media_server_id character varying(50),
constraint uk_stream_proxy_app_stream unique (app, stream)
);
@@ -343,13 +342,13 @@ create table wvp_cloud_record
start_time bigint,
end_time bigint,
media_server_id character varying(50),
server_id character varying(50),
file_name character varying(255),
folder character varying(255),
file_path character varying(255),
folder character varying(500),
file_path character varying(500),
collect bool default false,
file_size bigint,
time_len bigint,
constraint uk_stream_push_app_stream_path unique (app, stream, file_path)
time_len bigint
);
create table wvp_user

View File

@@ -31,8 +31,11 @@ create table wvp_device
local_ip character varying(50),
password character varying(255),
as_message_channel bool default false,
keepalive_interval_time integer,
heart_beat_interval integer,
heart_beat_count integer,
position_capability integer,
broadcast_push_after_ack bool default false,
server_id character varying(50),
constraint uk_device_device unique (device_id)
);
@@ -67,26 +70,9 @@ create table wvp_device_mobile_position
create_time character varying(50)
);
create table wvp_gb_stream
(
gb_stream_id serial primary key,
app character varying(255) not null,
stream character varying(255) not null,
gb_id character varying(50) not null,
name character varying(255),
longitude double precision,
latitude double precision,
stream_type character varying(50),
media_server_id character varying(50),
create_time character varying(50),
constraint uk_gb_stream_unique_gb_id unique (gb_id),
constraint uk_gb_stream_unique_app_stream unique (app, stream)
);
create table wvp_device_channel
(
id serial primary key,
device_db_id integer,
device_id character varying(50),
name character varying(255),
manufacturer character varying(50),
@@ -164,19 +150,11 @@ create table wvp_device_channel
gb_svc_space_support_mod integer,
gb_svc_time_support_mode integer,
record_plan_id integer,
stream_push_id integer,
stream_proxy_id integer,
jt_channel_id integer,
constraint uk_wvp_device_channel_unique_device_channel unique (device_db_id, device_id),
constraint uk_wvp_unique_channel unique (gb_device_id),
constraint uk_wvp_unique_stream_push_id unique (stream_push_id),
constraint uk_wvp_unique_stream_proxy_id unique (stream_proxy_id),
constraint uk_wvp_unique_jt_channel_id unique (jt_channel_id)
data_type integer not null,
data_device_id integer not null,
constraint uk_wvp_unique_channel unique (gb_device_id)
);
create index uk_wvp_device_db_id on wvp_device_channel (device_db_id);
create table wvp_media_server
(
id character varying(255) primary key,
@@ -209,7 +187,8 @@ create table wvp_media_server
record_path character varying(255),
record_day integer default 7,
transcode_suffix character varying(255),
constraint uk_media_server_unique_ip_http_port unique (ip, http_port)
server_id character varying(50),
constraint uk_media_server_unique_ip_http_port unique (ip, http_port, server_id)
);
create table wvp_platform
@@ -248,6 +227,7 @@ create table wvp_platform
catalog_with_region integer default 1,
auto_push_channel bool default true,
send_stream_ip character varying(50),
server_id character varying(50),
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
);
@@ -331,7 +311,9 @@ create table wvp_stream_proxy
name character varying(255),
update_time character varying(50),
stream_key character varying(255),
server_id character varying(50),
enable_disable_none_reader bool default false,
relates_media_server_id character varying(50),
constraint uk_stream_proxy_app_stream unique (app, stream)
);
@@ -360,9 +342,10 @@ create table wvp_cloud_record
start_time int8,
end_time int8,
media_server_id character varying(50),
server_id character varying(50),
file_name character varying(255),
folder character varying(255),
file_path character varying(255),
folder character varying(500),
file_path character varying(500),
collect bool default false,
file_size int8,
time_len int8,
@@ -459,7 +442,7 @@ create table wvp_record_plan
create table wvp_record_plan_item
(
id serial primary key,
start int,
"start" int,
stop int,
week_day int,
plan_id int,

View File

@@ -0,0 +1,13 @@
/*
* WVP RPC 调用
*/
alter table wvp_device add server_id character varying(50);
alter table wvp_media_server add server_id character varying(50);
alter table wvp_stream_proxy add server_id character varying(50);
alter table wvp_cloud_record add server_id character varying(50);
alter table wvp_platform add server_id character varying(50);
update wvp_device set server_id = "你服务的ID";
update wvp_media_server set server_id = "你服务的ID";
update wvp_stream_proxy set server_id = "你服务的ID";
update wvp_cloud_record set server_id = "你服务的ID";

View File

@@ -0,0 +1,64 @@
/*
* 20241222
*/
alter table wvp_device_channel
drop index uk_wvp_device_channel_unique_device_channel;
alter table wvp_device_channel
drop index uk_wvp_unique_stream_push_id;
alter table wvp_device_channel
drop index uk_wvp_unique_stream_proxy_id;
alter table wvp_device_channel
add data_type integer not null;
alter table wvp_device_channel
add data_device_id integer not null;
update wvp_device_channel wdc INNER JOIN
(SELECT id, device_db_id from wvp_device_channel where device_db_id is not null ) ct on ct.id = wdc.id
set wdc.data_type = 1, wdc.data_device_id = ct.device_db_id where wdc.device_db_id is not null;
update wvp_device_channel wdc INNER JOIN
(SELECT id, stream_push_id from wvp_device_channel where stream_push_id is not null ) ct on ct.id = wdc.id
set wdc.data_type = 2, wdc.data_device_id = ct.stream_push_id where wdc.stream_push_id is not null;
update wvp_device_channel wdc INNER JOIN
(SELECT id, stream_proxy_id from wvp_device_channel where stream_proxy_id is not null ) ct on ct.id = wdc.id
set wdc.data_type = 3, wdc.data_device_id = ct.stream_proxy_id where wdc.stream_proxy_id is not null;
alter table wvp_device_channel drop device_db_id;
alter table wvp_device_channel drop stream_push_id;
alter table wvp_device_channel drop stream_proxy_id;
/*
* 20241231
*/
alter table wvp_stream_proxy add relates_media_server_id character varying(50);
/*
* 20250111
*/
drop index uk_stream_push_app_stream_path on wvp_cloud_record;
alter table wvp_cloud_record change folder folder varchar(500) null;
alter table wvp_cloud_record change file_path file_path varchar(500) null;
/*
* 20250211
*/
alter table wvp_device change keepalive_interval_time heart_beat_interval integer;
alter table wvp_device add heart_beat_count integer;
alter table wvp_device add position_capability integer;
/**
* 20250312
*/
alter table wvp_device add server_id character varying(50);
alter table wvp_media_server add server_id character varying(50);
alter table wvp_stream_proxy add server_id character varying(50);
alter table wvp_cloud_record add server_id character varying(50);
alter table wvp_platform add server_id character varying(50);
update wvp_device set server_id = "你服务的ID";
update wvp_media_server set server_id = "你服务的ID";
update wvp_stream_proxy set server_id = "你服务的ID";
update wvp_cloud_record set server_id = "你服务的ID";

View File

@@ -0,0 +1,63 @@
/*
* 20241222
*/
alter table wvp_device_channel
drop index uk_wvp_device_channel_unique_device_channel;
alter table wvp_device_channel
drop index uk_wvp_unique_stream_push_id;
alter table wvp_device_channel
drop index uk_wvp_unique_stream_proxy_id;
alter table wvp_device_channel
add data_type integer not null;
alter table wvp_device_channel
add data_device_id integer not null;
update wvp_device_channel wdc
set data_type = 1, data_device_id = (SELECT device_db_id from wvp_device_channel where device_db_id is not null and id = wdc.id ) where device_db_id is not null;
update wvp_device_channel wdc
set data_type = 2, data_device_id = (SELECT stream_push_id from wvp_device_channel where stream_push_id is not null and id = wdc.id ) where stream_push_id is not null;
update wvp_device_channel wdc
set data_type = 3, data_device_id = (SELECT stream_proxy_id from wvp_device_channel where stream_proxy_id is not null and id = wdc.id ) where stream_proxy_id is not null;
alter table wvp_device_channel drop device_db_id;
alter table wvp_device_channel drop stream_push_id;
alter table wvp_device_channel drop stream_proxy_id;
/*
* 20241231
*/
alter table wvp_stream_proxy add relates_media_server_id character varying(50);
/*
* 20250111
*/
drop index uk_stream_push_app_stream_path on wvp_cloud_record;
alter table wvp_cloud_record change folder folder varchar(500) null;
alter table wvp_cloud_record change file_path file_path varchar(500) null;
/*
* 20250211
*/
alter table wvp_device change keepalive_interval_time heart_beat_interval integer;
alter table wvp_device add heart_beat_count integer;
alter table wvp_device add position_capability integer;
/**
* 20250312
*/
alter table wvp_device add server_id character varying(50);
alter table wvp_media_server add server_id character varying(50);
alter table wvp_stream_proxy add server_id character varying(50);
alter table wvp_cloud_record add server_id character varying(50);
alter table wvp_platform add server_id character varying(50);
update wvp_device set server_id = "你服务的ID";
update wvp_media_server set server_id = "你服务的ID";
update wvp_stream_proxy set server_id = "你服务的ID";
update wvp_cloud_record set server_id = "你服务的ID";