From 38b6c0f70c646d247e50083c4a09abce055e363a Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 26 三月 2024 15:12:39 +0800 Subject: [PATCH] 版本大更新 --- Yw.Service.DMA.Core/05-service/04-dma_site_mapping/DmaSiteMapping.cs | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Yw.Service.DMA.Core/05-service/04-dma_site_mapping/DmaSiteMapping.cs b/Yw.Service.DMA.Core/05-service/04-dma_site_mapping/DmaSiteMapping.cs index 2b8774c..cbc6d27 100644 --- a/Yw.Service.DMA.Core/05-service/04-dma_site_mapping/DmaSiteMapping.cs +++ b/Yw.Service.DMA.Core/05-service/04-dma_site_mapping/DmaSiteMapping.cs @@ -12,7 +12,7 @@ { return DmaSiteMappingCacheHelper.GetSet(() => { - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var entity_list = dal.GetAll(); var model_list = Entity2Models(entity_list); if (model_list == null) @@ -26,7 +26,7 @@ //閫氳繃 ID 鏇存柊缂撳瓨 private static void UpdateCache(long ID) { - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var entity_ds = dal.GetByID(ID); var model_ds = Entity2Model(entity_ds); var all = GetCache(); @@ -49,7 +49,7 @@ { return; } - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var entity_list = dal.GetByIds(Ids); var model_list = Entity2Models(entity_list); var all = GetCache(); @@ -64,7 +64,7 @@ //閫氳繃 SiteID 鏇存柊缂撳瓨 private static void UpdateCacheBySiteID(long SiteID) { - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var entity_list = dal.GetBySiteID(SiteID); var model_list = Entity2Models(entity_list); var all = GetCache(); @@ -185,7 +185,7 @@ return default; } var entity = Model2Entity(model); - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var id = dal.Insert(entity); if (id > 0) { @@ -203,7 +203,7 @@ { return false; } - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var entity_list = Model2Entities(list); var ids = dal.InsertsR(entity_list); if (ids != null && ids.Count > 0) @@ -228,7 +228,7 @@ return false; } var entity = Model2Entity(model); - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var bol = dal.Update(entity); if (bol) { @@ -247,7 +247,7 @@ return false; } var entity_list = Model2Entities(list.ToList()); - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var bol = dal.Updates(entity_list); if (bol) { @@ -261,7 +261,7 @@ /// </summary> public bool UpdateDirection(long ID, eDirection Direction) { - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var bol = dal.UpdateDirection(ID, (int)Direction); if (bol) { @@ -302,7 +302,7 @@ public bool DeleteByID(long ID, out string Msg) { Msg = string.Empty; - var dal = new DAL.DmaSiteMapping(); + var dal = DALCreateHelper.CreateDAL<Yw.DAL.IDmaSiteMapping>(); var bol = dal.DeleteByID(ID); if (bol) { -- Gitblit v1.9.3