添加云端录像功能
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.genersoft.iot.vmp.storager.dao;
|
||||
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.RecordInfo;
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.User;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface RecordInfoDao {
|
||||
|
||||
@Insert("INSERT INTO recordInfo (app, stream, mediaServerId, createTime, type, deviceId, channelId, name) VALUES" +
|
||||
"('${app}', '${stream}', '${mediaServerId}', datetime('now','localtime')), '${type}', '${deviceId}', '${channelId}', '${name}'")
|
||||
int add(RecordInfo recordInfo);
|
||||
|
||||
@Delete("DELETE FROM user WHERE createTime < '${beforeTime}'")
|
||||
int deleteBefore(String beforeTime);
|
||||
|
||||
@Select("select * FROM recordInfo")
|
||||
List<RecordInfo> selectAll();
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.genersoft.iot.vmp.storager.dao.dto;
|
||||
|
||||
/**
|
||||
* 录像记录
|
||||
*/
|
||||
public class RecordInfo {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* 应用名
|
||||
*/
|
||||
private String app;
|
||||
|
||||
/**
|
||||
* 流ID
|
||||
*/
|
||||
private String stream;
|
||||
|
||||
/**
|
||||
* 对应的zlm流媒体的ID
|
||||
*/
|
||||
private String mediaServerId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 类型 对应zlm的 originType
|
||||
* unknown = 0,
|
||||
* rtmp_push=1,
|
||||
* rtsp_push=2,
|
||||
* rtp_push=3,
|
||||
* pull=4,
|
||||
* ffmpeg_pull=5,
|
||||
* mp4_vod=6,
|
||||
* device_chn=7,
|
||||
* rtc_push=8
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 国标录像时的设备ID
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 国标录像时的通道ID
|
||||
*/
|
||||
private String channelId;
|
||||
|
||||
/**
|
||||
* 拉流代理录像时的名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getApp() {
|
||||
return app;
|
||||
}
|
||||
|
||||
public void setApp(String app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
public String getStream() {
|
||||
return stream;
|
||||
}
|
||||
|
||||
public void setStream(String stream) {
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
public String getMediaServerId() {
|
||||
return mediaServerId;
|
||||
}
|
||||
|
||||
public void setMediaServerId(String mediaServerId) {
|
||||
this.mediaServerId = mediaServerId;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getChannelId() {
|
||||
return channelId;
|
||||
}
|
||||
|
||||
public void setChannelId(String channelId) {
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user