优化结构

This commit is contained in:
Yvan
2026-08-28 16:56:10 +08:00
parent 6f9908d926
commit b370089942
11 changed files with 65 additions and 49 deletions
@@ -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)
}
}