31 lines
878 B
C#
31 lines
878 B
C#
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);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|