@@ -25,7 +25,7 @@ namespace HealthMonitor.Core.Pipeline.Aop.Query | |||||
if (entityType == null || returnType == null | if (entityType == null || returnType == null | ||||
|| isEnumerable //从待插入队列中读取实体,不支持读取多个实体(列表) | || isEnumerable //从待插入队列中读取实体,不支持读取多个实体(列表) | ||||
|| !(param is string)) | |||||
|| param is not string) | |||||
{ | { | ||||
await InvokeNextAsync(context); | await InvokeNextAsync(context); | ||||
return; | return; | ||||
@@ -16,8 +16,8 @@ namespace HealthMonitor.Service.Cache | |||||
private readonly ILogger<BloodPressReferenceValueCacheManager> _logger; | private readonly ILogger<BloodPressReferenceValueCacheManager> _logger; | ||||
protected readonly IHealthMonitorDataAccessor _dataAccessor; | protected readonly IHealthMonitorDataAccessor _dataAccessor; | ||||
private static object _syncLocker = new object(); | |||||
private MD5 _md5; | |||||
private static readonly object _syncLocker = new(); | |||||
private readonly MD5 _md5; | |||||
private const string CACHE_KEY_BP_REF_VALUE = "HM_REF_Val_"; | private const string CACHE_KEY_BP_REF_VALUE = "HM_REF_Val_"; | ||||
public BloodPressReferenceValueCacheManager( | public BloodPressReferenceValueCacheManager( | ||||
@@ -44,13 +44,6 @@ namespace HealthMonitor.Service.Cache | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
//bpRef = _dataAccessor | |||||
//.GetFirstOrDefault<HmBloodPressReferenceValue>( | |||||
//i => | |||||
//i.Age.Equals(age) && | |||||
//i.Gender.Equals(gender) && | |||||
//i.Hypertension.Equals(isHypertension) | |||||
//); | |||||
bpRef = await _dataAccessor | bpRef = await _dataAccessor | ||||
.GetFirstOrDefaultAsync<HmBloodPressReferenceValue> | .GetFirstOrDefaultAsync<HmBloodPressReferenceValue> | ||||
( | ( | ||||
@@ -27,8 +27,8 @@ namespace HealthMonitor.Service.Resolver | |||||
private readonly TDengineService _serviceTDengine; | private readonly TDengineService _serviceTDengine; | ||||
private readonly BloodPressReferenceValueCacheManager _bpRefValCacheManager; | private readonly BloodPressReferenceValueCacheManager _bpRefValCacheManager; | ||||
private AsyncLocal<string> _messageId = new(); | |||||
private AsyncLocal<HisGpsBloodPress> _msgData = new(); | |||||
private readonly AsyncLocal<string> _messageId = new(); | |||||
private readonly AsyncLocal<HisGpsBloodPress> _msgData = new(); | |||||
public BloodpressResolver( | public BloodpressResolver( | ||||
TDengineService serviceDengine, | TDengineService serviceDengine, | ||||
@@ -127,8 +127,8 @@ namespace HealthMonitor.WebApi.Controllers.Base | |||||
//var parser = new QueryExpressionParser<T>(); | //var parser = new QueryExpressionParser<T>(); | ||||
//var expression = parser.ParserConditions(conditions.Filters!); | //var expression = parser.ParserConditions(conditions.Filters!); | ||||
// var aa = await _dataAccessor.GetPageListAsync(1,1, expression, conditions.OrderBys!); | // var aa = await _dataAccessor.GetPageListAsync(1,1, expression, conditions.OrderBys!); | ||||
var parser = new QueryExpressionParser<T>(); | |||||
var expression = parser.ParserConditions(conditions.Filters!); | |||||
//var parser = new QueryExpressionParser<T>(); | |||||
//var expression = parser.ParserConditions(conditions.Filters!); | |||||
var pageSize = 1; | var pageSize = 1; | ||||
var pageIdx = 1; | var pageIdx = 1; | ||||
//var bb = await _dataAccessor.OrderBy(conditions.OrderBys!).Skip(pageSize * (pageIdx - 1)).Take(pageSize); | //var bb = await _dataAccessor.OrderBy(conditions.OrderBys!).Skip(pageSize * (pageIdx - 1)).Take(pageSize); | ||||