Browse Source

修改注释

datasub12_previous
H Vs 1 year ago
parent
commit
c3d1085d64
1 changed files with 36 additions and 28 deletions
  1. +36
    -28
      HealthMonitor.Service/Biz/IotWebApiService.cs

+ 36
- 28
HealthMonitor.Service/Biz/IotWebApiService.cs View File

@@ -36,7 +36,11 @@ namespace HealthMonitor.Service.Biz
_logger = logger;
_gpsPersonApiClient = gpsPersonApiClient;
}

/// <summary>
/// 平台下发血压标定参数
/// </summary>
/// <param name="bpsCalibrationConfig"></param>
/// <returns></returns>
public async Task<bool> SetBloodPressCalibrationConfigAsync(BloodPressCalibrationConfigModel bpsCalibrationConfig)
{

@@ -76,30 +80,6 @@ namespace HealthMonitor.Service.Biz

}

public async Task<bool> UpdatePersonInfoCacheAsync(string imei)
{
var flag = false;
try
{
var url = $"{_configService.IotWebApiUrl}Device/UpdatePersonInfoCache?imei={imei}";
List<KeyValuePair<string, string>> headers = new()
{
new KeyValuePair<string, string>("AuthKey", "key1")
};
var res = await _httpHelper.HttpToGetAsync(url, headers).ConfigureAwait(false);
_logger.LogInformation($"{imei} 更新缓存{nameof(UpdatePersonInfoCacheAsync)},响应:{res}");
var resJToken = JsonConvert.DeserializeObject(res ?? string.Empty) as JToken;
flag = resJToken?["message"]?.ToString().Equals("ok") ?? false;
}
catch (Exception ex)
{
_logger.LogError($"{nameof(UpdatePersonInfoCacheAsync)} 更新缓存异常:{ex.Message}, {ex.StackTrace}");

}
return flag;


}

/// <summary>
/// 更新 gps_person remark和缓存
@@ -153,7 +133,7 @@ namespace HealthMonitor.Service.Biz
new KeyValuePair<string, string>("AuthKey", "key1")
};
var res = await _httpHelper.HttpToGetAsync(url, headers).ConfigureAwait(false);
_logger.LogInformation($"{imei} 更新缓存{nameof(UpdatePersonInfoCacheAsync)},响应:{res}");
_logger.LogInformation($"{imei} 更新缓存{nameof(UpdatePersonRemarksAsync)},响应:{res}");
var resJToken = JsonConvert.DeserializeObject(res ?? string.Empty) as JToken;
flag = resJToken?["message"]?.ToString().Equals("ok") ?? false;
}
@@ -166,7 +146,7 @@ namespace HealthMonitor.Service.Biz
}

/// <summary>
/// 初次开通
/// 初次开通更新 gps_person remark和对应的缓存
/// </summary>
/// <param name="imei"></param>
/// <param name="systolicRefValue"></param>
@@ -219,7 +199,7 @@ namespace HealthMonitor.Service.Biz
new KeyValuePair<string, string>("AuthKey", "key1")
};
var res = await _httpHelper.HttpToGetAsync(url, headers).ConfigureAwait(false);
_logger.LogInformation($"{imei} 更新缓存{nameof(UpdatePersonInfoCacheAsync)},响应:{res}");
_logger.LogInformation($"{imei} 更新缓存{nameof(UpdatePersonRemarksAsync)},响应:{res}");
var resJToken = JsonConvert.DeserializeObject(res ?? string.Empty) as JToken;
flag = resJToken?["message"]?.ToString().Equals("ok") ?? false;
}
@@ -230,5 +210,33 @@ namespace HealthMonitor.Service.Biz
}
return flag;
}

/** 取消
public async Task<bool> UpdatePersonInfoCacheAsync(string imei)
{
var flag = false;
try
{
var url = $"{_configService.IotWebApiUrl}Device/UpdatePersonInfoCache?imei={imei}";
List<KeyValuePair<string, string>> headers = new()
{
new KeyValuePair<string, string>("AuthKey", "key1")
};
var res = await _httpHelper.HttpToGetAsync(url, headers).ConfigureAwait(false);
_logger.LogInformation($"{imei} 更新缓存{nameof(UpdatePersonInfoCacheAsync)},响应:{res}");
var resJToken = JsonConvert.DeserializeObject(res ?? string.Empty) as JToken;
flag = resJToken?["message"]?.ToString().Equals("ok") ?? false;
}
catch (Exception ex)
{
_logger.LogError($"{nameof(UpdatePersonInfoCacheAsync)} 更新缓存异常:{ex.Message}, {ex.StackTrace}");

}
return flag;


}
*/

}
}

Loading…
Cancel
Save