Files
bl/modules/config/service/map_model.go
昔念 1b6586aedc
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(space): 添加地图模型配置支持并优化BOSS信息结构

添加MapModel字段到MapBossInfo结构体中,用于存储更完整的BOSS模型数据,
修改初始化逻辑从新的MapModel服务获取数据,并更新HP恢复逻辑使用新模型数据。

同时优化MapNode配置表结构,移除冗余字段并调整数据查询逻辑,
将IsBroadcast字段类型改为uint32以
2026-04-01 06:27:03 +08:00

29 lines
524 B
Go

package service
import (
"blazing/cool"
"blazing/modules/config/model"
)
type MapmodelService struct {
*cool.Service
}
func NewMapmodelService() *MapmodelService {
return &MapmodelService{
&cool.Service{
Model: model.NewMapModel(),
PageQueryOp: &cool.QueryOp{
KeyWordField: []string{"remake"},
FieldEQ: []string{"map_id"},
},
},
}
}
func (s *MapmodelService) GetDataByModelId(modelid uint32) (ret *model.MapModel) {
dbm_notenable(s.Model).Where("model_id", modelid).Scan(&ret)
return
}