fix(video): P0 修复 @TableName 映射错误、字段命名、补缺列与 exist=false

@TableName 修正:
- CommonGBChannel: "video_device_channel" → "video_common_gb_channel"
- DeviceChannel: 显式加 @TableName("video_device_channel")
- PlatformChannel: 补充 @TableName("video_platform_channel")
  避免因继承 CommonGBChannel 而写入错误表

字段命名规范化(修复驼峰转 snake_case 错位):
- CommonGBChannel.recordPLan → recordPlanId(对应 record_plan_id)
- MediaServer.httpSSlPort / flvSSLPort / wsFlvSSLPort
  → httpSslPort / flvSslPort / wsFlvSslPort
  (原命名 L 大写/双大写导致转 snake 变 http_s_sl_port)
- 同步更新 Mapper SQL 中的 #{xxx} 引用和 ZLM/ABL 节点服务调用点

@TableField(exist=false) 标注(JOIN 显示字段/业务计算值/内存对象):
- DeviceChannel: parentDeviceId、parentName、ptzTypeText
- DeviceAlarm: deviceName、alarmPriorityDescription、alarmMethodDescription、
  alarmTypeDescription
- AiAlert: cameraName、roiName
- Device: sipTransactionInfo
- MobilePosition: channelDeviceId
- StreamPush: uniqueKey

补齐 SQL 缺失列(需持久化的业务状态字段):
- video_device: channel_count
- video_platform: channel_count / catalog_subscribe / alarm_subscribe
  / mobile_position_subscribe
- video_media_server: status / last_keepalive_time
- video_cloud_record: reserve
- video_device_mobile_position.channel_id: varchar(50) → bigint
  (DO 字段是 Long,作为外键引用 video_device_channel.id)

补齐 DO 缺失字段:
- AiAlgorithm: 新增 globalParams(对应 SQL global_params)
- StreamPush: 新增 status(对应 SQL status)

编译通过(mvn compile BUILD SUCCESS)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
lzh
2026-04-21 12:07:47 +08:00
parent 43becf998c
commit 1698c71d84
16 changed files with 77 additions and 38 deletions

View File

