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

36 lines
554 B
Go
Raw Normal View History

package service
import (
"blazing/cool"
"blazing/modules/config/model"
"github.com/gogf/gf/v2/database/gdb"
)
type EffectService struct {
*cool.Service
}
func (s *EffectService) Args(id uint32) (int, []int) {
m := cool.DBM(s.Model).Where("se_idx", id).Cache(gdb.CacheOption{
//Duration: time.Hour,
Force: false,
})
var tt model.PlayerPetSpecialEffect
m.Scan(&tt)
return int(tt.Eid), tt.Args
}
func NewEffectService() *EffectService {
return &EffectService{
&cool.Service{
Model: model.NewPlayerPetSpecialEffect(),
},
}
}