All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor(cool): 移除Redis监听功能和用户结构体定义 移除ListenFunc函数,该函数提供Redis PubSub监听功能, 包括自动重连和心跳保活机制。同时删除User结构体定义和 相关有序集合变量,这些功能将由rpc模块替代实现。 feat(rpc): 添加对ListenFunc的调用以处理Redis监听 在login模块中
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
|
|
}
|