|
|
@@ -0,0 +1,249 @@
|
|
|
+SET NAMES utf8mb4;
|
|
|
+USE sp_gzhx_apps;
|
|
|
+
|
|
|
+START TRANSACTION;
|
|
|
+
|
|
|
+SET @faq_content_path := '/web/upload/ffkj-template/content/huaxia-geo-faq.html';
|
|
|
+SET @faq_title := '广州华夏职业学院 2026 招生常见问题';
|
|
|
+SET @faq_desc := '广州华夏职业学院(报考代码14268)2026招生常见问题:多少分能上、学费、宿舍、专升本、就业率、地址交通等。';
|
|
|
+SET @faq_url := '/zhaoshengzixun/zhaoshengwenda/HXCSFAQ2026A.htm';
|
|
|
+
|
|
|
+SET @screen_website_id := (
|
|
|
+ SELECT w.websiteid
|
|
|
+ FROM website w
|
|
|
+ JOIN website_template wt ON wt.wtid = w.wtid
|
|
|
+ WHERE w.dcode = 61
|
|
|
+ AND wt.config = 'ffkjscreen02'
|
|
|
+ AND (
|
|
|
+ w.name = '广州华夏职业学院'
|
|
|
+ OR FIND_IN_SET('hxcs.feifan.net', REPLACE(TRIM(BOTH ';' FROM IFNULL(w.domains, '')), ';', ',')) > 0
|
|
|
+ OR w.domains LIKE '%ffkj-screen-red.localhost%'
|
|
|
+ )
|
|
|
+ ORDER BY
|
|
|
+ (w.name = '广州华夏职业学院') DESC,
|
|
|
+ FIND_IN_SET('hxcs.feifan.net', REPLACE(TRIM(BOTH ';' FROM IFNULL(w.domains, '')), ';', ',')) DESC,
|
|
|
+ w.websiteid DESC
|
|
|
+ LIMIT 1
|
|
|
+);
|
|
|
+
|
|
|
+SET @screen_unit_id := (
|
|
|
+ SELECT unitid
|
|
|
+ FROM website
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ LIMIT 1
|
|
|
+);
|
|
|
+
|
|
|
+SET @study_parent_id := (
|
|
|
+ SELECT navigationid
|
|
|
+ FROM website_navigation
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ AND wnccode = 10000
|
|
|
+ AND dcode = 61
|
|
|
+ AND idcard = 'FFKJ_SCHOOL_STUDY'
|
|
|
+ ORDER BY navigationid
|
|
|
+ LIMIT 1
|
|
|
+);
|
|
|
+
|
|
|
+SET @study_parent_id := COALESCE(
|
|
|
+ @study_parent_id,
|
|
|
+ (
|
|
|
+ SELECT navigationid
|
|
|
+ FROM website_navigation
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ AND wnccode = 10000
|
|
|
+ AND dcode = 61
|
|
|
+ AND idcard = 'FFKJ_SCHOOL_ADMISSION_NAV'
|
|
|
+ ORDER BY navigationid
|
|
|
+ LIMIT 1
|
|
|
+ )
|
|
|
+);
|
|
|
+
|
|
|
+CREATE TEMPORARY TABLE zq_geo_faq_assert (
|
|
|
+ object_id BIGINT NOT NULL
|
|
|
+) ENGINE=MEMORY;
|
|
|
+
|
|
|
+INSERT INTO zq_geo_faq_assert (object_id)
|
|
|
+VALUES (@screen_website_id), (@screen_unit_id), (@study_parent_id);
|
|
|
+
|
|
|
+DROP TEMPORARY TABLE zq_geo_faq_assert;
|
|
|
+
|
|
|
+SET @faq_navigation_id := (
|
|
|
+ SELECT navigationid
|
|
|
+ FROM website_navigation
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ AND wnccode = 10000
|
|
|
+ AND dcode = 61
|
|
|
+ AND (
|
|
|
+ idcard = 'FFKJ_SCHOOL_STUDY_SELF'
|
|
|
+ OR url = '/zhaoshengzixun/zhaoshengwenda/'
|
|
|
+ )
|
|
|
+ ORDER BY (idcard = 'FFKJ_SCHOOL_STUDY_SELF') DESC, navigationid
|
|
|
+ LIMIT 1
|
|
|
+);
|
|
|
+
|
|
|
+INSERT INTO website_navigation (
|
|
|
+ dcode, unitid, wnccode, websiteid, wtid, idcard, name, name_assistant,
|
|
|
+ title, `desc`, wntcode, wnscode, wnjtcode, wnlscode, uri, url,
|
|
|
+ jump_url, jump_websiteid, parent_nid, photo_size_width, photo_size_height,
|
|
|
+ background_image, sort_number, create_time, create_pid, id_code,
|
|
|
+ guest_access_flag
|
|
|
+)
|
|
|
+SELECT
|
|
|
+ 61, @screen_unit_id, 10000, @screen_website_id, NULL,
|
|
|
+ 'FFKJ_SCHOOL_STUDY_SELF', '招生问答1', 'ADMISSIONS FAQ', '招生问答1',
|
|
|
+ '发布招生政策、报考流程和常见问题。', 10010, 10000, 10010, 10000,
|
|
|
+ 'zhaoshengzixun/zhaoshengwenda', '/zhaoshengzixun/zhaoshengwenda/',
|
|
|
+ NULL, NULL, @study_parent_id, NULL, NULL, NULL, 10, NOW(), 10000,
|
|
|
+ NULL, 0
|
|
|
+FROM DUAL
|
|
|
+WHERE @faq_navigation_id IS NULL;
|
|
|
+
|
|
|
+SET @faq_navigation_id := COALESCE(
|
|
|
+ @faq_navigation_id,
|
|
|
+ (
|
|
|
+ SELECT navigationid
|
|
|
+ FROM website_navigation
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ AND wnccode = 10000
|
|
|
+ AND dcode = 61
|
|
|
+ AND idcard = 'FFKJ_SCHOOL_STUDY_SELF'
|
|
|
+ ORDER BY navigationid DESC
|
|
|
+ LIMIT 1
|
|
|
+ )
|
|
|
+);
|
|
|
+
|
|
|
+UPDATE website_navigation
|
|
|
+SET dcode = 61,
|
|
|
+ unitid = @screen_unit_id,
|
|
|
+ wtid = NULL,
|
|
|
+ idcard = 'FFKJ_SCHOOL_STUDY_SELF',
|
|
|
+ name = '招生问答1',
|
|
|
+ name_assistant = 'ADMISSIONS FAQ',
|
|
|
+ title = '招生问答1',
|
|
|
+ `desc` = '发布招生政策、报考流程和常见问题。',
|
|
|
+ wntcode = 10010,
|
|
|
+ wnscode = 10000,
|
|
|
+ wnjtcode = 10010,
|
|
|
+ wnlscode = 10000,
|
|
|
+ uri = 'zhaoshengzixun/zhaoshengwenda',
|
|
|
+ url = '/zhaoshengzixun/zhaoshengwenda/',
|
|
|
+ jump_url = NULL,
|
|
|
+ jump_websiteid = NULL,
|
|
|
+ parent_nid = @study_parent_id,
|
|
|
+ photo_size_width = NULL,
|
|
|
+ photo_size_height = NULL,
|
|
|
+ background_image = NULL,
|
|
|
+ sort_number = 10,
|
|
|
+ guest_access_flag = 0
|
|
|
+WHERE navigationid = @faq_navigation_id;
|
|
|
+
|
|
|
+INSERT INTO website_navigation_manage (
|
|
|
+ unitid, navigationid, wnmcode, mtcode, objectid, create_time, create_pid
|
|
|
+)
|
|
|
+SELECT
|
|
|
+ parent_manage.unitid,
|
|
|
+ @faq_navigation_id,
|
|
|
+ parent_manage.wnmcode,
|
|
|
+ parent_manage.mtcode,
|
|
|
+ parent_manage.objectid,
|
|
|
+ NOW(),
|
|
|
+ 10000
|
|
|
+FROM website_navigation_manage parent_manage
|
|
|
+WHERE parent_manage.navigationid = @study_parent_id
|
|
|
+ AND NOT EXISTS (
|
|
|
+ SELECT 1
|
|
|
+ FROM website_navigation_manage existing_manage
|
|
|
+ WHERE existing_manage.navigationid = @faq_navigation_id
|
|
|
+ AND existing_manage.wnmcode = parent_manage.wnmcode
|
|
|
+ AND existing_manage.mtcode = parent_manage.mtcode
|
|
|
+ AND existing_manage.objectid = parent_manage.objectid
|
|
|
+ );
|
|
|
+
|
|
|
+SET @faq_article_id := (
|
|
|
+ SELECT articleid
|
|
|
+ FROM article
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ AND navigationid = @faq_navigation_id
|
|
|
+ AND (
|
|
|
+ title = @faq_title
|
|
|
+ OR content = @faq_content_path
|
|
|
+ OR url = @faq_url
|
|
|
+ )
|
|
|
+ ORDER BY articleid DESC
|
|
|
+ LIMIT 1
|
|
|
+);
|
|
|
+
|
|
|
+INSERT INTO article (
|
|
|
+ dcode, websiteid, unitid, 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, @screen_website_id, @screen_unit_id, 10010, @faq_navigation_id,
|
|
|
+ @faq_title, 10000, @faq_desc, '广州华夏职业学院',
|
|
|
+ '/main/ffkj-portal/assets/official/logo-color.png', 1, NULL, NULL,
|
|
|
+ 1, NOW(), NULL, @faq_content_path, @faq_content_path, @faq_url,
|
|
|
+ 1, NOW(), NOW(), 10000, 10000, 0, 1
|
|
|
+FROM DUAL
|
|
|
+WHERE @faq_article_id IS NULL;
|
|
|
+
|
|
|
+SET @faq_article_id := COALESCE(
|
|
|
+ @faq_article_id,
|
|
|
+ (
|
|
|
+ SELECT articleid
|
|
|
+ FROM article
|
|
|
+ WHERE websiteid = @screen_website_id
|
|
|
+ AND navigationid = @faq_navigation_id
|
|
|
+ AND (
|
|
|
+ title = @faq_title
|
|
|
+ OR content = @faq_content_path
|
|
|
+ OR url = @faq_url
|
|
|
+ )
|
|
|
+ ORDER BY articleid DESC
|
|
|
+ LIMIT 1
|
|
|
+ )
|
|
|
+);
|
|
|
+
|
|
|
+UPDATE article
|
|
|
+SET dcode = 61,
|
|
|
+ websiteid = @screen_website_id,
|
|
|
+ unitid = @screen_unit_id,
|
|
|
+ ascode = 10010,
|
|
|
+ navigationid = @faq_navigation_id,
|
|
|
+ title = @faq_title,
|
|
|
+ ajtcode = 10000,
|
|
|
+ `desc` = @faq_desc,
|
|
|
+ source = '广州华夏职业学院',
|
|
|
+ thumbnail = '/main/ffkj-portal/assets/official/logo-color.png',
|
|
|
+ sticktop = 1,
|
|
|
+ sticktop_end_time = NULL,
|
|
|
+ sticktop_schedulesid = NULL,
|
|
|
+ `release` = 1,
|
|
|
+ release_time = COALESCE(release_time, NOW()),
|
|
|
+ release_task_schedulesid = NULL,
|
|
|
+ content = @faq_content_path,
|
|
|
+ edit_content = @faq_content_path,
|
|
|
+ url = @faq_url,
|
|
|
+ last_change_time = NOW(),
|
|
|
+ last_change_pid = 10000,
|
|
|
+ guest_access_flag = 0,
|
|
|
+ sort_number = 1
|
|
|
+WHERE articleid = @faq_article_id;
|
|
|
+
|
|
|
+COMMIT;
|
|
|
+
|
|
|
+SELECT
|
|
|
+ n.navigationid,
|
|
|
+ n.name,
|
|
|
+ n.wntcode,
|
|
|
+ n.url,
|
|
|
+ a.articleid,
|
|
|
+ a.title,
|
|
|
+ a.ascode,
|
|
|
+ a.content,
|
|
|
+ a.sort_number
|
|
|
+FROM website_navigation n
|
|
|
+JOIN article a ON a.articleid = @faq_article_id
|
|
|
+WHERE n.navigationid = @faq_navigation_id;
|