diff --git a/src/blazor/admin/BootstrapAdmin.Caching/CacheKeyChangeToken.cs b/src/blazor/admin/BootstrapAdmin.Caching/CacheKeyChangeToken.cs deleted file mode 100644 index 4b2e1254..00000000 --- a/src/blazor/admin/BootstrapAdmin.Caching/CacheKeyChangeToken.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.Extensions.Primitives; - -namespace BootstrapAdmin.Caching; - -/// -/// 缓存键值 IChangeToken 实现类 -/// -public class CacheKeyChangeToken : IChangeToken -{ - /// - /// - /// - public bool HasChanged { get; } - - /// - /// - /// - public bool ActiveChangeCallbacks { get; } - - /// - /// - /// - /// - /// - /// - /// - public IDisposable RegisterChangeCallback(Action callback, object state) - { - throw new NotImplementedException(); - } -} diff --git a/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs b/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs index f29e3490..c68e7c30 100644 --- a/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs +++ b/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs @@ -261,7 +261,7 @@ class DictService : IDict public bool GetAppSiderbar() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "侧边栏状态" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "侧边栏状态" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAppSiderbar(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "侧边栏状态", Code = value ? "1" : "0" }); @@ -269,7 +269,7 @@ class DictService : IDict public bool GetAppTitle() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "卡片标题状态" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "卡片标题状态" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAppTitle(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "卡片标题状态", Code = value ? "1" : "0" }); @@ -277,7 +277,7 @@ class DictService : IDict public bool GetAppFixHeader() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "固定表头" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "固定表头" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAppFixHeader(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "固定表头", Code = value ? "1" : "0" }); @@ -285,7 +285,7 @@ class DictService : IDict public bool GetAppHealthCheck() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "健康检查" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "健康检查" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAppHealthCheck(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "健康检查", Code = value ? "1" : "0" }); @@ -293,7 +293,7 @@ class DictService : IDict public bool GetAppMobileLogin() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "短信验证码登录" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "短信验证码登录" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAppMobileLogin(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "短信验证码登录", Code = value ? "1" : "0" }); @@ -301,7 +301,7 @@ class DictService : IDict public bool GetAppOAuthLogin() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "OAuth 认证登录" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "OAuth 认证登录" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAppOAuthLogin(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "OAuth 认证登录", Code = value ? "1" : "0" }); @@ -309,7 +309,7 @@ class DictService : IDict public bool GetAutoLockScreen() { var dicts = GetAll(); - return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "自动锁屏" && s.Define == EnumDictDefine.System)?.Code == "1" ? true : false; + return dicts.FirstOrDefault(s => s.Category == "网站设置" && s.Name == "自动锁屏" && s.Define == EnumDictDefine.System)?.Code == "1"; } public bool SaveAutoLockScreen(bool value) => SaveDict(new Dict { Category = "网站设置", Name = "自动锁屏", Code = value ? "1" : "0" }); @@ -378,7 +378,6 @@ class DictService : IDict public bool SaveLoginExpired(int value) => SaveDict(new Dict { Category = "网站设置", Name = "登录日志保留时长", Code = value.ToString() }); - public int GetAccessExpired() { var dicts = GetAll();