Merge branch 'S06' into test

This commit is contained in:
hardstylewyl 2025-01-14 18:05:56 +08:00
commit f857f66938

View File

@ -392,9 +392,14 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
//todo-test:根据code和比较字段值分组,在每组里选出一个创建时间最新的 //todo-test:根据code和比较字段值分组,在每组里选出一个创建时间最新的
foreach (var x in body.Data) foreach (var x in body.Data)
{ {
var code = ((JsonElement) x["code"]!).GetString()!; var code = string.Empty;
var dateStr = ((JsonElement) x["date"]!).GetString()!; var dateStr = string.Empty;
var key = string.Empty; var key = string.Empty;
if (x["code"] is JsonElement codeEl) code = codeEl.GetString()!;
else code = x["code"]!.ToString();
if (x["date"] is JsonElement dateEl) dateStr = dateEl.GetString()!;
else dateStr = x["date"]!.ToString();
if (string.IsNullOrWhiteSpace(compareFields)) if (string.IsNullOrWhiteSpace(compareFields))
key = code; key = code;
else else
@ -444,7 +449,6 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
} }
//todo-test:按推送映射顺序排序 //todo-test:按推送映射顺序排序
} }
log.PushContent = TextJsonHelper.Serialize(body)!; log.PushContent = TextJsonHelper.Serialize(body)!;