| | |
| | | using Yw.BLL; |
| | | |
| | | namespace PBS.BLL |
| | | { |
| | | /// <summary> |
| | |
| | | ///</summary> |
| | | public partial class Place |
| | | { |
| | | |
| | | private readonly PBS.CAL.IPlace _cal = CALCreateHelper.CreateCAL<PBS.CAL.IPlace>(); |
| | | |
| | | #region Query |
| | |
| | | /// <summary> |
| | | /// 获取所有 |
| | | /// </summary> |
| | | public async virtual Task<List<PBS.Vmo.PlaceVmo>> GetAll() |
| | | public virtual async Task<List<PBS.Vmo.PlaceVmo>> GetAll() |
| | | { |
| | | var dtoList = await _cal.GetAll(); |
| | | return Dto2Vmos(dtoList); |
| | |
| | | /// <summary> |
| | | /// 通过 ID 获取 |
| | | /// </summary> |
| | | public async virtual Task<PBS.Vmo.PlaceVmo> GetByID(long ID) |
| | | public virtual async Task<PBS.Vmo.PlaceVmo> GetByID(long ID) |
| | | { |
| | | var dto = await _cal.GetByID(ID); |
| | | return Dto2Vmo(dto); |
| | |
| | | /// <summary> |
| | | /// 通过 Ids 获取 |
| | | /// </summary> |
| | | public async virtual Task<List<PBS.Vmo.PlaceVmo>> GetByIds(List<long> Ids) |
| | | public virtual async Task<List<PBS.Vmo.PlaceVmo>> GetByIds(List<long> Ids) |
| | | { |
| | | var dtoList = await _cal.GetByIds(Ids); |
| | | return Dto2Vmos(dtoList); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Query |
| | | |
| | | #region Insert |
| | | |
| | | /// <summary> |
| | | /// 插入一条 |
| | | /// </summary> |
| | | public async virtual Task<long> Insert(PBS.Vmo.PlaceVmo vmo) |
| | | public virtual async Task<long> Insert(PBS.Vmo.PlaceVmo vmo) |
| | | { |
| | | var dto = Vmo2AddDto(vmo); |
| | | var id = await _cal.Insert(dto); |
| | |
| | | /// <summary> |
| | | /// 插入多条 |
| | | /// </summary> |
| | | public async virtual Task<bool> Inserts(List<PBS.Vmo.PlaceVmo> vmoList) |
| | | public virtual async Task<bool> Inserts(List<PBS.Vmo.PlaceVmo> vmoList) |
| | | { |
| | | var dtoList = Vmo2AddDtos(vmoList); |
| | | var bol = await _cal.Inserts(dtoList); |
| | | return bol; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Insert |
| | | |
| | | #region Update |
| | | |
| | | /// <summary> |
| | | /// 更新 |
| | | /// </summary> |
| | | public async virtual Task<bool> Update(PBS.Vmo.PlaceVmo vmo) |
| | | public virtual async Task<bool> Update(PBS.Vmo.PlaceVmo vmo) |
| | | { |
| | | var dto = Vmo2UpdateDto(vmo); |
| | | var bol = await _cal.Update(dto); |
| | |
| | | /// <summary> |
| | | /// 批量更新 |
| | | /// </summary> |
| | | public async virtual Task<bool> Updates(List<PBS.Vmo.PlaceVmo> vmoList) |
| | | public virtual async Task<bool> Updates(List<PBS.Vmo.PlaceVmo> vmoList) |
| | | { |
| | | var dtoList = Vmo2UpdateDtos(vmoList); |
| | | var bol = await _cal.Updates(dtoList); |
| | | return bol; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新排序码 |
| | | /// </summary> |
| | | public async virtual Task<bool> UpdateSortCode(long ID, int SortCode) |
| | | public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) |
| | | { |
| | | var bol = await _cal.UpdateSortCode(ID, SortCode); |
| | | return bol; |
| | |
| | | /// <summary> |
| | | /// 批量更新排序码 |
| | | /// </summary> |
| | | public async virtual Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) |
| | | public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) |
| | | { |
| | | var dtoList = Sorters.ToDtoList(); |
| | | var bol = await _cal.UpdateSorter(dtoList); |
| | |
| | | /// <summary> |
| | | /// 更新 Flags |
| | | /// </summary> |
| | | public async virtual Task<bool> UpdateFlags(long ID, List<string> Flags) |
| | | public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) |
| | | { |
| | | return await _cal.UpdateFlags(ID, Flags); |
| | | } |
| | |
| | | /// <summary> |
| | | /// 更新 Paras |
| | | /// </summary> |
| | | public async virtual Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) |
| | | public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) |
| | | { |
| | | return await _cal.UpdateParas(ID, Paras); |
| | | } |
| | |
| | | /// <summary> |
| | | /// 更新 TagName |
| | | /// </summary> |
| | | public async virtual Task<bool> UpdateTagName(long ID, string TagName) |
| | | public virtual async Task<bool> UpdateTagName(long ID, string TagName) |
| | | { |
| | | return await _cal.UpdateTagName(ID, TagName); |
| | | } |
| | | |
| | | #endregion |
| | | /// <summary> |
| | | /// 更新 UpdateUseStatus |
| | | /// </summary> |
| | | public virtual async Task<bool> UpdateUseStatus(long ID, Yw.Model.eUseStatus useStatus) |
| | | { |
| | | return await _cal.UpdateUseStatus(ID, (int)useStatus); |
| | | } |
| | | |
| | | #endregion Update |
| | | |
| | | #region Exist |
| | | |
| | | /// <summary> |
| | | /// 判断 TagName 是否存在 |
| | | /// </summary> |
| | | public async virtual Task<bool> IsExistTagName(string TagName) |
| | | public virtual async Task<bool> IsExistTagName(string TagName) |
| | | { |
| | | return await _cal.IsExistTagName(TagName); |
| | | } |
| | |
| | | /// <summary> |
| | | /// 判断 TagName 是否存在 ExceptID |
| | | /// </summary> |
| | | public async virtual Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) |
| | | public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) |
| | | { |
| | | return await _cal.IsExistTagNameExceptID(TagName, ExceptID); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Exist |
| | | |
| | | #region Delete |
| | | |
| | | /// <summary> |
| | | /// 通过 ID 删除 |
| | | /// </summary> |
| | | public async virtual Task<bool> DeleteByID(long ID) |
| | | public virtual async Task<bool> DeleteByID(long ID) |
| | | { |
| | | var bol = await _cal.DeleteByID(ID); |
| | | return bol; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion Delete |
| | | } |
| | | } |