From 1e4b358de58e36bfbf692ab2538ff9e7d60fd025 Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期五, 24 二月 2023 14:11:17 +0800 Subject: [PATCH] 曲线筛查 --- BLL/IStation.BLL.Scene/scene/Scene.cs | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BLL/IStation.BLL.Scene/scene/Scene.cs b/BLL/IStation.BLL.Scene/scene/Scene.cs index 7ba1322..3c52655 100644 --- a/BLL/IStation.BLL.Scene/scene/Scene.cs +++ b/BLL/IStation.BLL.Scene/scene/Scene.cs @@ -21,7 +21,7 @@ { return SceneCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateSceneCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetSceneCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetSceneCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.Scene> QueryAll(long projectId) + public List<Model.Scene> GetAll(long projectId) { var all = GetSceneCache(projectId); return all.ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.Scene QueryById(long projectId, long Id) + public Model.Scene GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.Scene> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.Scene> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion -- Gitblit v1.9.3