@@ -72,6 +72,7 @@ CREATE TABLE `video_device` (
`heart_beat_interval` int NULL COMMENT '心跳间隔',
`heart_beat_count` int NULL COMMENT '心跳失败次数',
`position_capability` int NULL COMMENT '定位能力标识',
`channel_count` int NOT NULL DEFAULT 0 COMMENT '通道数量',
`broadcast_push_after_ack` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'ACK后是否自动推流',
`server_id` varchar(50) NULL COMMENT '所属信令服务器ID',
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者',
@@ -219,7 +220,7 @@ DROP TABLE IF EXISTS `video_device_mobile_position`;
CREATE TABLE `video_device_mobile_position` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`device_id` varchar(50) NOT NULL COMMENT '设备ID',
`channel_id` varchar(50) NOT NULL COMMENT '通道ID',
`channel_id` bigint NULL COMMENT '通道表主键FK→video_device_channel.id',
`device_name` varchar(255) NULL COMMENT '设备名称',
`time` varchar(50) NULL COMMENT '上报时间',
`longitude` double NULL COMMENT '经度',
@@ -376,6 +377,10 @@ CREATE TABLE `video_platform` (
`ptz` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持PTZ',
`rtcp` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否开启RTCP',
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '注册状态',
`channel_count` int NOT NULL DEFAULT 0 COMMENT '已同步通道数量',
`catalog_subscribe` tinyint(1) NOT NULL DEFAULT 0 COMMENT '已被订阅目录信息',
`alarm_subscribe` tinyint(1) NOT NULL DEFAULT 0 COMMENT '已被订阅报警信息',
`mobile_position_subscribe` tinyint(1) NOT NULL DEFAULT 0 COMMENT '已被订阅移动位置信息',
`catalog_group` int NULL COMMENT '目录分组方式',
`register_way` int NULL COMMENT '注册方式',
`secrecy` int NULL COMMENT '保密级别',
@@ -527,6 +532,8 @@ CREATE TABLE `video_media_server` (
`record_day` int NOT NULL DEFAULT 7 COMMENT '录像保留天数',
`transcode_suffix` varchar(255) NULL COMMENT '转码指令后缀',
`server_id` varchar(50) NULL COMMENT '对应信令服务器ID',
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '媒体服务器在线状态0离线,1在线',
`last_keepalive_time` varchar(50) NULL COMMENT '最近心跳时间',
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) NOT NULL DEFAULT '' COMMENT '更新者',
@@ -621,6 +628,7 @@ CREATE TABLE `video_cloud_record` (
`folder` varchar(500) NULL COMMENT '目录',
`file_path` varchar(500) NULL COMMENT '完整路径',
`collect` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否收藏',
`reserve` tinyint(1) NULL DEFAULT 0 COMMENT '是否保留(保留的文件不自动清除)',
`file_size` bigint NULL COMMENT '文件大小',
`time_len` double NULL COMMENT '时长',
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建者',

View File

@@ -1,6 +1,7 @@
package com.viewsh.module.video.aiot.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.viewsh.framework.tenant.core.db.ProjectBaseDO;
@@ -24,12 +25,14 @@ public class AiAlert extends ProjectBaseDO {
@Schema(description = "摄像头ID")
private String cameraId;
@TableField(exist = false)
@Schema(description = "摄像头名称(关联查询)")
private String cameraName;
@Schema(description = "ROI区域ID")
private String roiId;
@TableField(exist = false)
@Schema(description = "ROI区域名称关联查询")
private String roiName;

View File

@@ -36,6 +36,9 @@ public class AiAlgorithm extends TenantBaseDO {
@Schema(description = "是否可用")
private Integer isActive;
@Schema(description = "全局参数JSON整个算法的默认参数")
private String globalParams;
@Schema(description = "最后同步时间")
private String syncTime;
}

View File

@@ -10,7 +10,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@TableName("video_device_channel")
@TableName("video_common_gb_channel")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "国标通道")
public class CommonGBChannel extends ProjectBaseDO {
@@ -140,8 +140,8 @@ public class CommonGBChannel extends ProjectBaseDO {
@Schema(description = "国标-时域编码能力,取值0-不支持;1-1级增强;2-2级增强;3-3级增强(可选)")
private Integer gbSvcTimeSupportMode;
@Schema(description = "二进制保存的录计划, 每一位表示每个小时的前半个小时")
private Long recordPLan;
@Schema(description = "绑定的录计划ID")
private Long recordPlanId;
@Schema(description = "关联的数据类型")
private Integer dataType;
@@ -440,7 +440,7 @@ public class CommonGBChannel extends ProjectBaseDO {
", gbDownloadSpeed='" + gbDownloadSpeed + '\'' +
", gbSvcSpaceSupportMod=" + gbSvcSpaceSupportMod +
", gbSvcTimeSupportMode=" + gbSvcTimeSupportMode +
", recordPLan=" + recordPLan +
", recordPlanId=" + recordPlanId +
", dataType=" + dataType +
", dataDeviceId=" + dataDeviceId +
", streamId='" + streamId + '\'' +

View File

@@ -1,6 +1,7 @@
package com.viewsh.module.video.gb28181.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.viewsh.framework.tenant.core.db.ProjectBaseDO;
@@ -199,6 +200,7 @@ public class Device extends ProjectBaseDO {
@Schema(description = "是否作为消息通道")
private boolean asMessageChannel;
@TableField(exist = false)
@Schema(description = "设备注册的事务信息")
private SipTransactionInfo sipTransactionInfo;

View File

@@ -1,6 +1,7 @@
package com.viewsh.module.video.gb28181.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.viewsh.framework.tenant.core.db.ProjectBaseDO;
@@ -27,6 +28,7 @@ public class DeviceAlarm extends ProjectBaseDO {
@Schema(description = "设备的国标编号")
private String deviceId;
@TableField(exist = false)
@Schema(description = "设备名称")
private String deviceName;
@@ -42,6 +44,7 @@ public class DeviceAlarm extends ProjectBaseDO {
@Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情")
private String alarmPriority;
@TableField(exist = false)
@Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情")
private String alarmPriorityDescription;
@@ -69,6 +72,7 @@ public class DeviceAlarm extends ProjectBaseDO {
private String alarmMethod;
@TableField(exist = false)
private String alarmMethodDescription;
public String getAlarmMethodDescription() {
@@ -268,6 +272,7 @@ public class DeviceAlarm extends ProjectBaseDO {
return result;
}
@TableField(exist = false)
@Schema(description = "报警类型描述")
private String alarmTypeDescription;

View File

@@ -1,5 +1,7 @@
package com.viewsh.module.video.gb28181.bean;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.viewsh.module.video.common.enums.ChannelDataType;
import com.viewsh.module.video.gb28181.utils.MessageElementForCatalog;
import com.viewsh.module.video.gb28181.utils.XmlUtil;
@@ -14,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
@Data
@Slf4j
@TableName("video_device_channel")
@Schema(description = "通道信息")
@EqualsAndHashCode(callSuper = true)
public class DeviceChannel extends CommonGBChannel {
@@ -21,9 +24,11 @@ public class DeviceChannel extends CommonGBChannel {
@Schema(description = "数据库自增ID")
private Long id;
@TableField(exist = false)
@Schema(description = "父设备编码")
private String parentDeviceId;
@TableField(exist = false)
@Schema(description = "父设备名称")
private String parentName;
@@ -172,6 +177,7 @@ public class DeviceChannel extends CommonGBChannel {
@Schema(description = "时域编码能力,取值0-不支持;1-1级增强;2-2级增强;3-3级增强(可选)")
private Integer svcTimeSupportMode;
@TableField(exist = false)
@Schema(description = "云台类型描述字符串")
private String ptzTypeText;

View File

@@ -1,6 +1,7 @@
package com.viewsh.module.video.gb28181.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.viewsh.framework.tenant.core.db.ProjectBaseDO;
@@ -27,13 +28,14 @@ public class MobilePosition extends ProjectBaseDO {
private String deviceId;
/**
* 通道Id
* 通道Id(外键,对应 video_device_channel.id
*/
private Long channelId;
/**
* 通道国标编号
* 通道国标编号JOIN查询填充不落库
*/
@TableField(exist = false)
private String channelDeviceId;
/**

View File

@@ -1,9 +1,11 @@
package com.viewsh.module.video.gb28181.bean;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@TableName("video_platform_channel")
@EqualsAndHashCode(callSuper = true)
@Data
public class PlatformChannel extends CommonGBChannel {

View File

@@ -240,9 +240,9 @@ public class ABLMediaNodeServerService implements IMediaNodeServerService {
streamInfoResult.setFmp4(addr, mediaServer.getMp4Port(), null, mp4File);
}
streamInfoResult.setHls(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam);
streamInfoResult.setTs(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam);
streamInfoResult.setRtc(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam, isPlay);
streamInfoResult.setHls(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam);
streamInfoResult.setTs(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam);
streamInfoResult.setRtc(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam, isPlay);
streamInfoResult.setMediaInfo(mediaInfo);

View File

@@ -35,7 +35,7 @@ public class MediaServer extends BaseDO {
private int httpPort;
@Schema(description = "HTTPS端口")
private int httpSSlPort;
private int httpSslPort;
@Schema(description = "RTMP端口")
private int rtmpPort;
@@ -44,7 +44,7 @@ public class MediaServer extends BaseDO {
private int flvPort;
@Schema(description = "https-flv端口")
private int flvSSLPort;
private int flvSslPort;
@Schema(description = "mp4端口")
private int mp4Port;
@@ -53,7 +53,7 @@ public class MediaServer extends BaseDO {
private int wsFlvPort;
@Schema(description = "wss-flv端口")
private int wsFlvSSLPort;
private int wsFlvSslPort;
@Schema(description = "RTMPS端口")
private int rtmpSSlPort;
@@ -124,7 +124,7 @@ public class MediaServer extends BaseDO {
sdpIp = ObjectUtils.isEmpty(zlmServerConfig.getSdpIp())? zlmServerConfig.getIp(): zlmServerConfig.getSdpIp();
streamIp = ObjectUtils.isEmpty(zlmServerConfig.getStreamIp())? zlmServerConfig.getIp(): zlmServerConfig.getStreamIp();
httpPort = zlmServerConfig.getHttpPort();
httpSSlPort = zlmServerConfig.getHttpSSLport();
httpSslPort = zlmServerConfig.getHttpSSLport();
rtmpPort = zlmServerConfig.getRtmpPort();
rtmpSSlPort = zlmServerConfig.getRtmpSslPort();
rtpProxyPort = zlmServerConfig.getRtpProxyPort();

View File

@@ -121,7 +121,7 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService {
throw new ControllerException(ErrorCode.ERROR100.getCode(), "读取配置失败");
}
mediaServer.setId(zlmServerConfig.getGeneralMediaServerId());
mediaServer.setHttpSSlPort(zlmServerConfig.getHttpSSLport());
mediaServer.setHttpSslPort(zlmServerConfig.getHttpSSLport());
mediaServer.setRtmpPort(zlmServerConfig.getRtmpPort());
mediaServer.setRtmpSSlPort(zlmServerConfig.getRtmpSslPort());
mediaServer.setRtspPort(zlmServerConfig.getRtspPort());
@@ -604,11 +604,11 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService {
recordInfo.getFilePath()));
// 同样作为第4个参数
if (mediaServerItem.getHttpSSlPort() > 0) {
if (mediaServerItem.getHttpSslPort() > 0) {
info.setHttpsPath(String.format(pathTemplate,
"https",
mediaServerItem.getStreamIp(),
mediaServerItem.getHttpSSlPort(),
mediaServerItem.getHttpSslPort(),
recordInfo.getFilePath()));
}
return info;
@@ -662,20 +662,20 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService {
streamInfoResult.setRtsp(addr, mediaServer.getRtspPort(),mediaServer.getRtspSSLPort(), app, stream, callIdParam);
String flvFile = String.format("%s/%s.live.flv%s", app, stream, callIdParam);
streamInfoResult.setFlv(addr, mediaServer.getHttpPort(),mediaServer.getHttpSSlPort(), flvFile);
streamInfoResult.setWsFlv(addr, mediaServer.getHttpPort(),mediaServer.getHttpSSlPort(), flvFile);
streamInfoResult.setFlv(addr, mediaServer.getHttpPort(),mediaServer.getHttpSslPort(), flvFile);
streamInfoResult.setWsFlv(addr, mediaServer.getHttpPort(),mediaServer.getHttpSslPort(), flvFile);
String mp4File = String.format("%s/%s.live.mp4%s", app, stream, callIdParam);
streamInfoResult.setFmp4(addr, mediaServer.getHttpPort(),mediaServer.getHttpSSlPort(), mp4File);
streamInfoResult.setWsMp4(addr, mediaServer.getHttpPort(),mediaServer.getHttpSSlPort(), mp4File);
streamInfoResult.setFmp4(addr, mediaServer.getHttpPort(),mediaServer.getHttpSslPort(), mp4File);
streamInfoResult.setWsMp4(addr, mediaServer.getHttpPort(),mediaServer.getHttpSslPort(), mp4File);
streamInfoResult.setHls(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam);
streamInfoResult.setWsHls(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam);
streamInfoResult.setHls(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam);
streamInfoResult.setWsHls(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam);
streamInfoResult.setTs(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam);
streamInfoResult.setWsTs(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam);
streamInfoResult.setTs(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam);
streamInfoResult.setWsTs(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam);
streamInfoResult.setRtc(addr, mediaServer.getHttpPort(), mediaServer.getHttpSSlPort(), app, stream, callIdParam, isPlay);
streamInfoResult.setRtc(addr, mediaServer.getHttpPort(), mediaServer.getHttpSslPort(), app, stream, callIdParam, isPlay);
streamInfoResult.setMediaInfo(mediaInfo);

View File

@@ -219,14 +219,14 @@ public class ZLMMediaServerStatusManager {
}
private void initPort(MediaServer mediaServerItem, ZLMServerConfig zlmServerConfig) {
// 端口只会从配置中读取一次,一旦自己配置或者读取过了将不在配置
mediaServerItem.setHttpSSlPort(zlmServerConfig.getHttpSSLport());
mediaServerItem.setHttpSslPort(zlmServerConfig.getHttpSSLport());
mediaServerItem.setRtmpPort(zlmServerConfig.getRtmpPort());
mediaServerItem.setRtmpSSlPort(zlmServerConfig.getRtmpSslPort());
mediaServerItem.setRtspPort(zlmServerConfig.getRtspPort());
mediaServerItem.setRtspSSLPort(zlmServerConfig.getRtspSSlport());
mediaServerItem.setRtpProxyPort(zlmServerConfig.getRtpProxyPort());
mediaServerItem.setFlvSSLPort(zlmServerConfig.getHttpSSLport());
mediaServerItem.setWsFlvSSLPort(zlmServerConfig.getHttpSSLport());
mediaServerItem.setFlvSslPort(zlmServerConfig.getHttpSSLport());
mediaServerItem.setWsFlvSslPort(zlmServerConfig.getHttpSSLport());
if (Objects.isNull(zlmServerConfig.getTranscodeSuffix())) {
mediaServerItem.setTranscodeSuffix(null);
}else {

View File

@@ -56,7 +56,7 @@ public interface MediaServerMapper extends BaseMapperX<MediaServer> {
"#{sdpIp}, " +
"#{streamIp}, " +
"#{httpPort}, " +
"#{httpSSlPort}, " +
"#{httpSslPort}, " +
"#{rtmpPort}, " +
"#{rtmpSSlPort}, " +
"#{rtpProxyPort}, " +
@@ -64,9 +64,9 @@ public interface MediaServerMapper extends BaseMapperX<MediaServer> {
"#{rtspPort}, " +
"#{flvPort}, " +
"#{mp4Port}, " +
"#{flvSSLPort}, " +
"#{flvSslPort}, " +
"#{wsFlvPort}, " +
"#{wsFlvSSLPort}, " +
"#{wsFlvSslPort}, " +
"#{rtspSSLPort}, " +
"#{autoConfig}, " +
"#{secret}, " +
@@ -89,10 +89,10 @@ public interface MediaServerMapper extends BaseMapperX<MediaServer> {
"UPDATE video_media_server " +
"SET update_time=#{updateTime}, transcode_suffix=#{transcodeSuffix} " +
", ip=#{ip}, hook_ip=#{hookIp}, sdp_ip=#{sdpIp}, stream_ip=#{streamIp}, http_port=#{httpPort}" +
", http_ssl_port=#{httpSSlPort}, rtmp_port=#{rtmpPort}, rtmp_ssl_port=#{rtmpSSlPort}" +
", http_ssl_port=#{httpSslPort}, rtmp_port=#{rtmpPort}, rtmp_ssl_port=#{rtmpSSlPort}" +
", rtp_proxy_port=#{rtpProxyPort}, jtt_proxy_port=#{jttProxyPort}, rtsp_port=#{rtspPort}" +
", rtsp_ssl_port=#{rtspSSLPort}, flv_port=#{flvPort}, mp4_port=#{mp4Port}" +
", flv_ssl_port=#{flvSSLPort}, ws_flv_port=#{wsFlvPort}, ws_flv_ssl_port=#{wsFlvSSLPort}" +
", flv_ssl_port=#{flvSslPort}, ws_flv_port=#{wsFlvPort}, ws_flv_ssl_port=#{wsFlvSslPort}" +
", auto_config=#{autoConfig}, rtp_enable=#{rtpEnable}, rtp_port_range=#{rtpPortRange}" +
", send_rtp_port_range=#{sendRtpPortRange}, secret=#{secret}, record_assist_port=#{recordAssistPort}" +
", hook_alive_interval=#{hookAliveInterval}, record_day=#{recordDay}, record_path=#{recordPath}" +
@@ -108,7 +108,7 @@ public interface MediaServerMapper extends BaseMapperX<MediaServer> {
"<if test=\"hookIp != null\">, hook_ip=#{hookIp}</if>" +
"<if test=\"sdpIp != null\">, sdp_ip=#{sdpIp}</if>" +
"<if test=\"streamIp != null\">, stream_ip=#{streamIp}</if>" +
"<if test=\"httpSSlPort != null\">, http_ssl_port=#{httpSSlPort}</if>" +
"<if test=\"httpSslPort != null\">, http_ssl_port=#{httpSslPort}</if>" +
"<if test=\"rtmpPort != null\">, rtmp_port=#{rtmpPort}</if>" +
"<if test=\"rtmpSSlPort != null\">, rtmp_ssl_port=#{rtmpSSlPort}</if>" +
"<if test=\"rtpProxyPort != null\">, rtp_proxy_port=#{rtpProxyPort}</if>" +
@@ -117,9 +117,9 @@ public interface MediaServerMapper extends BaseMapperX<MediaServer> {
"<if test=\"rtspSSLPort != null\">, rtsp_ssl_port=#{rtspSSLPort}</if>" +
"<if test=\"flvPort != null\">, flv_port=#{flvPort}</if>" +
"<if test=\"mp4Port != null\">, mp4_port=#{mp4Port}</if>" +
"<if test=\"flvSSLPort != null\">, flv_ssl_port=#{flvSSLPort}</if>" +
"<if test=\"flvSslPort != null\">, flv_ssl_port=#{flvSslPort}</if>" +
"<if test=\"wsFlvPort != null\">, ws_flv_port=#{wsFlvPort}</if>" +
"<if test=\"wsFlvSSLPort != null\">, ws_flv_ssl_port=#{wsFlvSSLPort}</if>" +
"<if test=\"wsFlvSslPort != null\">, ws_flv_ssl_port=#{wsFlvSslPort}</if>" +
"<if test=\"autoConfig != null\">, auto_config=#{autoConfig}</if>" +
"<if test=\"rtpEnable != null\">, rtp_enable=#{rtpEnable}</if>" +
"<if test=\"rtpPortRange != null\">, rtp_port_range=#{rtpPortRange}</if>" +

View File

@@ -1,6 +1,7 @@
package com.viewsh.module.video.streamPush.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.viewsh.module.video.common.StreamInfo;
@@ -95,10 +96,17 @@ public class StreamPush extends CommonGBChannel implements Comparable<StreamPush
@Schema(description = "GPS的更新时间")
private String gpsTime;
@TableField(exist = false)
private String uniqueKey;
private Integer dataType = ChannelDataType.STREAM_PUSH;
/**
* 推流状态0:未推流, 1:推流中)
*/
@Schema(description = "推流状态0:未推流, 1:推流中)")
private Boolean status;
@Override
public int compareTo(@NotNull StreamPush streamPushItem) {

View File

@@ -567,7 +567,7 @@ public class CloudRecordController {
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到流媒体节点");
}
if (remoteHost == null) {
remoteHost = request.getScheme() + "://" + request.getLocalAddr() + ":" + (request.getScheme().equals("https") ? mediaServer.getHttpSSlPort() : mediaServer.getHttpPort());
remoteHost = request.getScheme() + "://" + request.getLocalAddr() + ":" + (request.getScheme().equals("https") ? mediaServer.getHttpSslPort() : mediaServer.getHttpPort());
}
PageResult<CloudRecordItem> cloudRecordItemPageInfo = cloudRecordService.getList(page, count, query, app, stream, startTime, endTime, mediaServers, callId, null);
List<CloudRecordUrl> cloudRecordUrlList = new ArrayList<>();