修复 lewan 发货后 claim 轮询换号污染绑定与 UID 展示
发货成功时写入 shipped 身份快照,并冻结绑定资源变更;后台 UID 匹配优先使用发货快照,避免误报不一致。
This commit is contained in:
@@ -90,6 +90,7 @@ test('buildClaimIdentityAdminSummary reports match state', () => {
|
||||
assert.equal(summary.uidMatched, true)
|
||||
assert.equal(summary.compatibilityMode, 'uid')
|
||||
assert.equal(summary.boundUid, '10001')
|
||||
assert.equal(summary.displaySource, 'live')
|
||||
})
|
||||
|
||||
test('buildClaimIdentityAdminSummary marks legacy without uid', () => {
|
||||
@@ -97,4 +98,36 @@ test('buildClaimIdentityAdminSummary marks legacy without uid', () => {
|
||||
assert.equal(summary.ready, false)
|
||||
assert.equal(summary.compatibilityMode, 'legacy_no_uid')
|
||||
assert.equal(summary.uidMatched, null)
|
||||
assert.equal(summary.displaySource, 'live')
|
||||
})
|
||||
|
||||
test('buildClaimIdentityAdminSummary prefers shipped snapshot after dispatch pollution', () => {
|
||||
const summary = buildClaimIdentityAdminSummary(
|
||||
{
|
||||
claimIdentity: { expectedUid: '3781015014', submittedAt: 't', source: 'claim_page' },
|
||||
},
|
||||
{
|
||||
flowLike: {
|
||||
dispatch: { status: 'success', dispatchAt: '2026-07-16T06:25:13.000Z' },
|
||||
shipped: {
|
||||
expectedUid: '3781015014',
|
||||
roleId: '3781015014',
|
||||
roleName: 'l迈',
|
||||
vnId: 189363,
|
||||
vnPhone: '18641685924',
|
||||
dispatchedAt: '2026-07-16T06:25:13.000Z',
|
||||
},
|
||||
// 发货后换号污染:当前绑定已变成别的角色
|
||||
binding: { roleId: '3805904834', roleName: '他爆炸' },
|
||||
role: { rid: '3805904834', name: '他爆炸' },
|
||||
},
|
||||
},
|
||||
)
|
||||
assert.equal(summary.displaySource, 'shipped')
|
||||
assert.equal(summary.boundUid, '3781015014')
|
||||
assert.equal(summary.boundRoleName, 'l迈')
|
||||
assert.equal(summary.uidMatched, true)
|
||||
assert.equal(summary.shippedUid, '3781015014')
|
||||
assert.match(summary.note, /已发货/)
|
||||
assert.match(summary.note, /当前虚拟号角色已变化/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user