lixiaojun
2024-10-25 a27817f01817b22fff839a2d0b98cbb6e45a22f7
BLL/HStation.BLL.TransferFile.Core/03-localclient/01-user/TransferFileUser.cs
@@ -7,6 +7,8 @@
    {
        private readonly HStation.Service.TransferFileUser _service = new();
        #region Query
        /// <summary>
        /// 获取所有
        /// </summary>
@@ -48,14 +50,16 @@
        /// <summary>
        /// 通过 Name 获取
        /// </summary>
        public async Task<TransferFileUserDto> GetByName(string input)
        public async Task<TransferFileUserDto> GetByName(string Name)
        {
            return await Task.Factory.StartNew(() =>
             {
                 var model = _service.GetByName(input);
                 var model = _service.GetByName(Name);
                 return model == null ? null : new TransferFileUserDto(model);
             });
        }
        #endregion
        #region Insert
@@ -65,19 +69,29 @@
        public async Task<long> Insert(AddTransferFileUserInput input)
        {
            return await Task.Factory.StartNew(() =>
         {
             if (_service.IsExistName(input.Name))
             {
                 throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"Name:{input.Name}", "名称已存在");
             }
             var model = input.Adapt<AddTransferFileUserInput, Model.TransferFileUser>();
             model.SortCode = _service.GetMaxSortCode() + 1;
             var id = _service.Insert(model);
             return id;
         });
                 if (_service.IsExistName(input.Name))
                 {
                     throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"Name:{input.Name}", "名称已存在");
                 }
                 var model = input.Adapt<AddTransferFileUserInput, Model.TransferFileUser>();
                 model.SortCode = _service.GetMaxSortCode() + 1;
                 var id = _service.Insert(model);
                 return id;
             });
        }
        #endregion Insert
        public Task<bool> Inserts(List<AddTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        public Task<bool> BulkInserts(List<AddTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        #endregion
        #region Update
@@ -102,6 +116,16 @@
                var bol = _service.Update(rhs);
                return bol;
            });
        }
        public Task<bool> Updates(List<UpdateTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        public Task<bool> BulkUpdates(List<UpdateTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        /// <summary>
@@ -171,7 +195,7 @@
            });
        }
        #endregion Update
        #endregion
        #region Exist
@@ -199,7 +223,7 @@
            });
        }
        #endregion Exist
        #endregion
        #region Delete
@@ -219,16 +243,6 @@
            });
        }
        public Task<bool> Updates(List<UpdateTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        public Task<bool> BulkUpdates(List<UpdateTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        public Task<bool> DeleteByIds(List<long> Ids)
        {
            throw new NotImplementedException();
@@ -239,16 +253,7 @@
            throw new NotImplementedException();
        }
        public Task<bool> Inserts(List<AddTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        public Task<bool> BulkInserts(List<AddTransferFileUserInput> list)
        {
            throw new NotImplementedException();
        }
        #endregion Delete
        #endregion
    }
}