mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 14:37:53 +08:00
Merge branch 'master' into dev/前端页面修改
This commit is contained in:
commit
59c6243338
@ -381,7 +381,7 @@ public interface DeviceMapper {
|
|||||||
" OR device_id LIKE concat('%',#{query},'%') escape '/' " +
|
" OR device_id LIKE concat('%',#{query},'%') escape '/' " +
|
||||||
" OR ip LIKE concat('%',#{query},'%') escape '/')" +
|
" OR ip LIKE concat('%',#{query},'%') escape '/')" +
|
||||||
"</if> " +
|
"</if> " +
|
||||||
" order by create_time desc "+
|
" order by create_time desc, device_id " +
|
||||||
" </script>")
|
" </script>")
|
||||||
List<Device> getDeviceList(@Param("dataType") Integer dataType, @Param("query") String query, @Param("status") Boolean status);
|
List<Device> getDeviceList(@Param("dataType") Integer dataType, @Param("query") String query, @Param("status") Boolean status);
|
||||||
|
|
||||||
|
|||||||
@ -101,6 +101,7 @@ public class DeviceChannelProvider {
|
|||||||
}
|
}
|
||||||
sqlBuild.append(" )");
|
sqlBuild.append(" )");
|
||||||
}
|
}
|
||||||
|
sqlBuild.append("ORDER BY device_id");
|
||||||
return sqlBuild.toString();
|
return sqlBuild.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -124,25 +124,21 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
public void onApplicationEvent(MediaDepartureEvent event) {
|
public void onApplicationEvent(MediaDepartureEvent event) {
|
||||||
|
|
||||||
// 兼容流注销时类型从redis记录获取
|
// 兼容流注销时类型从redis记录获取
|
||||||
MediaInfo mediaInfo = redisCatchStorage.getStreamInfo(
|
MediaInfo mediaInfo = redisCatchStorage.getPushListItem(event.getApp(), event.getStream());
|
||||||
event.getApp(), event.getStream(), event.getMediaServer().getId());
|
|
||||||
if (mediaInfo != null) {
|
if (mediaInfo != null) {
|
||||||
|
log.info("[推流信息] 查询到redis存在推流缓存, 开始清理,{}/{}", event.getApp(), event.getStream());
|
||||||
String type = OriginType.values()[mediaInfo.getOriginType()].getType();
|
String type = OriginType.values()[mediaInfo.getOriginType()].getType();
|
||||||
redisCatchStorage.removeStream(event.getMediaServer().getId(), type, event.getApp(), event.getStream());
|
// 冗余数据,自己系统中自用
|
||||||
if ("PUSH".equalsIgnoreCase(type)) {
|
redisCatchStorage.removePushListItem(event.getApp(), event.getStream(), event.getMediaServer().getId());
|
||||||
// 冗余数据,自己系统中自用
|
// 发送流变化redis消息
|
||||||
redisCatchStorage.removePushListItem(event.getApp(), event.getStream(), event.getMediaServer().getId());
|
JSONObject jsonObject = new JSONObject();
|
||||||
}
|
jsonObject.put("serverId", userSetting.getServerId());
|
||||||
if (type != null) {
|
jsonObject.put("app", event.getApp());
|
||||||
// 发送流变化redis消息
|
jsonObject.put("stream", event.getStream());
|
||||||
JSONObject jsonObject = new JSONObject();
|
jsonObject.put("register", false);
|
||||||
jsonObject.put("serverId", userSetting.getServerId());
|
jsonObject.put("mediaServerId", event.getMediaServer().getId());
|
||||||
jsonObject.put("app", event.getApp());
|
redisCatchStorage.sendStreamChangeMsg(type, jsonObject);
|
||||||
jsonObject.put("stream", event.getStream());
|
|
||||||
jsonObject.put("register", false);
|
|
||||||
jsonObject.put("mediaServerId", event.getMediaServer().getId());
|
|
||||||
redisCatchStorage.sendStreamChangeMsg(type, jsonObject);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
StreamPush streamPush = getPush(event.getApp(), event.getStream());
|
StreamPush streamPush = getPush(event.getApp(), event.getStream());
|
||||||
if (streamPush == null) {
|
if (streamPush == null) {
|
||||||
|
|||||||
@ -159,11 +159,12 @@ create table IF NOT EXISTS wvp_device_channel
|
|||||||
gps_speed double precision,
|
gps_speed double precision,
|
||||||
gps_altitude double precision,
|
gps_altitude double precision,
|
||||||
gps_direction double precision,
|
gps_direction double precision,
|
||||||
index (data_type),
|
|
||||||
index (data_device_id),
|
|
||||||
constraint uk_wvp_unique_channel unique (gb_device_id)
|
constraint uk_wvp_unique_channel unique (gb_device_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX idx_data_type ON wvp_device_channel (data_type);
|
||||||
|
CREATE INDEX idx_data_device_id ON wvp_device_channel (data_device_id);
|
||||||
|
|
||||||
drop table IF EXISTS wvp_media_server;
|
drop table IF EXISTS wvp_media_server;
|
||||||
create table IF NOT EXISTS wvp_media_server
|
create table IF NOT EXISTS wvp_media_server
|
||||||
(
|
(
|
||||||
|
|||||||
@ -137,11 +137,12 @@ create table IF NOT EXISTS wvp_device_channel
|
|||||||
gps_speed double precision,
|
gps_speed double precision,
|
||||||
gps_altitude double precision,
|
gps_altitude double precision,
|
||||||
gps_direction double precision,
|
gps_direction double precision,
|
||||||
index (data_type),
|
|
||||||
index (data_device_id),
|
|
||||||
constraint uk_wvp_unique_channel unique (gb_device_id)
|
constraint uk_wvp_unique_channel unique (gb_device_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create index if not exists data_type on wvp_device_channel (data_type);
|
||||||
|
create index if not exists data_device_id on wvp_device_channel (data_device_id);
|
||||||
|
|
||||||
create table IF NOT EXISTS wvp_device_mobile_position
|
create table IF NOT EXISTS wvp_device_mobile_position
|
||||||
(
|
(
|
||||||
id serial primary key,
|
id serial primary key,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user