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