|
@@ -0,0 +1,322 @@
|
|
|
|
|
+-- 在本地 ZQ 创建“车辆学院”预览网站。
|
|
|
|
|
+-- 使用 ffkjvehicle1 模板栏目骨架,并从现有车辆与自动化学院站点复制已发布文章。
|
|
|
|
|
+-- 不修改来源站点,不操作 hxcs 或生产环境。
|
|
|
|
|
+
|
|
|
|
|
+SET NAMES utf8mb4;
|
|
|
|
|
+USE spaceappsv1;
|
|
|
|
|
+
|
|
|
|
|
+DROP PROCEDURE IF EXISTS sp_local_create_vehicle_college_preview_site;
|
|
|
|
|
+DELIMITER //
|
|
|
|
|
+CREATE PROCEDURE sp_local_create_vehicle_college_preview_site()
|
|
|
|
|
+BEGIN
|
|
|
|
|
+ DECLARE v_count INT DEFAULT 0;
|
|
|
|
|
+ DECLARE v_source_article_count INT DEFAULT 0;
|
|
|
|
|
+
|
|
|
|
|
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
|
|
|
|
+ BEGIN
|
|
|
|
|
+ ROLLBACK;
|
|
|
|
|
+ RESIGNAL;
|
|
|
|
|
+ END;
|
|
|
|
|
+
|
|
|
|
|
+ START TRANSACTION;
|
|
|
|
|
+
|
|
|
|
|
+ SET @vc_template_code := 'ffkjvehicle1';
|
|
|
|
|
+ SET @vc_site_id_code := 'local_ffkjvehicle1_preview_site';
|
|
|
|
|
+ SET @vc_domain_host := 'ffkj-vehicle-college.localhost';
|
|
|
|
|
+ SET @vc_domain := 'ffkj-vehicle-college.localhost;';
|
|
|
|
|
+ SET @vc_unit_id := 10000;
|
|
|
|
|
+ SET @vc_operator_pid := 10000;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT wtid INTO @vc_template_id
|
|
|
|
|
+ FROM spaceappsv1.website_template
|
|
|
|
|
+ WHERE config = @vc_template_code AND dcode = 61
|
|
|
|
|
+ ORDER BY wtid LIMIT 1;
|
|
|
|
|
+ IF @vc_template_id IS NULL THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '车辆学院模板未登记,停止建站';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT websiteid INTO @vc_parent_site_id
|
|
|
|
|
+ FROM spaceappsv1.website
|
|
|
|
|
+ WHERE id_code = 'local_ffkj_school_site' AND dcode = 61
|
|
|
|
|
+ ORDER BY websiteid LIMIT 1;
|
|
|
|
|
+ IF @vc_parent_site_id IS NULL THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '本地学校主站不存在,停止建站';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT websiteid INTO @vc_source_site_id
|
|
|
|
|
+ FROM spaceappsv1.website
|
|
|
|
|
+ WHERE id_code = 'local_ffkj_vehicle_college_site' AND dcode = 61
|
|
|
|
|
+ ORDER BY websiteid LIMIT 1;
|
|
|
|
|
+ IF @vc_source_site_id IS NULL THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '车辆学院内容来源站不存在,停止建站';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT COUNT(*) INTO v_count
|
|
|
|
|
+ FROM spaceappsv1.website
|
|
|
|
|
+ WHERE id_code <> @vc_site_id_code
|
|
|
|
|
+ AND dcode <> 72
|
|
|
|
|
+ AND FIND_IN_SET(@vc_domain_host, REPLACE(TRIM(BOTH ';' FROM IFNULL(domains, '')), ';', ',')) > 0;
|
|
|
|
|
+ IF v_count <> 0 THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '车辆学院预览域名已被其他网站占用,停止建站';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT websiteid INTO @vc_site_id
|
|
|
|
|
+ FROM spaceappsv1.website
|
|
|
|
|
+ WHERE id_code = @vc_site_id_code
|
|
|
|
|
+ ORDER BY websiteid LIMIT 1;
|
|
|
|
|
+
|
|
|
|
|
+ IF @vc_site_id IS NULL THEN
|
|
|
|
|
+ INSERT INTO spaceappsv1.website
|
|
|
|
|
+ (dcode, unitid, wtcode, wtid, parent_wid, name, `desc`, protocol, port, domains,
|
|
|
|
|
+ catalog_uri, logo, white_logo_file, seo_icon, seo_title, seo_keywords, seo_description,
|
|
|
|
|
+ create_time, create_pid, id_code, sort_number)
|
|
|
|
|
+ VALUES
|
|
|
|
|
+ (61, @vc_unit_id, 10010, @vc_template_id, @vc_parent_site_id, '车辆学院',
|
|
|
|
|
+ '车辆学院网站模板本地预览站。', 'http', 4188, @vc_domain,
|
|
|
|
|
+ '/', '/main/ffkj-portal/vehicle/vehicle-mark.svg', '#0A568B',
|
|
|
|
|
+ '/main/ffkj-portal/vehicle/vehicle-mark.svg', '车辆学院',
|
|
|
|
|
+ '车辆学院,车辆与自动化学院,广州华夏职业学院',
|
|
|
|
|
+ '广州华夏职业学院车辆学院网站模板本地预览站。',
|
|
|
|
|
+ NOW(), @vc_operator_pid, @vc_site_id_code, 9994);
|
|
|
|
|
+ SET @vc_site_id := LAST_INSERT_ID();
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ UPDATE spaceappsv1.website
|
|
|
|
|
+ SET dcode = 61,
|
|
|
|
|
+ unitid = @vc_unit_id,
|
|
|
|
|
+ wtcode = 10010,
|
|
|
|
|
+ wtid = @vc_template_id,
|
|
|
|
|
+ parent_wid = @vc_parent_site_id,
|
|
|
|
|
+ name = '车辆学院',
|
|
|
|
|
+ `desc` = '车辆学院网站模板本地预览站。',
|
|
|
|
|
+ protocol = 'http',
|
|
|
|
|
+ port = 4188,
|
|
|
|
|
+ domains = @vc_domain,
|
|
|
|
|
+ catalog_uri = '/',
|
|
|
|
|
+ logo = '/main/ffkj-portal/vehicle/vehicle-mark.svg',
|
|
|
|
|
+ white_logo_file = '#0A568B',
|
|
|
|
|
+ seo_icon = '/main/ffkj-portal/vehicle/vehicle-mark.svg',
|
|
|
|
|
+ seo_title = '车辆学院',
|
|
|
|
|
+ seo_keywords = '车辆学院,车辆与自动化学院,广州华夏职业学院',
|
|
|
|
|
+ seo_description = '广州华夏职业学院车辆学院网站模板本地预览站。',
|
|
|
|
|
+ id_code = @vc_site_id_code,
|
|
|
|
|
+ sort_number = 9994
|
|
|
|
|
+ WHERE websiteid = @vc_site_id;
|
|
|
|
|
+
|
|
|
|
|
+ -- 从模板生成站点栏目。
|
|
|
|
|
+ INSERT INTO spaceappsv1.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, @vc_unit_id, t.wnccode, @vc_site_id, NULL, t.idcard, t.name, t.name_assistant,
|
|
|
|
|
+ t.title, t.`desc`, t.wntcode, t.wnscode, t.wnjtcode, t.wnlscode, t.uri, t.url,
|
|
|
|
|
+ t.jump_url, NULL, NULL, t.photo_size_width, t.photo_size_height, t.background_image,
|
|
|
|
|
+ t.sort_number, NOW(), @vc_operator_pid, NULL, t.guest_access_flag
|
|
|
|
|
+ FROM spaceappsv1.website_navigation t
|
|
|
|
|
+ WHERE t.wtid = @vc_template_id AND t.dcode = 61
|
|
|
|
|
+ AND NOT EXISTS (
|
|
|
|
|
+ SELECT 1 FROM spaceappsv1.website_navigation n
|
|
|
|
|
+ WHERE n.websiteid = @vc_site_id AND n.idcard = t.idcard
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ UPDATE spaceappsv1.website_navigation n
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation t
|
|
|
|
|
+ ON t.wtid = @vc_template_id AND t.dcode = 61 AND t.idcard = n.idcard
|
|
|
|
|
+ SET n.dcode = 61,
|
|
|
|
|
+ n.unitid = @vc_unit_id,
|
|
|
|
|
+ n.wnccode = t.wnccode,
|
|
|
|
|
+ n.wtid = NULL,
|
|
|
|
|
+ n.name = t.name,
|
|
|
|
|
+ n.name_assistant = t.name_assistant,
|
|
|
|
|
+ n.title = t.title,
|
|
|
|
|
+ n.`desc` = t.`desc`,
|
|
|
|
|
+ n.wntcode = t.wntcode,
|
|
|
|
|
+ n.wnscode = t.wnscode,
|
|
|
|
|
+ n.wnjtcode = t.wnjtcode,
|
|
|
|
|
+ n.wnlscode = t.wnlscode,
|
|
|
|
|
+ n.uri = t.uri,
|
|
|
|
|
+ n.url = t.url,
|
|
|
|
|
+ n.jump_url = t.jump_url,
|
|
|
|
|
+ n.jump_websiteid = t.jump_websiteid,
|
|
|
|
|
+ n.photo_size_width = t.photo_size_width,
|
|
|
|
|
+ n.photo_size_height = t.photo_size_height,
|
|
|
|
|
+ n.background_image = t.background_image,
|
|
|
|
|
+ n.sort_number = t.sort_number,
|
|
|
|
|
+ n.guest_access_flag = t.guest_access_flag
|
|
|
|
|
+ WHERE n.websiteid = @vc_site_id;
|
|
|
|
|
+
|
|
|
|
|
+ UPDATE spaceappsv1.website_navigation child
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation template_child
|
|
|
|
|
+ ON template_child.wtid = @vc_template_id AND template_child.dcode = 61
|
|
|
|
|
+ AND template_child.idcard = child.idcard
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation template_parent
|
|
|
|
|
+ ON template_parent.navigationid = template_child.parent_nid
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation parent
|
|
|
|
|
+ ON parent.websiteid = @vc_site_id AND parent.dcode = 61
|
|
|
|
|
+ AND parent.idcard = template_parent.idcard
|
|
|
|
|
+ SET child.parent_nid = parent.navigationid
|
|
|
|
|
+ WHERE child.websiteid = @vc_site_id AND child.dcode = 61;
|
|
|
|
|
+
|
|
|
|
|
+ -- 复制站点管理权限与栏目权限。
|
|
|
|
|
+ INSERT INTO spaceappsv1.website_manage
|
|
|
|
|
+ (unitid, websiteid, mtcode, objectid, create_time, create_pid)
|
|
|
|
|
+ SELECT @vc_unit_id, @vc_site_id, source_manage.mtcode, source_manage.objectid,
|
|
|
|
|
+ NOW(), @vc_operator_pid
|
|
|
|
|
+ FROM spaceappsv1.website_manage source_manage
|
|
|
|
|
+ WHERE source_manage.websiteid = @vc_source_site_id
|
|
|
|
|
+ AND NOT EXISTS (
|
|
|
|
|
+ SELECT 1 FROM spaceappsv1.website_manage target_manage
|
|
|
|
|
+ WHERE target_manage.websiteid = @vc_site_id
|
|
|
|
|
+ AND target_manage.mtcode = source_manage.mtcode
|
|
|
|
|
+ AND target_manage.objectid = source_manage.objectid
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ INSERT INTO spaceappsv1.website_navigation_manage
|
|
|
|
|
+ (unitid, navigationid, wnmcode, mtcode, objectid, create_time, create_pid)
|
|
|
|
|
+ SELECT @vc_unit_id, target_nav.navigationid, source_manage.wnmcode,
|
|
|
|
|
+ source_manage.mtcode, source_manage.objectid, NOW(), @vc_operator_pid
|
|
|
|
|
+ FROM spaceappsv1.website_navigation target_nav
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation source_nav
|
|
|
|
|
+ ON source_nav.websiteid = @vc_source_site_id AND source_nav.dcode = 61
|
|
|
|
|
+ AND source_nav.idcard = target_nav.idcard
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation_manage source_manage
|
|
|
|
|
+ ON source_manage.navigationid = source_nav.navigationid
|
|
|
|
|
+ WHERE target_nav.websiteid = @vc_site_id AND target_nav.dcode = 61
|
|
|
|
|
+ AND NOT EXISTS (
|
|
|
|
|
+ SELECT 1 FROM spaceappsv1.website_navigation_manage target_manage
|
|
|
|
|
+ WHERE target_manage.navigationid = target_nav.navigationid
|
|
|
|
|
+ AND target_manage.wnmcode = source_manage.wnmcode
|
|
|
|
|
+ AND target_manage.mtcode = source_manage.mtcode
|
|
|
|
|
+ AND target_manage.objectid = source_manage.objectid
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ -- 复制来源站已发布文章,正文与图片文件共用现有本地资源。
|
|
|
|
|
+ INSERT INTO spaceappsv1.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, @vc_site_id, source_article.unitid, source_article.ascode,
|
|
|
|
|
+ target_nav.navigationid, source_article.title, source_article.ajtcode,
|
|
|
|
|
+ source_article.`desc`, source_article.source, source_article.thumbnail,
|
|
|
|
|
+ source_article.sticktop, source_article.sticktop_end_time,
|
|
|
|
|
+ source_article.sticktop_schedulesid, source_article.`release`,
|
|
|
|
|
+ source_article.release_time, source_article.release_task_schedulesid,
|
|
|
|
|
+ source_article.content, source_article.edit_content, source_article.url,
|
|
|
|
|
+ source_article.read_count, source_article.create_time, source_article.last_change_time,
|
|
|
|
|
+ source_article.create_pid, source_article.last_change_pid,
|
|
|
|
|
+ source_article.guest_access_flag, source_article.sort_number
|
|
|
|
|
+ FROM spaceappsv1.article source_article
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation source_nav
|
|
|
|
|
+ ON source_nav.navigationid = source_article.navigationid
|
|
|
|
|
+ AND source_nav.websiteid = @vc_source_site_id AND source_nav.dcode = 61
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation target_nav
|
|
|
|
|
+ ON target_nav.websiteid = @vc_site_id AND target_nav.dcode = 61
|
|
|
|
|
+ AND target_nav.idcard = source_nav.idcard
|
|
|
|
|
+ WHERE source_article.websiteid = @vc_source_site_id
|
|
|
|
|
+ AND source_article.dcode = 61
|
|
|
|
|
+ AND NOT EXISTS (
|
|
|
|
|
+ SELECT 1 FROM spaceappsv1.article target_article
|
|
|
|
|
+ WHERE target_article.websiteid = @vc_site_id
|
|
|
|
|
+ AND target_article.navigationid = target_nav.navigationid
|
|
|
|
|
+ AND target_article.title = source_article.title
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ -- 顶部/底部自定义栏目是链接文章,保留来源站原始 URL,不参与正文编码。
|
|
|
|
|
+ UPDATE spaceappsv1.article target_article
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation target_nav
|
|
|
|
|
+ ON target_nav.navigationid = target_article.navigationid
|
|
|
|
|
+ AND target_nav.websiteid = @vc_site_id AND target_nav.dcode = 61
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation source_nav
|
|
|
|
|
+ ON source_nav.websiteid = @vc_source_site_id AND source_nav.dcode = 61
|
|
|
|
|
+ AND source_nav.idcard = target_nav.idcard
|
|
|
|
|
+ JOIN spaceappsv1.article source_article
|
|
|
|
|
+ ON source_article.navigationid = source_nav.navigationid
|
|
|
|
|
+ AND source_article.websiteid = @vc_source_site_id AND source_article.dcode = 61
|
|
|
|
|
+ AND source_article.title = target_article.title
|
|
|
|
|
+ SET target_article.url = source_article.url
|
|
|
|
|
+ WHERE target_article.websiteid = @vc_site_id
|
|
|
|
|
+ AND target_article.dcode = 61
|
|
|
|
|
+ AND target_nav.idcard IN ('FFKJ_COLLEGE_SCHOOL_HOME', 'FFKJ_COLLEGE_FOOTER_LINKS');
|
|
|
|
|
+
|
|
|
|
|
+ -- 来源站的示例文章文件名长度不符合正文路由规则,内容文章改用稳定的 12 位文章码。
|
|
|
|
|
+ UPDATE spaceappsv1.article target_article
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation target_nav
|
|
|
|
|
+ ON target_nav.navigationid = target_article.navigationid
|
|
|
|
|
+ AND target_nav.websiteid = @vc_site_id AND target_nav.dcode = 61
|
|
|
|
|
+ SET target_article.url = CONCAT(
|
|
|
|
|
+ LEFT(target_article.url, CHAR_LENGTH(target_article.url) - CHAR_LENGTH(SUBSTRING_INDEX(target_article.url, '/', -1))),
|
|
|
|
|
+ 'VC', LPAD(target_article.articleid, 10, '0'), '.htm'
|
|
|
|
|
+ )
|
|
|
|
|
+ WHERE target_article.websiteid = @vc_site_id
|
|
|
|
|
+ AND target_article.dcode = 61
|
|
|
|
|
+ AND target_nav.idcard NOT IN ('FFKJ_COLLEGE_SCHOOL_HOME', 'FFKJ_COLLEGE_FOOTER_LINKS');
|
|
|
|
|
+
|
|
|
|
|
+ -- 预览站仅使用车辆、实训、竞赛与学生活动图片,避免沿用来源站的幼教示例缩略图。
|
|
|
|
|
+ UPDATE spaceappsv1.article target_article
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation target_nav
|
|
|
|
|
+ ON target_nav.navigationid = target_article.navigationid
|
|
|
|
|
+ AND target_nav.websiteid = @vc_site_id AND target_nav.dcode = 61
|
|
|
|
|
+ SET target_article.thumbnail = CASE MOD(target_article.articleid, 10)
|
|
|
|
|
+ WHEN 0 THEN '/main/ffkj-portal/vehicle/hero-campus.jpg'
|
|
|
|
|
+ WHEN 1 THEN '/main/ffkj-portal/vehicle/building.jpg'
|
|
|
|
|
+ WHEN 2 THEN '/main/ffkj-portal/vehicle/awards.jpg'
|
|
|
|
|
+ WHEN 3 THEN '/main/ffkj-portal/vehicle/craftsman.jpg'
|
|
|
|
|
+ WHEN 4 THEN '/main/ffkj-portal/vehicle/training-ev.jpg'
|
|
|
|
|
+ WHEN 5 THEN '/main/ffkj-portal/vehicle/training-mechatronics.jpg'
|
|
|
|
|
+ WHEN 6 THEN '/main/ffkj-portal/vehicle/training-rail.jpg'
|
|
|
|
|
+ WHEN 7 THEN '/main/ffkj-portal/vehicle/student-1.jpg'
|
|
|
|
|
+ WHEN 8 THEN '/main/ffkj-portal/vehicle/student-2.jpg'
|
|
|
|
|
+ ELSE '/main/ffkj-portal/vehicle/student-3.jpg'
|
|
|
|
|
+ END
|
|
|
|
|
+ WHERE target_article.websiteid = @vc_site_id
|
|
|
|
|
+ AND target_article.dcode = 61
|
|
|
|
|
+ AND target_nav.idcard NOT IN ('FFKJ_COLLEGE_SCHOOL_HOME', 'FFKJ_COLLEGE_FOOTER_LINKS');
|
|
|
|
|
+
|
|
|
|
|
+ UPDATE spaceappsv1.website_template
|
|
|
|
|
+ SET preview_url = 'http://ffkj-vehicle-college.localhost:4188/'
|
|
|
|
|
+ WHERE wtid = @vc_template_id;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT COUNT(*) INTO v_count
|
|
|
|
|
+ FROM spaceappsv1.website_navigation
|
|
|
|
|
+ WHERE websiteid = @vc_site_id AND dcode = 61;
|
|
|
|
|
+ IF v_count <> 24 THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '车辆学院预览站栏目数量不完整';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT COUNT(*) INTO v_count
|
|
|
|
|
+ FROM spaceappsv1.website_navigation child
|
|
|
|
|
+ JOIN spaceappsv1.website_navigation template_child
|
|
|
|
|
+ ON template_child.wtid = @vc_template_id AND template_child.dcode = 61
|
|
|
|
|
+ AND template_child.idcard = child.idcard
|
|
|
|
|
+ WHERE child.websiteid = @vc_site_id AND child.dcode = 61
|
|
|
|
|
+ AND template_child.parent_nid IS NOT NULL AND child.parent_nid IS NULL;
|
|
|
|
|
+ IF v_count <> 0 THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '车辆学院预览站栏目父子关系不完整';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT COUNT(*) INTO v_source_article_count
|
|
|
|
|
+ FROM spaceappsv1.article
|
|
|
|
|
+ WHERE websiteid = @vc_source_site_id AND dcode = 61;
|
|
|
|
|
+
|
|
|
|
|
+ SELECT COUNT(*) INTO v_count
|
|
|
|
|
+ FROM spaceappsv1.article
|
|
|
|
|
+ WHERE websiteid = @vc_site_id AND dcode = 61;
|
|
|
|
|
+ IF v_count <> v_source_article_count THEN
|
|
|
|
|
+ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '车辆学院预览站文章复制不完整';
|
|
|
|
|
+ END IF;
|
|
|
|
|
+
|
|
|
|
|
+ COMMIT;
|
|
|
|
|
+END//
|
|
|
|
|
+DELIMITER ;
|
|
|
|
|
+
|
|
|
|
|
+CALL sp_local_create_vehicle_college_preview_site();
|
|
|
|
|
+DROP PROCEDURE IF EXISTS sp_local_create_vehicle_college_preview_site;
|
|
|
|
|
+
|
|
|
|
|
+SELECT @vc_site_id AS website_id,
|
|
|
|
|
+ @vc_template_id AS template_id,
|
|
|
|
|
+ (SELECT COUNT(*) FROM spaceappsv1.website_navigation WHERE websiteid = @vc_site_id AND dcode = 61) AS navigation_count,
|
|
|
|
|
+ (SELECT COUNT(*) FROM spaceappsv1.article WHERE websiteid = @vc_site_id AND dcode = 61) AS article_count,
|
|
|
|
|
+ (SELECT COUNT(*) FROM spaceappsv1.website_manage WHERE websiteid = @vc_site_id) AS manager_count,
|
|
|
|
|
+ (SELECT COUNT(*) FROM spaceappsv1.website_navigation_manage wnm JOIN spaceappsv1.website_navigation n ON n.navigationid = wnm.navigationid WHERE n.websiteid = @vc_site_id) AS navigation_permission_count;
|