合并 main:同步聊天、风控诊断与迁移基线
This commit is contained in:
commit
a6c0d36ee9
89 files changed
+2974
-365
No files matched your search
@@ -262,18 +262,19 @@ func TestParseMessageIDFromJSON(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestExtractMessageID 优先 bizTag,其次 extJson,无则空。
|
||||
// TestExtractMessageID 优先实时消息的 PNM ID,其次兼容 bizTag/extJson,无则空。
|
||||
func TestExtractMessageID(t *testing.T) {
|
||||
if // got 保存got,供当前处理流程使用
|
||||
got := extractMessageID(map[string]any{
|
||||
"1": map[string]any{
|
||||
"3": "4263141580162.PNM",
|
||||
"10": map[string]any{
|
||||
"bizTag": `{"messageId":"biz-id"}`,
|
||||
"extJson": `{"messageId":"ext-id"}`,
|
||||
},
|
||||
},
|
||||
}); got != "biz-id" {
|
||||
t.Errorf("bizTag 优先: got %q", got)
|
||||
}); got != "4263141580162.PNM" {
|
||||
t.Errorf("PNM 优先: got %q", got)
|
||||
}
|
||||
if // got 保存got,供当前处理流程使用
|
||||
got := extractMessageID(map[string]any{
|
||||
|
||||
Reference in new issue
Block a user