Files
bl/modules/config/service/talkconfig.go

28 lines
496 B
Go
Raw Normal View History

package service
import (
"blazing/cool"
"blazing/modules/config/model"
)
type TalkConfigService struct {
*cool.Service
}
func NewTalkConfigService() *TalkConfigService {
return &TalkConfigService{
Service: &cool.Service{Model: model.NewMineralCollectionConfig()},
// Cache: gcache.New()},
}
}
func (s *TalkConfigService) GetCache(flag int) model.MineralCollectionConfig {
var config model.MineralCollectionConfig
dbm(s.Model).Where("type", flag).Scan(&config)
return config
}