28 lines
503 B
Go
28 lines
503 B
Go
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_enable(s.Model).Where("type", flag).Scan(&config)
|
|
return config
|
|
|
|
}
|