标签:新闻 思想 首页 mep delete 友情 机构 活动 detail
USE [AYZY] GO /****** Object: StoredProcedure [dbo].[SP_InitWebSite] Script Date: 08/22/2018 13:07:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[SP_InitWebSite] @SiteId INT --站点ID AS BEGIN DECLARE @SiteType INT; DECLARE @NewColumnId INT; DECLARE @NewModelId INT; --获取站点类型 SELECT @SiteType=[SiteType] FROM [WebSites] WHERE [Id]=@SiteId; IF(@SiteType=1) -- 初始化院系类网站栏目及首页模块 BEGIN INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学院首页‘, NULL, 10, 1, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘首页Banner轮播图‘, @NewColumnId, 11, 0, @SiteId, 0, 5, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘首页Banner轮播图‘, 1, 5, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘横幅宣传图片‘, @NewColumnId, 12, 0, @SiteId, 0, 5, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘横幅宣传图片‘, 12, 5, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘友情链接‘, @NewColumnId, 13, 0, @SiteId, 0, 5, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘友情链接‘, 3, 5, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学院概况‘, NULL, 20, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学院简介‘, @NewColumnId, 21, 0, @SiteId, 0, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学院管理‘, @NewColumnId, 22, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学院风采‘, @NewColumnId, 23, 0, @SiteId, 2, 2, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘学院风采‘, 11, 2, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘新闻中心‘, NULL, 30, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘新闻资讯‘, @NewColumnId, 31, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘新闻资讯‘, 5, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘最新公告‘, @NewColumnId, 32, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘最新公告‘, 2, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘校务公开‘, @NewColumnId, 33, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘校务公开‘, 6, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘教学管理‘, NULL, 40, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘教师团队‘, @NewColumnId, 41, 0, @SiteId, 5, 4, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘教师团队‘, 10, 4, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘教学科研‘, @NewColumnId, 42, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘教学科研‘, 7, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘实验实训‘, @NewColumnId, 43, 0, @SiteId, 2, 2, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘专业介绍‘, NULL, 50, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学生工作‘, NULL, 60, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学生会‘, @NewColumnId, 61, 0, @SiteId, 5, 4, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘团委‘, @NewColumnId, 62, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘校园活动‘, @NewColumnId, 63, 0, @SiteId, 2, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘图片新闻‘, 4, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘招生就业‘, NULL, 70, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘招生资讯‘, @NewColumnId, 71, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘招生资讯‘, 8, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘就业指导‘, @NewColumnId, 72, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘就业指导‘, 9, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘电子资源‘, NULL, 80, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘精品课程‘, @NewColumnId, 81, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘视频中心‘, @NewColumnId, 82, 0, @SiteId, 4, 3, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘资源下载‘, @NewColumnId, 83, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘学术交流‘, NULL, 90, 0, @SiteId, 2, 2, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘联系我们‘, NULL, 100, 0, @SiteId, 0, 1, 0, GETDATE()); END ELSE IF(@SiteType=2) -- 初始化部门类网站栏目及首页模块 BEGIN INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘首页‘, NULL, 10, 1, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘首页Banner轮播图‘, @NewColumnId, 11, 0, @SiteId, 0, 5, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘首页Banner轮播图‘, 1, 5, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘横幅宣传图片 ‘, @NewColumnId, 12, 0, @SiteId, 0, 5, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘横幅宣传图片‘, 10, 5, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘友情链接‘, @NewColumnId, 13, 0, @SiteId, 0, 5, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘友情链接‘, 3, 5, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘部门概况‘, NULL, 20, 0, @SiteId, 0, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘机构设置‘, NULL, 30, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘新闻动态‘, NULL, 40, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘部门新闻‘, @NewColumnId, 41, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘新闻动态‘, 5, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘最新资讯‘, @NewColumnId, 42, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘部门公告‘, 2, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘通知公告‘, 8, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘通知公告‘, NULL, 50, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘日常管理‘, NULL, 60, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘管理制度‘, @NewColumnId, 61, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘管理制度‘, 6, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘上级文件‘, @NewColumnId, 62, 0, @SiteId, -1, -1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘工作流程‘, @NewColumnId, 63, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘评优评先‘, @NewColumnId, 64, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘思想教育‘, NULL, 70, 0, @SiteId, 1, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘思想教育‘, 7, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘队伍建设‘, NULL, 80, 0, @SiteId, -1, -1, 0, GETDATE()); SET @NewColumnId = @@IDENTITY; INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘教师风采‘, @NewColumnId, 81, 0, @SiteId, 5, 4, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘教师风采‘, 9, 4, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘培训培养‘, @NewColumnId, 82, 0, @SiteId, 2, 1, 0, GETDATE()); SET @NewModelId = @@IDENTITY; INSERT [HomePageModules] ([ModuleName], [OrderIndex], [DetailType], [ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N‘图片新闻‘, 4, 1, @NewModelId, @SiteId, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘管理考核‘, @NewColumnId, 83, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘下载中心‘, NULL, 90, 0, @SiteId, 1, 1, 0, GETDATE()); INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N‘联系我们‘, NULL, 100, 0, @SiteId, 0, 1, 0, GETDATE()); END END GO
标签:新闻 思想 首页 mep delete 友情 机构 活动 detail
原文地址:https://www.cnblogs.com/songStar/p/9516987.html