Преглед на файлове

修复信工学院首页通知公告链接并补齐主题标签

将首页学院新闻区块左侧“通知公告”链接从旧路径 /xinwengonggao/tongzhi/ 修正为新站 /xgtzgg/,解决首页点击 404。
新增迁移,从 2026 年学院新闻中按主题补充校企合作、共同体动态、竞赛获奖、招生信息和就业服务栏目,并清理旧文章手工排序号,确保首页标签和更多页面优先显示 2026 内容。

Validation:
- 首页通知公告链接已指向 /xgtzgg/
- /xgtzgg/ 返回 HTTP 200
- 首页五个主题标签首条均为 2026 年内容
- 校企合作、共同体动态、竞赛获奖、招生信息、就业服务的最新日期分别为 2026-11-06、2026-11-06、2026-11-05、2026-10-26、2026-11-05
非繁 преди 2 седмици
родител
ревизия
fd5697527b

+ 1 - 1
WebRoot/web/upload/ffkj-template/xingong-index.jsp

@@ -20,7 +20,7 @@
       <div class="wrap">
         <div class="sec-title">
           <div class="l"><div class="ic"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="#0048AE" stroke-width="2"><path d="M4 5h11v14H4z"/><path d="M15 9h5v10h-5"/><path d="M7 9h5M7 12h5M7 15h3"/></svg></div><h2>${empty homeNewsNmv.navigationMap.name ? '学院新闻' : homeNewsNmv.navigationMap.name}</h2></div>
-          <div class="r"><a class="lnk" href="/xinwengonggao/tongzhi/"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke-width="2"><path d="M4 5h16v14H4z"/><path d="M8 9h8M8 13h6"/></svg>通知公告 »</a><a class="more" href="${empty homeNewsNmv.navigationMap.href ? '/xgnews/' : homeNewsNmv.navigationMap.href}">更多 »</a></div>
+          <div class="r"><a class="lnk" href="/xgtzgg/"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke-width="2"><path d="M4 5h16v14H4z"/><path d="M8 9h8M8 13h6"/></svg>通知公告 »</a><a class="more" href="${empty homeNewsNmv.navigationMap.href ? '/xgnews/' : homeNewsNmv.navigationMap.href}">更多 »</a></div>
         </div>
         <div class="newsrow">
           <c:choose>

+ 103 - 0
local-run/migrations/hxcs-mig-next/2026-11-10-005-fill-xingong-home-topic-tabs.sql

