|
|
@@ -0,0 +1,80 @@
|
|
|
+SET NAMES utf8mb4;
|
|
|
+
|
|
|
+-- 车辆与自动化学院:恢复系统标准栏目结构。
|
|
|
+-- “学院介绍”是列表栏目,由子栏目“学院简介/学院领导”承载内容;
|
|
|
+-- 不再把“学院简介”文章直接挂到“学院介绍”上形成单页模式。
|
|
|
+-- 同时修正 ffkjvehicle1 模板,避免后续按模板建站再次出现同类配置。
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS sp_gzhx_apps_mig_next.hotfix_20261119_vehicle_about_nav_standard_backup (
|
|
|
+ object_type VARCHAR(32) NOT NULL,
|
|
|
+ object_id BIGINT NOT NULL,
|
|
|
+ websiteid BIGINT NULL,
|
|
|
+ wtid BIGINT NULL,
|
|
|
+ navigationid BIGINT NULL,
|
|
|
+ articleid BIGINT NULL,
|
|
|
+ wntcode BIGINT NULL,
|
|
|
+ dcode BIGINT NULL,
|
|
|
+ backup_time DATETIME NOT NULL,
|
|
|
+ PRIMARY KEY (object_type, object_id)
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
+
|
|
|
+INSERT INTO sp_gzhx_apps_mig_next.hotfix_20261119_vehicle_about_nav_standard_backup
|
|
|
+ (object_type, object_id, websiteid, wtid, navigationid, articleid, wntcode, dcode, backup_time)
|
|
|
+SELECT 'site_navigation', navigationid, websiteid, wtid, navigationid, NULL, wntcode, dcode, NOW()
|
|
|
+FROM sp_gzhx_apps_mig_next.website_navigation
|
|
|
+WHERE websiteid = 10080
|
|
|
+ AND navigationid = 4406
|
|
|
+ AND idcard = 'FFKJ_COLLEGE_ABOUT'
|
|
|
+ON DUPLICATE KEY UPDATE object_id = VALUES(object_id);
|
|
|
+
|
|
|
+INSERT INTO sp_gzhx_apps_mig_next.hotfix_20261119_vehicle_about_nav_standard_backup
|
|
|
+ (object_type, object_id, websiteid, wtid, navigationid, articleid, wntcode, dcode, backup_time)
|
|
|
+SELECT 'template_navigation', navigationid, websiteid, wtid, navigationid, NULL, wntcode, dcode, NOW()
|
|
|
+FROM sp_gzhx_apps_mig_next.website_navigation
|
|
|
+WHERE wtid = 69
|
|
|
+ AND websiteid IS NULL
|
|
|
+ AND navigationid = 4375
|
|
|
+ AND idcard = 'FFKJ_COLLEGE_ABOUT'
|
|
|
+ON DUPLICATE KEY UPDATE object_id = VALUES(object_id);
|
|
|
+
|
|
|
+INSERT INTO sp_gzhx_apps_mig_next.hotfix_20261119_vehicle_about_nav_standard_backup
|
|
|
+ (object_type, object_id, websiteid, wtid, navigationid, articleid, wntcode, dcode, backup_time)
|
|
|
+SELECT 'article_copy', article_copyid, NULL, NULL, navigationid, articleid, NULL, dcode, NOW()
|
|
|
+FROM sp_gzhx_apps_mig_next.article_copy
|
|
|
+WHERE articleid = 68253
|
|
|
+ AND navigationid = 4406
|
|
|
+ AND dcode = 61
|
|
|
+ON DUPLICATE KEY UPDATE object_id = VALUES(object_id);
|
|
|
+
|
|
|
+START TRANSACTION;
|
|
|
+
|
|
|
+UPDATE sp_gzhx_apps_mig_next.website_navigation
|
|
|
+SET wntcode = 10010
|
|
|
+WHERE websiteid = 10080
|
|
|
+ AND navigationid = 4406
|
|
|
+ AND idcard = 'FFKJ_COLLEGE_ABOUT'
|
|
|
+ AND wntcode = 10060
|
|
|
+ AND dcode = 61;
|
|
|
+
|
|
|
+UPDATE sp_gzhx_apps_mig_next.website_navigation
|
|
|
+SET wntcode = 10010
|
|
|
+WHERE wtid = 69
|
|
|
+ AND websiteid IS NULL
|
|
|
+ AND navigationid = 4375
|
|
|
+ AND idcard = 'FFKJ_COLLEGE_ABOUT'
|
|
|
+ AND wntcode = 10060
|
|
|
+ AND dcode = 61;
|
|
|
+
|
|
|
+UPDATE sp_gzhx_apps_mig_next.article_copy
|
|
|
+SET dcode = 71
|
|
|
+WHERE articleid = 68253
|
|
|
+ AND navigationid = 4406
|
|
|
+ AND dcode = 61;
|
|
|
+
|
|
|
+COMMIT;
|
|
|
+
|
|
|
+SELECT
|
|
|
+ (SELECT wntcode FROM sp_gzhx_apps_mig_next.website_navigation WHERE websiteid = 10080 AND navigationid = 4406) AS site_about_wntcode,
|
|
|
+ (SELECT wntcode FROM sp_gzhx_apps_mig_next.website_navigation WHERE wtid = 69 AND websiteid IS NULL AND navigationid = 4375) AS template_about_wntcode,
|
|
|
+ (SELECT COUNT(*) FROM sp_gzhx_apps_mig_next.article_copy WHERE articleid = 68253 AND navigationid = 4406 AND dcode = 61) AS active_about_copy_count,
|
|
|
+ (SELECT COUNT(*) FROM sp_gzhx_apps_mig_next.hotfix_20261119_vehicle_about_nav_standard_backup) AS backup_rows;
|