新增:半自动履约工作台与虎牙客户授权流程
- 新增 153 半自动履约迁移、后台任务接口与客户履约接口 - 接入虎牙 Connector 登录会话、绑定与一次性 CK 注入票据 - 新增后台半自动履约页面和客户履约入口 - 完善手工履约配置、成本确认事务与运行时连接器配置 - 同步权威文档、环境示例、部署脚本和迁移展示逻辑
This commit is contained in:
@@ -66,10 +66,19 @@ test('人工确认必须单事务:扣款与快照同事务,且使用 with-cl
|
||||
const end = source.indexOf('async function resolveFundAccountId')
|
||||
const body = source.slice(start, end)
|
||||
|
||||
assert.ok(body.includes('withTransaction('), '人工确认必须包在事务里')
|
||||
const executeStart = body.indexOf('const execute = async (client: PoolClient)')
|
||||
const executeEnd = body.indexOf('const result = options.client', executeStart)
|
||||
const transactionalBody = body.slice(executeStart, executeEnd)
|
||||
assert.ok(executeStart >= 0 && executeEnd > executeStart, '人工确认必须抽出事务执行体')
|
||||
assert.ok(
|
||||
body.indexOf('withTransaction(') < body.indexOf('writeFundExpense(client'),
|
||||
'备用金扣款必须在同一事务内执行',
|
||||
body.includes(
|
||||
'options.client ? await execute(options.client) : await withTransaction(execute)',
|
||||
),
|
||||
'默认路径必须包在事务里,外部事务必须复用调用方 client',
|
||||
)
|
||||
assert.ok(
|
||||
transactionalBody.includes('writeFundExpense(client'),
|
||||
'备用金扣款必须在调用方事务内执行',
|
||||
)
|
||||
assert.ok(
|
||||
body.includes('consumePlatformCreditWithClient(client'),
|
||||
|
||||
Reference in New Issue
Block a user