优化结构

This commit is contained in:
Yvan
2026-08-21 00:10:27 +08:00
parent 746e33e027
commit 361a562f75
334 changed files with 382 additions and 379 deletions
@@ -0,0 +1,23 @@
package payment
import "kra/app/system/internal/utils/paymentutil"
func text(values map[string]any, key string) string {
value, _ := values[key].(string)
return value
}
func firstAny(values map[string]any, keys ...string) string {
for _, key := range keys {
if value, ok := values[key].(string); ok && value != "" {
return value
}
}
return ""
}
// configuredInt64 keeps repository-side validation independent from the
// provider adapter package while sharing the canonical payment parser.
func configuredInt64(values map[string]any, key string, fallback int64) int64 {
return paymentutil.ConfiguredInt64(values, key, fallback)
}