2025-12-08 19:31:59 +08:00
|
|
|
package service
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/cool"
|
2025-12-21 17:18:33 +00:00
|
|
|
"blazing/modules/config/model"
|
2025-12-08 19:31:59 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type TalkConfigService struct {
|
|
|
|
|
*cool.Service
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewTalkConfigService() *TalkConfigService {
|
|
|
|
|
return &TalkConfigService{
|
|
|
|
|
|
2025-12-15 05:39:11 +08:00
|
|
|
Service: &cool.Service{Model: model.NewMineralCollectionConfig()},
|
|
|
|
|
// Cache: gcache.New()},
|
2025-12-08 19:31:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2025-12-08 21:11:12 +08:00
|
|
|
|
2025-12-22 19:04:16 +08:00
|
|
|
func (s *TalkConfigService) GetCache(flag int) model.MineralCollectionConfig {
|
2025-12-09 00:09:51 +08:00
|
|
|
|
2025-12-22 19:04:16 +08:00
|
|
|
var config model.MineralCollectionConfig
|
2026-01-08 23:57:22 +08:00
|
|
|
dbm(s.Model).Where("type", flag).Scan(&config)
|
2025-12-15 05:39:11 +08:00
|
|
|
return config
|
2025-12-08 21:11:12 +08:00
|
|
|
|
|
|
|
|
}
|