Shuxia Ning
2024-10-12 b94da76188b834922d2f13365b22208a4bc4049a
Service/HStation.Service.Assets.Core/05-service/02-AdaptingManage/AdaptingManage.cs
@@ -10,7 +10,7 @@
        #region Cache
        //获取缓存
        private static List<Model.AdaptingManage> GetCache()
        private static List<Model.UserDefined> GetCache()
        {
            var all = AdaptingManageCacheHelper.GetSet(() =>
            {
@@ -19,7 +19,7 @@
                var model_list = Entity2Models(entity_list);
                if (model_list == null)
                {
                    model_list = new List<Model.AdaptingManage>();
                    model_list = new List<Model.UserDefined>();
                }
                return model_list;
            }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime);
@@ -87,7 +87,7 @@
        /// <summary>
        /// 获取所有
        /// </summary>
        public List<Model.AdaptingManage> GetAll()
        public List<Model.UserDefined> GetAll()
        {
            var all = GetCache();
            return all;
@@ -109,7 +109,7 @@
        /// <summary>
        /// 通过 ID 获取
        /// </summary>
        public Model.AdaptingManage GetByID(long ID)
        public Model.UserDefined GetByID(long ID)
        {
            var all = GetAll();
            return all.Find(x => x.ID == ID);
@@ -118,7 +118,7 @@
        /// <summary>
        /// 通过 设备类型获取
        /// </summary>
        public List<Model.AdaptingManage> GetByAdaptingType(eAdaptingType type)
        public List<Model.UserDefined> GetByAdaptingType(eAdaptingType type)
        {
            var all = GetAll();
            return all.Where(x => x.AdaptingType == type).ToList();
@@ -127,7 +127,7 @@
        /// <summary>
        /// 通过 ID 获取
        /// </summary>
        public List<Model.AdaptingManage> GetByIds(List<long> Ids)
        public List<Model.UserDefined> GetByIds(List<long> Ids)
        {
            if (Ids == null || Ids.Count < 1)
            {
@@ -144,7 +144,7 @@
        /// <summary>
        /// 插入一条数据
        /// </summary>
        public long Insert(Model.AdaptingManage model)
        public long Insert(Model.UserDefined model)
        {
            if (model == null)
            {
@@ -163,7 +163,7 @@
        /// <summary>
        /// 插入多条
        /// </summary>
        public bool Inserts(List<Model.AdaptingManage> list)
        public bool Inserts(List<Model.UserDefined> list)
        {
            if (list == null || list.Count < 1)
            {
@@ -187,7 +187,7 @@
        /// <summary>
        /// 更新一条
        /// </summary>
        public bool Update(Model.AdaptingManage model)
        public bool Update(Model.UserDefined model)
        {
            if (model == null)
            {
@@ -206,7 +206,7 @@
        /// <summary>
        /// 批量更新
        /// </summary>
        public bool Updates(List<Model.AdaptingManage> list)
        public bool Updates(List<Model.UserDefined> list)
        {
            if (list == null || list.Count < 1)
            {