2025-12-21 17:18:33 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/cool"
|
2025-12-25 20:49:54 +08:00
|
|
|
"blazing/modules/config/model"
|
2025-12-21 17:18:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type BossService struct {
|
|
|
|
|
*cool.Service
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewBossService() *BossService {
|
|
|
|
|
return &BossService{
|
|
|
|
|
&cool.Service{
|
|
|
|
|
Model: model.NewBossConfig(),
|
2026-01-01 05:32:56 +08:00
|
|
|
PageQueryOp: &cool.QueryOp{
|
|
|
|
|
KeyWordField: []string{"desc"},
|
|
|
|
|
},
|
2025-12-21 17:18:33 +00:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-01 05:32:56 +08:00
|
|
|
|
|
|
|
|
func (s *BossService) Get(id uint32) *model.BossConfig {
|
|
|
|
|
if id == 0 {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
var item *model.BossConfig
|
2026-01-08 23:57:22 +08:00
|
|
|
dbm(s.Model).Where("id", id).Scan(&item)
|
2026-01-01 05:32:56 +08:00
|
|
|
|
|
|
|
|
return item
|
|
|
|
|
|
|
|
|
|
}
|