From a5770e3760d8e966efcc6076c37fdaec72a04bc0 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 24 十二月 2024 09:47:53 +0800 Subject: [PATCH] 修改报告字段命名 --- BLL/HStation.BLL.Xhs.Core/04-bll/01-project/XhsProject.cs | 179 +++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 129 insertions(+), 50 deletions(-) diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/01-project/XhsProject.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/01-project/XhsProject.cs index a952056..0062155 100644 --- a/BLL/HStation.BLL.Xhs.Core/04-bll/01-project/XhsProject.cs +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/01-project/XhsProject.cs @@ -1,117 +1,196 @@ -锘縰sing HStation.CAL; +锘縰sing Yw.BLL; namespace HStation.BLL { /// <summary> /// /// </summary> - public class XhsProject : IXhsProject + public partial class XhsProject { private readonly HStation.CAL.IXhsProject _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProject>(); - public Task<bool> BulkInserts(List<AddXhsProjectInput> list) + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public virtual async Task<List<XhsProjectVmo>> GetAll() { - return _cal.BulkInserts(list); + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); } - public Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public virtual async Task<XhsProjectVmo> GetByID(long ID) { - return _cal.BulkUpdates(list); + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); } - public Task<bool> DeleteAll() + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public virtual async Task<List<XhsProjectVmo>> GetByIds(List<long> Ids) { - return _cal.DeleteAll(); + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); } - public Task<bool> DeleteByID(long ID) + /// <summary> + /// 鑾峰彇鏁伴噺 + /// </summary> + public virtual async Task<int> GetCount() { - return _cal.DeleteByID(ID); + var count = await _cal.GetCount(); + return count; } - public Task<bool> DeleteByIds(List<long> Ids) + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public virtual async Task<long> Insert(XhsProjectVmo vmo) { - return _cal.DeleteByIds(Ids); + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; } - public Task<bool> Deprecate(long ID) + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public virtual async Task<bool> Inserts(List<XhsProjectVmo> vmoList) { - return _cal.Deprecate(ID); + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; } - public Task<List<XhsProjectDto>> GetAll() + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> Update(XhsProjectVmo vmo) { - return _cal.GetAll(); + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; } - public Task<XhsProjectDto> GetByID(long ID) + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public virtual async Task<bool> Updates(List<XhsProjectVmo> vmoList) { - return _cal.GetByID(ID); + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; } - public Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) { - return _cal.GetByIds(Ids); + var bol = await _cal.UpdateSortCode(ID, SortCode); + return bol; } - public Task<long> Insert(AddXhsProjectInput model) + /// <summary> + /// 鎵归噺鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) { - return _cal.Insert(model); + var dtoList = Sorters.ToDtoList(); + var bol = await _cal.UpdateSorter(dtoList); + return bol; } - public Task<bool> Inserts(List<AddXhsProjectInput> list) + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) { - return _cal.Inserts(list); + return await _cal.UpdateFlags(ID, Flags); } - public Task<bool> IsExistTagName(string TagName) + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) { - return _cal.IsExistTagName(TagName); + return await _cal.UpdateParas(ID, Paras); } - public Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public virtual async Task<bool> UpdateTagName(long ID, string TagName) { - return _cal.IsExistTagNameExceptID(TagName, ExceptID); + return await _cal.UpdateTagName(ID, TagName); } - public Task<bool> Publish(long ID) + #endregion Update + + #region Exist + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 + /// </summary> + public virtual async Task<bool> IsExistTagName(string TagName) { - return _cal.Publish(ID); + return await _cal.IsExistTagName(TagName); } - public Task<bool> Update(UpdateXhsProjectInput model) + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) { - return _cal.Update(model); + return await _cal.IsExistTagNameExceptID(TagName, ExceptID); } - public Task<bool> UpdateFlags(long ID, List<string> Flags) + #endregion Exist + + #region Delete + + /// <summary> + /// 鍏ㄩ儴鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteAll() { - return _cal.UpdateFlags(ID, Flags); + var bol = await _cal.DeleteAll(); + return bol; } - public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByID(long ID) { - return _cal.UpdateParas(ID, Paras); + var bol = await _cal.DeleteByID(ID); + return bol; } - public Task<bool> Updates(List<UpdateXhsProjectInput> list) + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByIds(List<long> Ids) { - return _cal.Updates(list); + var bol = await _cal.DeleteByIds(Ids); + return bol; } - public Task<bool> UpdateSortCode(long ID, int SortCode) - { - return _cal.UpdateSortCode(ID, SortCode); - } + #endregion Delete - public Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) - { - return _cal.UpdateSorter(Sorters); - } - public Task<bool> UpdateTagName(long ID, string TagName) - { - return _cal.UpdateTagName(ID, TagName); - } } } \ No newline at end of file -- Gitblit v1.9.3