From b54a1fcc82a64d77a75c69165a3bf284a4f5b4a3 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 1 Jul 2019 19:04:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8DbHelper=E7=B1=BB?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.DataAccess/Helper/DictHelper.cs | 3 ++- Bootstrap.DataAccess/Helper/GroupHelper.cs | 5 +++-- Bootstrap.DataAccess/Helper/MenuHelper.cs | 4 +--- Bootstrap.DataAccess/Helper/UserHelper.cs | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Bootstrap.DataAccess/Helper/DictHelper.cs b/Bootstrap.DataAccess/Helper/DictHelper.cs index 04e34354..e78f48ef 100644 --- a/Bootstrap.DataAccess/Helper/DictHelper.cs +++ b/Bootstrap.DataAccess/Helper/DictHelper.cs @@ -1,4 +1,5 @@ using Bootstrap.Security; +using Bootstrap.Security.DataAccess; using Longbow.Cache; using Longbow.Data; using Longbow.Web; @@ -19,7 +20,7 @@ namespace Bootstrap.DataAccess /// /// 缓存索引,BootstrapAdmin后台清理缓存时使用 /// - public const string RetrieveDictsDataKey = "BootstrapDict-RetrieveDicts"; + public const string RetrieveDictsDataKey = DbHelper.RetrieveDictsDataKey; /// /// diff --git a/Bootstrap.DataAccess/Helper/GroupHelper.cs b/Bootstrap.DataAccess/Helper/GroupHelper.cs index 525a70cd..1a0e88bc 100644 --- a/Bootstrap.DataAccess/Helper/GroupHelper.cs +++ b/Bootstrap.DataAccess/Helper/GroupHelper.cs @@ -1,4 +1,5 @@ -using Longbow.Cache; +using Bootstrap.Security.DataAccess; +using Longbow.Cache; using Longbow.Data; using System.Collections.Generic; @@ -24,7 +25,7 @@ namespace Bootstrap.DataAccess /// /// /// - public const string RetrieveGroupsByUserNameDataKey = "GroupHelper-RetrieveGroupsByUserName"; + public const string RetrieveGroupsByUserNameDataKey = DbHelper.RetrieveGroupsByUserNameDataKey; /// /// 查询所有群组信息 diff --git a/Bootstrap.DataAccess/Helper/MenuHelper.cs b/Bootstrap.DataAccess/Helper/MenuHelper.cs index 833224ff..22ceba03 100644 --- a/Bootstrap.DataAccess/Helper/MenuHelper.cs +++ b/Bootstrap.DataAccess/Helper/MenuHelper.cs @@ -2,8 +2,6 @@ using Bootstrap.Security.DataAccess; using Longbow.Cache; using Longbow.Data; -using Microsoft.AspNetCore.Http; -using System; using System.Collections.Generic; using System.Linq; @@ -22,7 +20,7 @@ namespace Bootstrap.DataAccess /// /// /// - public const string RetrieveMenusAll = "BootstrapMenu-RetrieveMenus"; + public const string RetrieveMenusAll = DbHelper.RetrieveMenusAll; /// /// diff --git a/Bootstrap.DataAccess/Helper/UserHelper.cs b/Bootstrap.DataAccess/Helper/UserHelper.cs index 83762483..1a67bc50 100644 --- a/Bootstrap.DataAccess/Helper/UserHelper.cs +++ b/Bootstrap.DataAccess/Helper/UserHelper.cs @@ -1,4 +1,5 @@ using Bootstrap.Security; +using Bootstrap.Security.DataAccess; using Longbow.Cache; using Longbow.Data; using System; @@ -32,7 +33,7 @@ namespace Bootstrap.DataAccess /// /// /// - public const string RetrieveUsersByNameDataKey = "BootstrapUser-RetrieveUsersByName"; + public const string RetrieveUsersByNameDataKey = DbHelper.RetrieveUsersByNameDataKey; private static bool UserChecker(User user) {