合并代码
This commit is contained in:
commit
ba0af3a12a
@ -87,7 +87,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
string deviceKey= $"{code}:{pn}";
|
||||
return await _imemoryCache.GetOrCreateAsync(deviceKey, async entry =>
|
||||
{
|
||||
List<DeviceInfo> devices= await Instance.HGetAsync<List<DeviceInfo>>(redisCacheDeviceInfoHashKey, code);
|
||||
List<DeviceInfo> devices= await Instance.HGetAsync<List<DeviceInfo>>(redisCacheDeviceInfoHashKey, code) ?? new List<DeviceInfo>();
|
||||
var data = devices.Where(s => s.MeteringCode == pn).FirstOrDefault();
|
||||
if (data != null)
|
||||
entry.SetSlidingExpiration(TimeSpan.FromMinutes(5));
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<title>后端服务</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user