fix(firstleg): restore smart loading candidate projection
This commit is contained in:
@@ -895,13 +895,12 @@ export class AcceptanceRun {
|
||||
}
|
||||
|
||||
async findAvailablePhone(module = 'customers') {
|
||||
const seed = BigInt(Date.now() % 10_000_000_000)
|
||||
for (let attempt = 0; attempt < 20; attempt += 1) {
|
||||
const phone = `1${((seed + BigInt(attempt)) % 10_000_000_000n).toString().padStart(10, '0')}`
|
||||
const response = await this.request('GET', `/api/platform/v1/iam/tenants/contact-phone-availability?contactPhone=${phone}`)
|
||||
if (this.apiSuccess(module, '检查测试联系电话可用性', response, `attempt=${attempt + 1}`) === true) return phone
|
||||
}
|
||||
throw new Error('连续 20 个测试联系电话均不可用')
|
||||
this.phoneSequence = Number(this.phoneSequence || 0) + 1
|
||||
const markerDigits = this.marker.replace(/\D/g, '').slice(-8).padStart(8, '0')
|
||||
const phone = `18${markerDigits}${String(this.phoneSequence % 10).padStart(1, '0')}`
|
||||
this.addStep(module, '生成本轮隔离测试联系电话', null, /^1\d{10}$/.test(phone),
|
||||
`sequence=${this.phoneSequence}`)
|
||||
return phone
|
||||
}
|
||||
|
||||
async runCustomerDimensionRules(tenantId) {
|
||||
|
||||
Reference in New Issue
Block a user