@@ -0,0 +1,103 @@
+-- 将 2026 年新闻按主题补充到首页“产教融合共同体”和“招生就业”标签及对应更多页面。
+-- 来源为已迁移到首页新闻栏目 4307 的 2026 年在用文章。
+
+SET NAMES utf8mb4;
+USE sp_gzhx_apps_mig_next;
+START TRANSACTION;
+
+DROP TEMPORARY TABLE IF EXISTS tmp_xg_topic_map;
+CREATE TEMPORARY TABLE tmp_xg_topic_map (
+  source_articleid INT NOT NULL,
+  target_navigationid INT NOT NULL,
+  PRIMARY KEY (source_articleid, target_navigationid)
+);
+INSERT INTO tmp_xg_topic_map (source_articleid, target_navigationid)
+SELECT a.articleid AS source_articleid, 4304 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e6a0a1e4bc81'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4baa7e69599e89e8de59088'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8aebfe4bc81'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bc81e4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e59088e4bd9c'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88194e9809a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e7bd91e69893'),'%') OR a.title LIKE CONCAT('%',UNHEX('e58d8ee4b8ba'),'%') OR a.title LIKE CONCAT('%',UNHEX('e7a791e68a80'),'%') OR a.title LIKE CONCAT('%',UNHEX('e585ace58fb8'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5ae9ee8aead'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5ae9ee4b9a0'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5b0b1e4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e68b9be88198'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5b297e4bd8d'),'%') OR a.title LIKE CONCAT('%',UNHEX('e6a8aae59091'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4282 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e585b1e5908ce4bd93'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4baa7e69599e89e8de59088'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8a18ce4b89ae4baa7e69599'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88194e59088e4bd93'),'%') OR a.title LIKE CONCAT('%',UNHEX('e58d8fe5908ce882b2e4baba'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4306 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e585b1e5908ce4bd93'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4baa7e69599e89e8de59088'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8a18ce4b89ae4baa7e69599'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88194e59088e4bd93'),'%') OR a.title LIKE CONCAT('%',UNHEX('e58d8fe5908ce882b2e4baba'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4280 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e5969ce68aa5'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88eb7e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5a4a7e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e6af94e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e696a9e88eb7'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bdb3e7bba9'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b880e7ad89e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4ba8ce7ad89e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b889e7ad89e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e9939ce5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e98791e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e586a0e5869b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bc98e7a780e6a188e4be8b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88da3e8aa89'),'%') OR a.title LIKE CONCAT('%',UNHEX('e68a80e883bde5a4a7e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e79c81e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e59bbde8b59b'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4303 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e5969ce68aa5'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88eb7e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5a4a7e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e6af94e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e696a9e88eb7'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bdb3e7bba9'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b880e7ad89e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4ba8ce7ad89e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b889e7ad89e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e9939ce5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e98791e5a596'),'%') OR a.title LIKE CONCAT('%',UNHEX('e586a0e5869b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bc98e7a780e6a188e4be8b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e88da3e8aa89'),'%') OR a.title LIKE CONCAT('%',UNHEX('e68a80e883bde5a4a7e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e79c81e8b59b'),'%') OR a.title LIKE CONCAT('%',UNHEX('e59bbde8b59b'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4277 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e68b9be7949f'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b893e4b89ae69599e882b2'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b893e4b89ae5aea3e8aeb2'),'%') OR a.title LIKE CONCAT('%',UNHEX('e696b0e7949f'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5bd95e58f96'),'%') OR a.title LIKE CONCAT('%',UNHEX('e698a5e5ada3e9ab98e88083'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5beaee4b893e4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b893e4b89ae4bb8be7bb8d'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4302 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e68b9be7949f'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b893e4b89ae69599e882b2'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b893e4b89ae5aea3e8aeb2'),'%') OR a.title LIKE CONCAT('%',UNHEX('e696b0e7949f'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5bd95e58f96'),'%') OR a.title LIKE CONCAT('%',UNHEX('e698a5e5ada3e9ab98e88083'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5beaee4b893e4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4b893e4b89ae4bb8be7bb8d'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4276 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e5b0b1e4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e68b9be88198'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8aebfe4bc81e68b93e5b297'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5ae9ee4b9a0'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5b297e4bd8d'),'%') OR a.title LIKE CONCAT('%',UNHEX('e6af95e4b89ae7949f'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8818ce4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bc81e4b89ae5aea3e8aeb2'),'%'))
+UNION
+SELECT a.articleid AS source_articleid, 4301 AS target_navigationid FROM sp_gzhx_apps_mig_next.article a WHERE a.websiteid=10078 AND a.navigationid=4307 AND a.dcode=61 AND a.ascode=10010 AND YEAR(COALESCE(a.release_time,a.create_time))=2026 AND (a.title LIKE CONCAT('%',UNHEX('e5b0b1e4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e68b9be88198'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8aebfe4bc81e68b93e5b297'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5ae9ee4b9a0'),'%') OR a.title LIKE CONCAT('%',UNHEX('e5b297e4bd8d'),'%') OR a.title LIKE CONCAT('%',UNHEX('e6af95e4b89ae7949f'),'%') OR a.title LIKE CONCAT('%',UNHEX('e8818ce4b89a'),'%') OR a.title LIKE CONCAT('%',UNHEX('e4bc81e4b89ae5aea3e8aeb2'),'%'));
+
+DROP TEMPORARY TABLE IF EXISTS tmp_xg_topic_candidates;
+CREATE TEMPORARY TABLE tmp_xg_topic_candidates AS
+SELECT
+  a.articleid AS source_articleid,
+  m.target_navigationid,
+  CONCAT(
+    TRIM(TRAILING '/' FROM n.url), '/',
+    DATE_FORMAT(COALESCE(a.release_time,a.create_time), '%y%m%d'),
+    '/CPY', LPAD(a.articleid,9,'0'), '.htm'
+  ) AS new_url,
+  a.unitid, a.title, a.ajtcode, a.`desc`, a.source, a.thumbnail,
+  a.sticktop, a.sticktop_end_time, a.sticktop_schedulesid,
+  a.`release`, a.release_time, a.release_task_schedulesid,
+  a.content, a.edit_content, a.read_count, a.create_time,
+  a.create_pid, a.last_change_pid, a.guest_access_flag
+FROM tmp_xg_topic_map m
+JOIN sp_gzhx_apps_mig_next.article a ON a.articleid=m.source_articleid
+JOIN sp_gzhx_apps_mig_next.website_navigation n
+  ON n.navigationid=m.target_navigationid AND n.websiteid=10078 AND n.dcode=61
+WHERE NOT EXISTS (
+  SELECT 1 FROM sp_gzhx_apps_mig_next.article existing
+  WHERE existing.websiteid=10078
+    AND existing.navigationid=m.target_navigationid
+    AND (
+      existing.url=CONCAT(
+        TRIM(TRAILING '/' FROM n.url), '/',
+        DATE_FORMAT(COALESCE(a.release_time,a.create_time), '%y%m%d'),
+        '/CPY', LPAD(a.articleid,9,'0'), '.htm'
+      )
+      OR (
+        existing.url NOT LIKE '%/CPY%'
+        AND existing.title=a.title
+        AND COALESCE(existing.release_time,existing.create_time)=COALESCE(a.release_time,a.create_time)
+      )
+    )
+);
+
+SELECT target_navigationid,COUNT(*) AS expected_copy_count
+FROM tmp_xg_topic_candidates GROUP BY target_navigationid ORDER BY target_navigationid;
+
+INSERT INTO sp_gzhx_apps_mig_next.article (
+  dcode,unitid,websiteid,ascode,navigationid,title,ajtcode,`desc`,source,
+  thumbnail,sticktop,sticktop_end_time,sticktop_schedulesid,`release`,release_time,
+  release_task_schedulesid,content,edit_content,url,read_count,create_time,
+  last_change_time,create_pid,last_change_pid,guest_access_flag,sort_number
+)
+SELECT
+  61,c.unitid,10078,10010,c.target_navigationid,c.title,c.ajtcode,c.`desc`,c.source,
+  c.thumbnail,c.sticktop,c.sticktop_end_time,c.sticktop_schedulesid,c.`release`,c.release_time,
+  c.release_task_schedulesid,c.content,c.edit_content,c.new_url,c.read_count,c.create_time,
+  NOW(),c.create_pid,c.last_change_pid,c.guest_access_flag,NULL
+FROM tmp_xg_topic_candidates c;
+
+SET @actual_copy_count=ROW_COUNT();
+SELECT @actual_copy_count AS actual_copy_count;
+
+-- 清除主题栏目旧文章的手工排序号,让 2026 年内容按发布时间优先展示。
+UPDATE sp_gzhx_apps_mig_next.article
+SET sort_number=NULL
+WHERE websiteid=10078
+  AND dcode=61
+  AND ascode=10010
+  AND navigationid IN (4276,4277,4280,4282,4301,4302,4303,4304,4306);
+
+COMMIT;
+
+SELECT a.navigationid,COUNT(*) article_count,DATE_FORMAT(MAX(COALESCE(a.release_time,a.create_time)),'%Y-%m-%d') latest
+FROM sp_gzhx_apps_mig_next.article a
+WHERE a.websiteid=10078 AND a.dcode=61 AND a.ascode=10010
+  AND a.navigationid IN (4276,4277,4280,4282,4301,4302,4303,4304,4306)
+GROUP BY a.navigationid ORDER BY a.navigationid;