fix: 更新 FreeSql 接口实现修复报错问题

This commit is contained in:
Argo-Tianyi 2022-01-13 10:55:17 +08:00
parent 0df8267cb2
commit 5bd40bd487
3 changed files with 19 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\BootstrapAdmin.Caching\BootstrapAdmin.Caching.csproj" />
<ProjectReference Include="..\BootstrapAdmin.Web.Core\BootstrapAdmin.Web.Core.csproj" />
</ItemGroup>

View File

@ -1,4 +1,5 @@
using BootstrapAdmin.DataAccess.Models;
using BootstrapAdmin.Caching;
using BootstrapAdmin.DataAccess.Models;
using BootstrapAdmin.Web.Core;
using Longbow.Security.Cryptography;
using Microsoft.Extensions.Configuration;
@ -39,7 +40,7 @@ class DictService : IDict
///
/// </summary>
/// <returns></returns>
public List<Dict> GetAll() => CacheManager.GetOrCreate<List<Dict>>(DictServiceCacheKey, entry => FreeSql.Select<Dict>().ToList());
public List<Dict> GetAll() => CacheManager.GetOrAdd<List<Dict>>(DictServiceCacheKey, entry => FreeSql.Select<Dict>().ToList());
public Dictionary<string, string> GetApps()
{
@ -171,4 +172,14 @@ class DictService : IDict
url = dicts.FirstOrDefault(d => d.Category == "应用首页" && d.Name.Equals(appId, StringComparison.OrdinalIgnoreCase) && d.Define == EnumDictDefine.System)?.Code;
return url;
}
public bool SavDefaultApp(bool enabled)
{
throw new NotImplementedException();
}
public bool GetEnableDefaultApp()
{
throw new NotImplementedException();
}
}

View File

@ -198,4 +198,9 @@ class UserService : IUser
}
return ret;
}
public bool SaveApp(string userName, string app)
{
throw new NotImplementedException();
}
}