Merge branch 'master' into dev/前端页面修改

This commit is contained in:
lin
2025-04-14 12:12:05 +08:00
5 changed files with 21 additions and 22 deletions

View File

@@ -381,7 +381,7 @@ public interface DeviceMapper {
" OR device_id LIKE concat('%',#{query},'%') escape '/' " +
" OR ip LIKE concat('%',#{query},'%') escape '/')" +
"</if> " +
" order by create_time desc "+
" order by create_time desc, device_id " +
" </script>")
List<Device> getDeviceList(@Param("dataType") Integer dataType, @Param("query") String query, @Param("status") Boolean status);

View File

@@ -101,6 +101,7 @@ public class DeviceChannelProvider {
}
sqlBuild.append(" )");
}
sqlBuild.append("ORDER BY device_id");
return sqlBuild.toString();
}

View File

@@ -124,25 +124,21 @@ public class StreamPushServiceImpl implements IStreamPushService {
public void onApplicationEvent(MediaDepartureEvent event) {
// 兼容流注销时类型从redis记录获取
MediaInfo mediaInfo = redisCatchStorage.getStreamInfo(
event.getApp(), event.getStream(), event.getMediaServer().getId());
MediaInfo mediaInfo = redisCatchStorage.getPushListItem(event.getApp(), event.getStream());
if (mediaInfo != null) {
log.info("[推流信息] 查询到redis存在推流缓存 开始清理,{}/{}", event.getApp(), event.getStream());
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());
}
if (type != null) {
// 发送流变化redis消息
JSONObject jsonObject = new JSONObject();
jsonObject.put("serverId", userSetting.getServerId());
jsonObject.put("app", event.getApp());
jsonObject.put("stream", event.getStream());
jsonObject.put("register", false);
jsonObject.put("mediaServerId", event.getMediaServer().getId());
redisCatchStorage.sendStreamChangeMsg(type, jsonObject);
}
// 冗余数据,自己系统中自用
redisCatchStorage.removePushListItem(event.getApp(), event.getStream(), event.getMediaServer().getId());
// 发送流变化redis消息
JSONObject jsonObject = new JSONObject();
jsonObject.put("serverId", userSetting.getServerId());
jsonObject.put("app", event.getApp());
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());
if (streamPush == null) {

View File

@@ -159,11 +159,12 @@ create table IF NOT EXISTS wvp_device_channel
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
index (data_type),
index (data_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;
create table IF NOT EXISTS wvp_media_server
(

View File

@@ -137,11 +137,12 @@ create table IF NOT EXISTS wvp_device_channel
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
index (data_type),
index (data_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
(
id serial primary key,