接口优化

This commit is contained in:
tongfei
2023-11-17 15:54:55 +08:00
parent 1a28d353f9
commit d2740124d2
9 changed files with 71 additions and 123 deletions

View File

@@ -171,13 +171,13 @@ namespace WMS.Web.Api.Controllers
/// <returns></returns>
[HttpGet]
[Route("GetBoxInventoryDetails/{boxBillNo}")]
public async Task<ResultList<BoxInventoryDetailsResponse>> GetBoxInventoryDetails([FromRoute] string boxBillNo)
public async Task<Result<BoxInventoryResponse>> GetBoxInventoryDetails([FromRoute] string boxBillNo)
{
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
if (loginInfo == null || loginInfo.UserInfo == null)
return ResultPagedList<BoxInventoryDetailsResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
var result = await _boxInventoryRepositories.GetListDetailsBy(boxBillNo);
return ResultList <BoxInventoryDetailsResponse>.ReSuccess(result);
return Result<BoxInventoryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
var result = await _boxInventoryRepositories.GetInfoBy(boxBillNo);
return Result <BoxInventoryResponse>.ReSuccess(result);
}
}
}