|
|
@@ -4,16 +4,21 @@
|
|
|
<mapper namespace="cn.reghao.dfs.store.db.mapper.VideoUrlMapper">
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into video_url
|
|
|
- (`video_file_id`,`object_id`,`video_codec`,`audio_codec`,`url_type`,`url`,`bit_rate`,`quality`,`width`,`height`,`order`)
|
|
|
+ (`video_file_id`,`object_id`,`video_codec`,`audio_codec`,`url_type`,`url`,`bit_rate`,`quality`,`quality_str`,`width`,`height`)
|
|
|
values
|
|
|
- (#{videoFileId},#{objectId},#{videoCodec},#{audioCodec},#{urlType},#{url},#{bitRate},#{quality},#{width},#{height},#{order})
|
|
|
+ (#{videoFileId},#{objectId},#{videoCodec},#{audioCodec},#{urlType},#{url},#{bitRate},#{quality},#{qualityStr},#{width},#{height})
|
|
|
</insert>
|
|
|
|
|
|
+ <delete id="deleteByVideoFileId">
|
|
|
+ delete from video_url
|
|
|
+ where video_file_id=#{videoFileId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
<select id="findAll" resultType="cn.reghao.dfs.store.model.po.VideoUrl">
|
|
|
select * from video_url
|
|
|
</select>
|
|
|
<select id="findVideoUrls" resultType="cn.reghao.oss.api.dto.media.VideoUrlDto">
|
|
|
- select url_type as type,url,width,height,quality
|
|
|
+ select url_type as type,url,width,height,quality_str as quality
|
|
|
from video_url
|
|
|
where video_file_id=#{videoFileId}
|
|
|
</select>
|
|
|
@@ -22,13 +27,10 @@
|
|
|
from video_url
|
|
|
where video_file_id=#{videoFileId}
|
|
|
</select>
|
|
|
- <select id="findVideoUrlByPage" resultType="cn.reghao.dfs.store.model.po.VideoUrl">
|
|
|
- select *
|
|
|
- from video_url
|
|
|
- </select>
|
|
|
<select id="findHighestQuality" resultType="cn.reghao.dfs.store.model.po.VideoUrl">
|
|
|
select *
|
|
|
from video_url
|
|
|
+ order by quality desc
|
|
|
limit 1
|
|
|
</select>
|
|
|
</mapper>
|