完成气站标准资源全页管理改造

This commit is contained in:
czl231
2026-08-18 00:26:39 +08:00
parent eef791427a
commit 084eccc3ec
51 changed files with 7081 additions and 1141 deletions

View File

@@ -52,3 +52,32 @@ func TestGasOrderRoutesDoNotExposeDownstreamActions(t *testing.T) {
}
}
}
// TestGasReadonlyDetailRoutes 验证所有标准只读资源都支持独立详情页直达。
func TestGasReadonlyDetailRoutes(t *testing.T) {
gin.SetMode(gin.TestMode)
engine := gin.New()
RegisterGas("heqi", engine)
routes := map[string]bool{}
for _, route := range engine.Routes() {
routes[route.Method+" "+route.Path] = true
}
for _, path := range []string{
"/gasorder_contract_product/:identity",
"/gasorder_contract_revision/:identity",
"/product_info/:identity",
"/wallet_basic/:identity",
"/wallet_bank/:identity",
"/payment_order/:identity",
"/wallet_record/:identity",
"/payment_refund/:identity",
"/wallet_apply_cash/:identity",
"/fin_settlement/:identity",
"/fin_reconciliation/:identity",
} {
fullPath := "GET /heqi/gas/v1" + path
if !routes[fullPath] {
t.Fatalf("missing gas detail route %s", fullPath)
}
}
}