feat(fulfillment): 增加统一结算与多渠道人工履约

This commit is contained in:
yml2213
2026-11-05 16:14:56 +08:00
parent 548070c2ad
commit 4e83dbb84c
43 changed files with 1582 additions and 334 deletions
@@ -10,6 +10,7 @@ export const VOUCHER_CONSUME_CHANNELS = [
'work_order',
'manual',
'third_party_voucher',
'on_account',
] as const
export type VoucherConsumeChannel = (typeof VOUCHER_CONSUME_CHANNELS)[number]
@@ -150,6 +151,11 @@ function createDefaultPlatformPolicy(): VoucherPlatformConsumePolicy {
mode: 'after_order_received',
delaySeconds: 5,
},
on_account: {
enabled: false,
mode: 'manual',
delaySeconds: 0,
},
},
}
}
@@ -189,6 +195,10 @@ function normalizePlatformPolicy(
fallback.channels.third_party_voucher,
['manual', 'after_order_received'],
),
on_account: normalizeChannelPolicy(rawChannels.on_account, fallback.channels.on_account, [
'manual',
'after_order_received',
]),
},
}
}