fix(billing): 保留规则集未覆盖的基础资源价格
ci / verify (pull_request) Successful in 12m21s
ci / verify (pull_request) Successful in 12m21s
This commit is contained in:
@@ -17,12 +17,16 @@ type EffectiveBillingConfigInput struct {
|
||||
func ResolveEffectiveBillingConfig(input EffectiveBillingConfigInput) map[string]any {
|
||||
config := mergeObjects(input.BaseConfig, nil)
|
||||
if len(input.InheritedRuleSetConfig) > 0 {
|
||||
config = mergeObjects(input.InheritedRuleSetConfig, nil)
|
||||
// Rule sets are allowed to cover only a subset of resource types. Keep
|
||||
// base-model prices for resources that the inherited rule set does not
|
||||
// define, while letting the rule set remain authoritative for matching
|
||||
// top-level keys.
|
||||
config = mergeObjects(config, input.InheritedRuleSetConfig)
|
||||
} else if len(input.LegacyPlatformModelConfig) > 0 {
|
||||
config = mergeObjects(input.LegacyPlatformModelConfig, nil)
|
||||
config = mergeObjects(config, input.LegacyPlatformModelConfig)
|
||||
}
|
||||
if len(input.ModelRuleSetConfig) > 0 {
|
||||
config = mergeObjects(input.ModelRuleSetConfig, nil)
|
||||
config = mergeObjects(config, input.ModelRuleSetConfig)
|
||||
}
|
||||
return mergeObjects(config, input.Override)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user