From d06e2aa43a5c791058a75aa83ef17f936e2f5c0d Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 27 九月 2024 09:20:53 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- Application/HStation.Application.Assets.Core/01-ProjectProduct/PumpPropContent_Controller.cs | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Application/HStation.Application.Assets.Core/01-ProjectProduct/PumpPropContent_Controller.cs b/Application/HStation.Application.Assets.Core/01-ProjectProduct/PumpPropContent_Controller.cs index 4b2c2ef..176de7c 100644 --- a/Application/HStation.Application.Assets.Core/01-ProjectProduct/PumpPropContent_Controller.cs +++ b/Application/HStation.Application.Assets.Core/01-ProjectProduct/PumpPropContent_Controller.cs @@ -6,7 +6,7 @@ /// PumpSeries /// </summary> [Route("Assets/PumpPropContent")] - [ApiDescriptionSettings("Assets", Name = "璧勪骇", Order = 600000)] + [ApiDescriptionSettings("Assets", Name = "PumpPropContent", Order = 500000)] public class PumpPropContent_Controller : IDynamicApiController { private readonly HStation.Service.PumpPropContent _service = new(); @@ -30,9 +30,9 @@ /// </summary> [Route("GetByID@V1.0")] [HttpGet] - public PumpPropContentDto GetByID(long ID) + public PumpPropContentDto GetByID([FromQuery][Required] IDInput input) { - var model = _service.GetByID(ID); + var model = _service.GetByID(input.ID); return model == null ? null : new PumpPropContentDto(model); } @@ -41,9 +41,10 @@ /// </summary> [Route("GetByIds@V1.0")] [HttpGet] - public List<PumpPropContentDto> GetByIds(List<long> Ids) + public List<PumpPropContentDto> GetByIds([FromQuery][Required] IdsInput input) { - var list = _service.GetByIds(Ids); + var ids = LongListHelper.ToList(input.Ids); + var list = _service.GetByIds(ids); var vm_list = list?.Select(x => new PumpPropContentDto(x)).ToList(); return vm_list; } @@ -69,9 +70,9 @@ /// </summary> [Route("Insert@V1.0")] [HttpPost] - public long Insert(AddPumpPropContentDto input) + public long Insert(AddPumpPropContentInput input) { - var model = input.Adapt<AddPumpPropContentDto, Model.PumpPropContent>(); + var model = input.Adapt<AddPumpPropContentInput, Model.PumpPropContent>(); var id = _service.Insert(model); return id; } @@ -81,9 +82,9 @@ /// </summary> [Route("Inserts@V1.0")] [HttpPost] - public bool Inserts(List<AddPumpPropContentDto> inputList) + public bool Inserts(List<AddPumpPropContentInput> inputList) { - var list = inputList.Select(x => x.Adapt<AddPumpPropContentDto, Model.PumpPropContent>()).ToList(); + var list = inputList.Select(x => x.Adapt<AddPumpPropContentInput, Model.PumpPropContent>()).ToList(); var bol = _service.Inserts(list); return bol; } @@ -97,7 +98,7 @@ /// </summary> [Route("Update@V1.0")] [HttpPut] - public bool Update(UpdatePumpPropContentDto input) + public bool Update([Required] UpdatePumpPropContentInput input) { var model = _service.GetByID(input.ID); if (model == null) @@ -116,13 +117,13 @@ /// </summary> [Route("Updates@V1.0")] [HttpPut] - public bool Updates(List<UpdatePumpPropContentDto> inputList) + public bool Updates([Required] List<UpdatePumpPropContentInput> inputList) { if (inputList == null || inputList.Count < 1) { return false; } - var list = inputList.Select(x => x.Adapt<UpdatePumpPropContentDto, Model.PumpPropContent>()).ToList(); + var list = inputList.Select(x => x.Adapt<UpdatePumpPropContentInput, Model.PumpPropContent>()).ToList(); var bol = _service.Updates(list); return bol; } @@ -136,9 +137,9 @@ /// </summary> [Route("DeleteByID@V1.0")] [HttpDelete] - public bool DeleteByID(long ID) + public bool DeleteByID([FromQuery][Required] IDInput input) { - var bol = _service.DeleteByID(ID, out string msg); + var bol = _service.DeleteByID(input.ID, out string msg); if (!bol) { throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg); -- Gitblit v1.9.3