31 lines
413 B
Go
31 lines
413 B
Go
|
|
package service
|
||
|
|
|
||
|
|
import (
|
||
|
|
"blazing/cool"
|
||
|
|
"blazing/modules/player/model"
|
||
|
|
)
|
||
|
|
|
||
|
|
type PVPService struct {
|
||
|
|
BaseService
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewPVPService(id uint32) *PVPService {
|
||
|
|
return &PVPService{
|
||
|
|
|
||
|
|
BaseService: BaseService{userid: id,
|
||
|
|
|
||
|
|
Service: &cool.Service{Model: model.NewPVP()},
|
||
|
|
},
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
func (s *PVPService) Get(userid uint32) (ret *model.PVP) {
|
||
|
|
|
||
|
|
//todo待测试
|
||
|
|
|
||
|
|
m := s.dbm_fix(s.Model)
|
||
|
|
|
||
|
|
m.Scan(&ret)
|
||
|
|
return
|
||
|
|
}
|