初始化项目
This commit is contained in:
30
AUTS.Services/Manager/ChartsDatas.cs
Normal file
30
AUTS.Services/Manager/ChartsDatas.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using AUTS.Domain.Entities;
|
||||
using AUTS.Services.Cache;
|
||||
using AUTS.Services.Tool;
|
||||
using System.Linq;
|
||||
|
||||
namespace AUTS.Services.Manager
|
||||
{
|
||||
public partial class ChartsDatas
|
||||
{
|
||||
private static readonly string sysDBListKey = "sysManage_DBList";//库列表
|
||||
|
||||
public static void UpdateSetCacheOfDBList()
|
||||
{
|
||||
var dbList = CacheHelp.GetSysDBList();
|
||||
|
||||
using (var db = new Uts_ManageEntities())
|
||||
{
|
||||
//所有
|
||||
var count = db.TBL_UTS_Manage_DBList.Count();
|
||||
if (count > dbList.Count)
|
||||
{
|
||||
var ids = "," + string.Join(",", dbList.Select(s => s.ID).ToArray()) + ",";
|
||||
var addlist = db.TBL_UTS_Manage_DBList.ToList();
|
||||
RedisHelper.StringSet(sysDBListKey, addlist);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user