From 6922ceb192bfcb15f840409bb5f0707d3ee448e9 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期五, 21 六月 2024 18:09:57 +0800 Subject: [PATCH] 菜单权限更新 --- Tiger.Api/Controllers/WMS/WMSController.MqCustomer.cs | 68 +++++++++++++++++++++++++++++++++- 1 files changed, 66 insertions(+), 2 deletions(-) diff --git a/Tiger.Api/Controllers/WMS/WMSController.MqCustomer.cs b/Tiger.Api/Controllers/WMS/WMSController.MqCustomer.cs index e7f2e6a..6474cff 100644 --- a/Tiger.Api/Controllers/WMS/WMSController.MqCustomer.cs +++ b/Tiger.Api/Controllers/WMS/WMSController.MqCustomer.cs @@ -1,5 +1,6 @@ 锘縰sing Microsoft.AspNetCore.Mvc; using Rhea.Common; +using System.Collections.Generic; using System.Threading.Tasks; using Tiger.IBusiness; using Tiger.Model; @@ -9,9 +10,9 @@ public partial class WMSController : ControllerBase { /// <summary> - /// 瀹㈡埛绔敤鎴风櫥褰� + /// 鑾峰彇瀹㈡埛淇℃伅 /// </summary> - /// <param name="userInfo"></param> + /// <param name="action"></param> /// <returns></returns> [HttpPost] [Route("api/[controller]/[action]")] @@ -28,5 +29,68 @@ } return Ok(response); } + + /// <summary> + /// 鑾峰彇鍒嗛〉 + /// </summary> + /// <param name="action"></param> + /// <returns></returns> + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> GetCustomers([FromBody] ApiAction<PageAble<Customer>> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<ICustomer>().GetCustomers(action.Data)); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } + + /// <summary> + /// 瀵煎叆 + /// </summary> + /// <param name="action"></param> + /// <returns></returns> + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> SaveImportCustomerInfo([FromBody] ApiAction<List<Customer>> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<ICustomer>().SaveImportCustomerInfo(action.Data)); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } + + /// <summary> + /// 淇濆瓨 + /// </summary> + /// <param name="action"></param> + /// <returns></returns> + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> SaveCustomer([FromBody] ApiAction<Customer> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<ICustomer>().SaveCustomer(action.Data)); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } } } -- Gitblit v1.9.3