H Vs před 1 rokem
rodič
revize
d577ecc1dd
4 změnil soubory, kde provedl 7 přidání a 14 odebrání
  1. +1
    -1
      HealthMonitor.Core/Pipeline/Aop/Query/TryGetRefManagerValue.cs
  2. +2
    -9
      HealthMonitor.Service/Cache/BloodPressReferenceValueCacheManager.cs
  3. +2
    -2
      HealthMonitor.Service/Resolver/BloodpressResolver.cs
  4. +2
    -2
      HealthMonitor.WebApi/Controllers/Base/HealthMonitorControllerBase.cs

+ 1
- 1
HealthMonitor.Core/Pipeline/Aop/Query/TryGetRefManagerValue.cs Zobrazit soubor

@@ -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;


+ 2
- 9
HealthMonitor.Service/Cache/BloodPressReferenceValueCacheManager.cs Zobrazit soubor

@@ -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>
(


+ 2
- 2
HealthMonitor.Service/Resolver/BloodpressResolver.cs Zobrazit soubor

@@ -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,


+ 2
- 2
HealthMonitor.WebApi/Controllers/Base/HealthMonitorControllerBase.cs Zobrazit soubor

@@ -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);


Načítá se…
Zrušit
Uložit