| | |
| | | using Yw.BLL; |
| | | using Yw.Dto; |
| | | |
| | | namespace HStation.BLL |
| | | { |
| | |
| | | /// <summary> |
| | | /// 获取所有 |
| | | /// </summary> |
| | | public async Task<List<Vmo.TransferFileUserVmo>> GetAll() |
| | | public async Task<List<TransferFileUserVmo>> GetAll() |
| | | { |
| | | var dtoList = await _cal.GetAll(); |
| | | return Dto2Vmos(dtoList); |
| | |
| | | /// <summary> |
| | | /// 通过 ID 获取 |
| | | /// </summary> |
| | | public async Task<Vmo.TransferFileUserVmo> GetByID(long ID) |
| | | public async Task<TransferFileUserVmo> GetByID(long ID) |
| | | { |
| | | var dto = await _cal.GetByID(ID); |
| | | return Dto2Vmo(dto); |
| | |
| | | /// <summary> |
| | | /// 通过 Ids 获取 |
| | | /// </summary> |
| | | public async Task<List<Vmo.TransferFileUserVmo>> GetByIds(List<long> Ids) |
| | | public async Task<List<TransferFileUserVmo>> GetByIds(List<long> Ids) |
| | | { |
| | | var dto = await _cal.GetByIds(Ids); |
| | | return Dto2Vmos(dto); |
| | |
| | | /// <summary> |
| | | /// 通过 Name 获取 |
| | | /// </summary> |
| | | public async Task<Vmo.TransferFileUserVmo> GetByName(string input) |
| | | public async Task<TransferFileUserVmo> GetByName(string Name) |
| | | { |
| | | var dto = await _cal.GetByName(input); |
| | | var dto = await _cal.GetByName(Name); |
| | | return Dto2Vmo(dto); |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 插入一条 |
| | | /// </summary> |
| | | public async Task<long> Insert(Vmo.TransferFileUserVmo input) |
| | | public async Task<long> Insert(TransferFileUserVmo input) |
| | | { |
| | | var dto = Vmo2AddDto(input); |
| | | var id = await _cal.Insert(dto); |
| | | return id; |
| | | } |
| | | |
| | | #endregion Insert |
| | | #endregion |
| | | |
| | | #region Update |
| | | |
| | | /// <summary> |
| | | /// 更新一条 |
| | | /// </summary> |
| | | public async Task<bool> Update(Vmo.TransferFileUserVmo input) |
| | | public async Task<bool> Update(TransferFileUserVmo input) |
| | | { |
| | | var dto = Vmo2UpdateDto(input); |
| | | return await _cal.Update(dto); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新排序 |
| | | /// 批量更新排序码 |
| | | /// </summary> |
| | | public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList) |
| | | public async virtual Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) |
| | | { |
| | | return await _cal.UpdateSorter(inputList); |
| | | var dtoList = Sorters.ToDtoList(); |
| | | var bol = await _cal.UpdateSorter(dtoList); |
| | | return bol; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 激活 |
| | | /// </summary> |
| | | public async Task<bool> Active(ActiveTransferFileUserInput input) |
| | | public async Task<bool> Active(string Name) |
| | | { |
| | | var input = new ActiveTransferFileUserInput() { Name = Name }; |
| | | return await _cal.Active(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 失效 |
| | | /// </summary> |
| | | public async Task<bool> Invalid(InvalidTransferFileUserInput input) |
| | | public async Task<bool> Invalid(string Name, DateTime InvalidTime) |
| | | { |
| | | var input = new InvalidTransferFileUserInput() { Name = Name, InvalidTime = InvalidTime }; |
| | | return await _cal.Invalid(input); |
| | | } |
| | | |
| | | #endregion Update |
| | | #endregion |
| | | |
| | | #region Exist |
| | | |
| | | /// <summary> |
| | | /// 判断 Name 是否存在 |
| | | /// </summary> |
| | | public async Task<bool> IsExistName(string input) |
| | | public async Task<bool> IsExistName(string Name) |
| | | { |
| | | return await _cal.IsExistName(input); |
| | | return await _cal.IsExistName(Name); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断 Name 是否存在 ExceptID |
| | | /// </summary> |
| | | public async Task<bool> IsExistNameExceptID(NameExceptInput input) |
| | | public async Task<bool> IsExistNameExceptID(string Name, long ExceptID) |
| | | { |
| | | var input = new NameExceptInput() { Name = Name, ExceptID = ExceptID }; |
| | | return await _cal.IsExistNameExceptID(input); |
| | | } |
| | | |
| | | #endregion Exist |
| | | #endregion |
| | | |
| | | #region Delete |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion Delete |
| | | #endregion |
| | | } |