"refactor(service): 重构服务实例化方式,移除全局变量改用New方法"

This commit is contained in:
1
2025-12-22 14:10:22 +00:00
parent cf7736a3e7
commit c19a268b7b
7 changed files with 13 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ func init() {
&cool.Controller{
Prefix: "/admin/pet/fusionmaterial", // 路由前缀(主表路由+子表名,层级清晰)
Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"}, // 支持的基础CRUD接口
Service: service.PetFusionMaterialServiceIns, // 绑定子表Service
Service: service.NewPetFusionMaterialService(), // 绑定子表Service
},
}
// 注册控制器到框架