using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.Info.Dtos; using DS.WMS.Core.Info.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers; /// /// 客户联系人信息-模块 /// public class ClientContactController : ApiController { private readonly IClientContactService _invokeService; /// /// 构造函数 /// /// public ClientContactController(IClientContactService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetClientContactList")] public DataResult> GetClientContactList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditClientContact")] public DataResult EditClientContact([FromBody] ClientContactReq req) { var res = _invokeService.EditClientContact(req); return res; } /// /// 详情 /// /// /// [HttpGet] [Route("GetClientContactInfo")] public DataResult GetClientContactInfo([FromQuery] string id) { var res = _invokeService.GetClientContactInfo(id); return res; } /// /// 根据ID删除 /// /// /// [HttpPost, Route("Delete")] public async Task DeleteAsync([FromBody] IdModel model) { if (!ModelState.IsValid) return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest); return await _invokeService.DeleteAsync(model); } }