2025-12-08 00:17:04 +08:00
|
|
|
package service
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/cool"
|
2025-12-21 17:18:33 +00:00
|
|
|
"blazing/modules/config/model"
|
2025-12-08 00:17:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type EffectService struct {
|
|
|
|
|
*cool.Service
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *EffectService) Args(id uint32) (int, []int) {
|
2026-02-14 23:14:43 +08:00
|
|
|
m := dbm_notenable(s.Model).Where("se_idx", id)
|
2025-12-15 05:39:11 +08:00
|
|
|
var tt model.PlayerPetSpecialEffect
|
|
|
|
|
m.Scan(&tt)
|
2025-12-08 00:17:04 +08:00
|
|
|
|
2025-12-08 19:31:59 +08:00
|
|
|
return int(tt.Eid), tt.Args
|
2025-12-08 00:17:04 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
func NewEffectService() *EffectService {
|
|
|
|
|
return &EffectService{
|
|
|
|
|
&cool.Service{
|
2025-12-15 05:39:11 +08:00
|
|
|
|
2026-01-01 01:34:36 +08:00
|
|
|
Model: model.NewPlayerPetSpecialEffect(),
|
|
|
|
|
UniqueKey: map[string]string{"idx_se_idx": "索引不能重复"},
|
|
|
|
|
PageQueryOp: &cool.QueryOp{
|
|
|
|
|
KeyWordField: []string{"desc"},
|
|
|
|
|
},
|
2025-12-08 00:17:04 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|