增加缓存
This commit is contained in:
@@ -18,6 +18,7 @@ using Google.Protobuf.WellKnownTypes;
|
||||
using WMS.Web.Domain.Services;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Linq;
|
||||
using WMS.Web.Core.Dto;
|
||||
|
||||
namespace WMS.Web.Api.Controllers
|
||||
{
|
||||
@@ -33,13 +34,16 @@ namespace WMS.Web.Api.Controllers
|
||||
private readonly IProductInventoryRepositories _repositories;
|
||||
private readonly QiniuOptions _option;
|
||||
private readonly IExportExcelService _exportExcelService;
|
||||
private readonly IProductInventoryService _roductInventoryService;
|
||||
public ProductInventoryController(ILoginService loginService, IBasicsRepositories basicsRepositories,
|
||||
IProductInventoryRepositories repositories, IOptions<QiniuOptions> option, IExportExcelService exportExcelServic) {
|
||||
IProductInventoryRepositories repositories, IOptions<QiniuOptions> option,
|
||||
IExportExcelService exportExcelServic, IProductInventoryService roductInventoryService) {
|
||||
_loginService = loginService;
|
||||
_basicsRepositories = basicsRepositories;
|
||||
_repositories = repositories;
|
||||
_option = option?.Value;
|
||||
_exportExcelService = exportExcelServic;
|
||||
_roductInventoryService = roductInventoryService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -100,5 +104,19 @@ namespace WMS.Web.Api.Controllers
|
||||
|
||||
return Task.FromResult(Result<string>.ReSuccess(res));
|
||||
}
|
||||
/// <summary>
|
||||
/// 刷新数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("Refresh")]
|
||||
public async Task<Result> Refresh()
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
return await _roductInventoryService.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,6 +586,12 @@
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.ProductInventoryController.Refresh">
|
||||
<summary>
|
||||
刷新数据
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.SerialNumberController.Get(System.String)">
|
||||
<summary>
|
||||
获取序列号信息
|
||||
|
||||
Reference in New Issue
Block a user