feat(fulfillment): 增加未命中渠道兜底核销
This commit is contained in:
@@ -11,6 +11,7 @@ export const VOUCHER_CONSUME_CHANNELS = [
|
||||
'manual',
|
||||
'third_party_voucher',
|
||||
'on_account',
|
||||
'unmatched',
|
||||
] as const
|
||||
export type VoucherConsumeChannel = (typeof VOUCHER_CONSUME_CHANNELS)[number]
|
||||
|
||||
@@ -156,6 +157,11 @@ function createDefaultPlatformPolicy(): VoucherPlatformConsumePolicy {
|
||||
mode: 'manual',
|
||||
delaySeconds: 0,
|
||||
},
|
||||
unmatched: {
|
||||
enabled: false,
|
||||
mode: 'after_order_received',
|
||||
delaySeconds: 5,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -199,6 +205,10 @@ function normalizePlatformPolicy(
|
||||
'manual',
|
||||
'after_order_received',
|
||||
]),
|
||||
unmatched: normalizeChannelPolicy(rawChannels.unmatched, fallback.channels.unmatched, [
|
||||
'manual',
|
||||
'after_order_received',
|
||||
]),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user