|
|
@@ -281,10 +281,12 @@ namespace HealthMonitor.Service.Biz |
|
|
|
{ |
|
|
|
// 保证实时性,先更新缓存,再更新数据库 |
|
|
|
var personCache = await _personCacheMgr.GetDeviceGpsPersonCacheObjectBySerialNoAsync(new Guid().ToString(), imei).ConfigureAwait(false); |
|
|
|
if (personCache != null |
|
|
|
&& |
|
|
|
string.IsNullOrWhiteSpace(personCache["person"]!["remarks"]!.ToString()) |
|
|
|
) |
|
|
|
|
|
|
|
if (personCache == null) |
|
|
|
{ |
|
|
|
_logger.LogInformation($"Person remarks数据异常,检查缓存和数据库"); |
|
|
|
} |
|
|
|
else if (string.IsNullOrWhiteSpace(personCache["person"]!["remarks"]!.ToString())) |
|
|
|
{ |
|
|
|
var newRemarkData = new |
|
|
|
{ |
|
|
@@ -323,7 +325,7 @@ namespace HealthMonitor.Service.Biz |
|
|
|
person!.Remarks = newRemarkStr; |
|
|
|
await _gpsPersonApiClient.UpdateAsync(person, new RequestHeader() { RequestId = $"{imei}" }).ConfigureAwait(false); |
|
|
|
_logger.LogInformation($"更新Person remarks字段|{person.Remarks}"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@@ -332,10 +334,6 @@ namespace HealthMonitor.Service.Biz |
|
|
|
} |
|
|
|
flag = cacheFlag; |
|
|
|
} |
|
|
|
else if (personCache == null) |
|
|
|
{ |
|
|
|
_logger.LogInformation($"Person remarks数据异常,检查缓存和数据库"); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|