mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
- payment_service: split GetDashboardStats (131→35 lines) into 4 sub-functions, extract applyPagination helper, replace bubble sort with sort.Slice, use sync.Once for EnsureProviders, define magic number constants - providers: merge duplicate PC/Mobile functions in alipay/wxpay, extract loadKeyPair/queryOrderTotalFen in wxpay, add centsToYuan in stripe, define constants for success codes, currencies, event types - handlers: extract requireAuth and parseIDParam helpers to eliminate repeated auth/ID-parsing boilerplate - registry: remove dead seen map in GetProviderByKey - types: centralize order status constants in payment package - load_balancer+config_service: unify duplicated containsType into exported InstanceSupportsType function