fix 开放山西人员数据接口
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Dlhis.External.OpenApi.Response;
|
||||
using Kurisu.AspNetCore.Utils;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
|
||||
namespace Dlhis.External.OpenApi.Services.Implements;
|
||||
|
||||
public class GainfoService : IGainfoService
|
||||
{
|
||||
private readonly RedisCache _redisCache;
|
||||
|
||||
public GainfoService(RedisCache redisCache)
|
||||
{
|
||||
_redisCache = redisCache;
|
||||
}
|
||||
|
||||
public async Task<List<GainfoOpenResponse>> GetAllGainfosAsync()
|
||||
{
|
||||
var data = await _redisCache.ListRangeAsync("gainfo:shanxi");
|
||||
return data.Select(x => x.ToString().ToObject<GainfoOpenResponse>()).ToList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user