feat(config): 添加服务器调试模式配置和塔配置重构 - 在ServerList结构体中添加IsDebug字段用于调试模式标识 - 修改GetServerInfoList函数增加isdebug参数支持 - 移除硬编码的rpcaddr本地地址配置 - 重构塔配置模型,将tower_500和tower_600合并到tower_110
33 lines
488 B
Go
33 lines
488 B
Go
package service
|
|
|
|
import (
|
|
"blazing/cool"
|
|
"blazing/modules/config/model"
|
|
)
|
|
|
|
type BossService struct {
|
|
*cool.Service
|
|
}
|
|
|
|
func NewBossService() *BossService {
|
|
return &BossService{
|
|
&cool.Service{
|
|
Model: model.NewBossConfig(),
|
|
PageQueryOp: &cool.QueryOp{
|
|
KeyWordField: []string{"desc"},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
func (s *BossService) Get(id uint32) *model.BossConfig {
|
|
if id == 0 {
|
|
return nil
|
|
}
|
|
var item *model.BossConfig
|
|
dbm(s.Model).Where("id", id).Scan(&item)
|
|
|
|
return item
|
|
|
|
}
|