增加脚本:Bootstrap.Client工程增加测试菜单脚本

This commit is contained in:
Argo-MacBookPro 2018-10-25 09:59:56 +08:00
parent 6623255a71
commit 4002527c2a
3 changed files with 49 additions and 1 deletions

View File

@ -16,7 +16,7 @@
"sql": "Data Source=.;Initial Catalog=BootstrapAdmin;User ID=sa;Password=sa",
"ba": "Data Source=.;Initial Catalog=BootstrapAdmin;User ID=sa;Password=sa"
},
"AppId": 4,
"AppId": 2,
"AuthHost": "http://localhost:50852",
"AllowOrigins": "http://localhost,http://10.15.63.218",
"KeyPath": "D:\\App\\Web-App\\keys",

View File

@ -83,3 +83,31 @@ INSERT [dbo].[NavigationRole] ([NavigationID], [RoleID]) VALUES (16, 2)
INSERT [dbo].[NavigationRole] ([NavigationID], [RoleID]) VALUES (17, 2)
INSERT [dbo].[NavigationRole] ([NavigationID], [RoleID]) VALUES (18, 2)
INSERT [dbo].[NavigationRole] ([NavigationID], [RoleID]) VALUES (19, 2)
-- Client Data
Declare @AppId nvarchar(1)
set @AppId = N'2'
declare @AppName nvarchar(8)
set @AppName = N'测试平台'
Delete From [dbo].[Dicts] Where Category = N'应用程序' and Code = @AppId
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用程序', @AppName, @AppId, 0)
Delete From [dbo].[Dicts] Where Category = @AppName
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站标题', N'托盘组垛程序', 1);
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站页脚', N'通用后台管理测试平台', 1);
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'http://localhost:50852/Admin/Profiles', 1);
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'http://localhost:50852/Admin/Settings', 1);
-- 菜单
DELETE FROM Navigations Where [Application] = @AppId
SET IDENTITY_INSERT [dbo].[Navigations] ON
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (210, 0, N'首页', 10, N'fa fa-fa', N'~/Home/Index', N'1', @AppId)
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (220, 0, N'测试页面', 10, N'fa fa-fa', N'~/Home/Index', N'1', @AppId)
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (230, 220, N'关于', 10, N'fa fa-fa', N'~/Home/Index', N'1', @AppId)
SET IDENTITY_INSERT [dbo].[Navigations] OFF
-- 菜单授权
DELETE FROM NavigationRole Where NavigationID in (Select ID From Navigations Where [Application] = @AppId)
INSERT INTO NavigationRole SELECT ID, 2 FROM Navigations Where [Application] = @AppId

View File

@ -72,3 +72,23 @@ INSERT INTO [NavigationRole] ([NavigationID], [RoleID]) VALUES (16, 2);
INSERT INTO [NavigationRole] ([NavigationID], [RoleID]) VALUES (17, 2);
INSERT INTO [NavigationRole] ([NavigationID], [RoleID]) VALUES (18, 2);
INSERT INTO [NavigationRole] ([NavigationID], [RoleID]) VALUES (19, 2);
-- Client Data
Delete From [Dicts] Where Category = '应用程序' and Code = 2;
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用程序', '测试平台', 2, 0);
Delete From [Dicts] Where Category = '测试平台';
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站标题', 'BA Client', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站页脚', '通用后台管理测试平台', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Settings', 1);
Delete from [Navigations] where Application = 2;
INSERT into [Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (NULL, 0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);
INSERT into [Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (NULL, 0, '测试页面', 20, 'fa fa-fa', '#', '1', 2);
INSERT into [Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (NULL, last_insert_rowid(), '关于', 10, 'fa fa-fa', '~/Home/About', '1', 2);
-- 菜单授权
DELETE FROM NavigationRole Where NavigationID in (Select ID From Navigations Where [Application] = 2);
INSERT INTO NavigationRole SELECT NULL, ID, 2 FROM Navigations Where [Application] = 2;