feat: 支持视频及缩略图元数据存储
All checks were successful
test/timeline-server/pipeline/head This commit looks good
All checks were successful
test/timeline-server/pipeline/head This commit looks good
在文件服务和故事服务中增加了对视频、持续时间及缩略图相关字段的支持。 - 在 `ImageInfo` 和 `StoryItem` 实体类中添加 `duration`、`thumbnailInstanceId` 等字段 - 更新 MyBatis 映射文件以支持新字段的持久化 - 在 `FileService` 中新增 `generateVideoUrl` 接口用于获取视频预签名地址 - 调整 `saveFileMetadata` 接口返回生成的 `instanceId` - 优化了部分代码的格式和缩进
This commit is contained in:
@@ -14,6 +14,9 @@ public class StoryItem {
|
||||
private String description;
|
||||
private String location;
|
||||
private LocalDateTime storyItemTime;
|
||||
private String videoUrl;
|
||||
private Long duration;
|
||||
private String thumbnailUrl;
|
||||
private String createId;
|
||||
private String updateId;
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<mapper namespace="com.timeline.story.dao.StoryItemMapper">
|
||||
|
||||
<insert id="insert">
|
||||
INSERT INTO story_item (instance_id, master_item_id, description, location, title, create_id, story_instance_id, is_delete, story_item_time, update_id)
|
||||
VALUES (#{instanceId}, #{masterItemId}, #{description}, #{location}, #{title},#{createId}, #{storyInstanceId}, #{isDelete}, #{storyItemTime}, #{updateId})
|
||||
INSERT INTO story_item (instance_id, master_item_id, description, location, title, create_id, story_instance_id, is_delete, story_item_time, update_id, video_url, duration, thumbnail_url)
|
||||
VALUES (#{instanceId}, #{masterItemId}, #{description}, #{location}, #{title},#{createId}, #{storyInstanceId}, #{isDelete}, #{storyItemTime}, #{updateId}, #{videoUrl}, #{duration}, #{thumbnailUrl})
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
@@ -16,7 +16,10 @@
|
||||
title = #{title},
|
||||
create_id = #{createId},
|
||||
update_time = NOW(),
|
||||
update_id = #{updateId}
|
||||
update_id = #{updateId},
|
||||
video_url = #{videoUrl},
|
||||
duration = #{duration},
|
||||
thumbnail_url = #{thumbnailUrl}
|
||||
WHERE instance_id = #{instanceId}
|
||||
</update>
|
||||
|
||||
@@ -48,6 +51,9 @@
|
||||
si.master_item_id,
|
||||
si.is_delete,
|
||||
si.story_item_time as story_item_time,
|
||||
si.video_url,
|
||||
si.duration,
|
||||
si.thumbnail_url,
|
||||
si.create_id AS create_id,
|
||||
si.create_time AS create_time,
|
||||
u1.username AS create_name,
|
||||
|
||||
Reference in New Issue
Block a user