You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB
C#

using DS.Module.Core;
using DS.Module.RedisModule;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Code.Method;
using DS.WMS.Core.Sys.Interface;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Sys.Method
{
/// <summary>
///
/// </summary>
public class SysCommonCacheService: ISysCommonCacheService
{
private readonly IServiceProvider _serviceProvider;
private readonly IRedisService _redisService;
private readonly ICodeVesselService _codeVesselService;
public SysCommonCacheService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
_redisService = _serviceProvider.GetRequiredService<IRedisService>();
_codeVesselService = _serviceProvider.GetRequiredService<ICodeVesselService>();
}
/// <summary>
/// 加载公共缓存数据
/// </summary>
/// <returns></returns>
public async Task<DataResult<string>> LoadCommonCache()
{
//SysCacheKeyEnum.CommonMappingVessel
var codeVessleRlt = await _codeVesselService.LoadCache();
return DataResult<string>.Success(string.Empty);
}
}
}