优化结构
This commit is contained in:
@@ -243,7 +243,11 @@ func validateCommunicationIntegrationConfig(kind, provider string, values map[st
|
||||
return errors.New("不支持的通信集成")
|
||||
}
|
||||
for _, field := range definition.Fields {
|
||||
if field.Required && integrationText(values, field.Key) == "" {
|
||||
value := integrationText(values, field.Key)
|
||||
if provider == bizpayment.PaymentDouyin && field.Key == "platform_serial_no" {
|
||||
value = integrationFirst(values, "platform_serial_no", "platform_cert_serial")
|
||||
}
|
||||
if field.Required && value == "" {
|
||||
return fmt.Errorf("%s 缺少配置字段 %s", provider, field.Key)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user