refactor wallet domain management

This commit is contained in:
david
2026-07-28 09:25:49 +08:00
parent 8d71a1fc08
commit 8c6d52cf8c
20 changed files with 606 additions and 68 deletions

View File

@@ -166,7 +166,7 @@ func TestPlatformFinanceContentRoutesFollowTheirContracts(t *testing.T) {
}
for _, resource := range []string{
"/wallet/wallet", "/wallet/wallet_ledger", "/wallet/wallet_recharge", "/wallet/wallet_withdrawal",
"/wallet_basic", "/wallet_bank", "/wallet_payment", "/wallet_record", "/wallet_refund", "/wallet_apply_cash",
} {
path := "/heqi/platform/v1" + resource
assertRouteMethods(t, routes, path, http.MethodGet)
@@ -177,6 +177,19 @@ func TestPlatformFinanceContentRoutesFollowTheirContracts(t *testing.T) {
}
}
}
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/:identity/status", http.MethodPatch)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/:identity/recharge", http.MethodPost)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/owner/:owner_type/:owner_identity", http.MethodGet)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_apply_cash/:identity/approve", http.MethodPost)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_apply_cash/:identity/reject", http.MethodPost)
for _, oldPath := range []string{
"/heqi/platform/v1/wallet/wallet",
"/heqi/platform/v1/wallet/wallet_ledger",
"/heqi/platform/v1/wallet/wallet_recharge",
"/heqi/platform/v1/wallet/wallet_withdrawal",
} {
assertNoRouteMethods(t, routes, oldPath, http.MethodGet, http.MethodPost, http.MethodPut, http.MethodPatch, http.MethodDelete)
}
for _, resource := range []string{
"/content/cnt_content", "/notification/ntf_template",