mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-11-12 05:50:41 +00:00
feat: 完善短剧创作、技能目录与媒体任务恢复
保存原始创作输入,整合剧本打磨、分场规划与流式进度,接入审美及导演技能、角色声音和音乐;保持已批准媒体并完善请求去重与恢复。 统一增量 SQL 目录,补齐新安装字段并修正示例插入列,更新迁移说明;修复测试夹具与当前审阅、重启恢复行为的断言。验证:相关模块编译通过,短剧及 Atlas 回归 337 项、SSE 回归 3 项均通过。
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
-- Run after the base ruoyi-ai.sql. Preserves existing scripts and provider keys.
|
||||
DROP PROCEDURE IF EXISTS migrate_drama_preparation;
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE migrate_drama_preparation()
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema=DATABASE() AND table_name='short_drama_script' AND column_name='creation_mode') THEN
|
||||
ALTER TABLE short_drama_script ADD creation_mode varchar(32) DEFAULT 'standard', ADD source_materials longtext, ADD worldbuilding longtext, ADD revision_notes longtext;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
CALL migrate_drama_preparation();
|
||||
DROP PROCEDURE migrate_drama_preparation;
|
||||
|
||||
INSERT INTO chat_model (id,category,model_name,provider_code,model_describe,model_show,api_host,api_key,create_dept,create_by,create_time,update_by,update_time,remark,tenant_id)
|
||||
SELECT 2106002500000000001,'video','bytedance/seedance-2.5/reference-to-video','atlas','Seedance 2.5 多模态参考生视频(字节跳动)','Y',
|
||||
COALESCE((SELECT api_host FROM (SELECT api_host FROM chat_model WHERE provider_code='atlas' AND category='video' AND tenant_id=0 ORDER BY id DESC LIMIT 1) h),'https://api.atlascloud.ai/api/v1'),
|
||||
COALESCE((SELECT api_key FROM (SELECT api_key FROM chat_model WHERE provider_code='atlas' AND category='video' AND tenant_id=0 ORDER BY id DESC LIMIT 1) k),''),
|
||||
103,1,NOW(),1,NOW(),'Atlas Seedance 2.5 reference-to-video; 4-30s, up to 30 images and 10 audio references',0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM chat_model WHERE model_name='bytedance/seedance-2.5/reference-to-video' AND tenant_id=0);
|
||||
@@ -0,0 +1,13 @@
|
||||
-- MySQL idempotent migration; run in the configured application database.
|
||||
SET @skill_aesthetic_sql = (SELECT IF(COUNT(*) = 0,
|
||||
'ALTER TABLE short_drama_project ADD COLUMN aesthetic_skill_name VARCHAR(64) NULL COMMENT ''Selected aesthetic skill catalog name''',
|
||||
'SELECT 1') FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'short_drama_project' AND column_name = 'aesthetic_skill_name');
|
||||
PREPARE skill_aesthetic_stmt FROM @skill_aesthetic_sql;
|
||||
EXECUTE skill_aesthetic_stmt;
|
||||
DEALLOCATE PREPARE skill_aesthetic_stmt;
|
||||
SET @skill_director_sql = (SELECT IF(COUNT(*) = 0,
|
||||
'ALTER TABLE short_drama_project ADD COLUMN director_skill_name VARCHAR(64) NULL COMMENT ''Selected director skill catalog name''',
|
||||
'SELECT 1') FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'short_drama_project' AND column_name = 'director_skill_name');
|
||||
PREPARE skill_director_stmt FROM @skill_director_sql;
|
||||
EXECUTE skill_director_stmt;
|
||||
DEALLOCATE PREPARE skill_director_stmt;
|
||||
@@ -0,0 +1,8 @@
|
||||
-- Idempotent schema upgrade; preserve credentials and explicitly customized priorities.
|
||||
SET @sort_order_sql = (SELECT IF(COUNT(*) = 0,
|
||||
'ALTER TABLE chat_model ADD COLUMN sort_order INT NOT NULL DEFAULT 100 COMMENT ''默认模型优先级,升序'' AFTER category',
|
||||
'SELECT 1') FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'chat_model' AND column_name = 'sort_order');
|
||||
PREPARE sort_order_stmt FROM @sort_order_sql;
|
||||
EXECUTE sort_order_stmt;
|
||||
DEALLOCATE PREPARE sort_order_stmt;
|
||||
UPDATE chat_model SET sort_order = 0 WHERE provider_code = 'atlas' AND sort_order = 100 AND model_name IN ('bytedance/doubao-seed-2.1-pro-260628', 'openai/gpt-image-2.5-flare/text-to-image', 'bytedance/seedance-2.0-mini/reference-to-video');
|
||||
@@ -0,0 +1,7 @@
|
||||
-- PC 管理后台和短剧工作台:无操作 12 小时后登录失效(单位:秒)。
|
||||
-- 仅迁移原 30 分钟策略,保留已自定义的客户端设置。
|
||||
UPDATE sys_client
|
||||
SET active_timeout = 43200
|
||||
WHERE device_type = 'pc' AND active_timeout = 1800;
|
||||
-- 已部署环境通过 /system/client 更新相同字段以同步清理客户端缓存。
|
||||
-- 已签发的令牌需重新登录后使用新策略。
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Existing Atlas keys/hosts remain intact. Default priority is maintained through model management.
|
||||
-- Apply after 2026-10-02-chat-model-sort-order.sql.
|
||||
UPDATE chat_model SET sort_order = 10
|
||||
WHERE provider_code = 'atlas' AND category = 'chat' AND model_name = 'bytedance/doubao-seed-2.1-pro-260628' AND sort_order = 0;
|
||||
UPDATE chat_model SET sort_order = 0
|
||||
WHERE provider_code = 'atlas' AND category = 'chat' AND model_name = 'deepseek-ai/deepseek-v4.1-flash';
|
||||
@@ -0,0 +1,8 @@
|
||||
-- Store the exact creation input separately from generated project descriptions.
|
||||
-- Existing rows stay NULL unless their original request can be recovered.
|
||||
SET @original_idea_sql = (SELECT IF(COUNT(*) = 0,
|
||||
'ALTER TABLE short_drama_project ADD COLUMN original_idea LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT ''Original story creation input'' AFTER description',
|
||||
'SELECT 1') FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'short_drama_project' AND column_name = 'original_idea');
|
||||
PREPARE original_idea_stmt FROM @original_idea_sql;
|
||||
EXECUTE original_idea_stmt;
|
||||
DEALLOCATE PREPARE original_idea_stmt;
|
||||
Reference in New Issue
Block a user