refactor(service): 统一服务实例调用方式

将多个模块中手动创建服务实例的方式替换为全局单例模式,
包括 PetFusionService、PetFusionMaterialService 和 EffectService。
同时修改了相关调用代码以适配新的服务引用方式。

此外,重构了 talk 模块的数据结构与逻辑实现,
优化了挖矿次数检查及更新机制。
```
This commit is contained in:
2025-12-08 19:50:54 +08:00
parent 0acf01cd6b
commit 1436cc0117
8 changed files with 54 additions and 17 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.NewPetFusionMaterialService(), // 绑定子表Service
Service: service.PetFusionMaterialServiceIns, // 绑定子表Service
},
}
// 注册控制器到框架