物料信息程序启动后就拉取

This commit is contained in:
tongfei
2024-01-15 15:11:39 +08:00
parent 56fca1bcbf
commit 329f0f2978
2 changed files with 24 additions and 2 deletions

View File

@@ -914,7 +914,7 @@ namespace WMS.Web.Domain.Services.Public
var endTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
_logger.LogInformation($"物料拉取-结束时间:{endTime}");
//5.物料集合进行缓存
_memoryCache.Set(cache_key, erp_materials_list, new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromHours(12)));
_memoryCache.Set(cache_key, erp_materials_list, new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromDays(7)));
_logger.LogInformation($"物料拉取-总条数:{erp_materials_list.Count}");
return ResultList<ErpMaterialDto>.ReSuccess(erp_materials_list);
}