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
@@ -70,7 +70,7 @@ export function costModelAppliesTo(costModel: string, channel: string) {
if (costModel === 'affiliate_purchase') return channel === 'affiliate_dash'
if (costModel === 'work_order_reward') return channel === 'work_order'
if (costModel === 'third_party_voucher_cost') return channel === 'third_party_voucher'
if (costModel === 'manual_actual') return channel === 'manual'
if (costModel === 'manual_actual') return channel === 'manual' || channel === 'on_account'
return false
}
@@ -88,7 +88,7 @@ export function costModelScopeSql(channelExpression: string): string {
OR (ci.cost_model = 'third_party_voucher_cost'
AND ${channelExpression} = 'third_party_voucher')
OR (ci.cost_model = 'manual_actual'
AND ${channelExpression} = 'manual')
AND ${channelExpression} IN ('manual', 'on_account'))
)`
}