34 lines
920 B
Go
34 lines
920 B
Go
package controller
|
|
|
|
import (
|
|
"blazing/common/rpc"
|
|
"blazing/common/socket/errorcode"
|
|
"blazing/logic/service/user"
|
|
"blazing/modules/base/service"
|
|
|
|
"github.com/panjf2000/gnet/v2"
|
|
)
|
|
|
|
// var sg singleflight.Group
|
|
|
|
// var ServerList []rpc.ServerInfo
|
|
|
|
// func fetchData() (any, error) {
|
|
// ServerList = rpc.GetServerInfoList() //todo 待修改增加缓存
|
|
// return ServerList, nil
|
|
// }
|
|
|
|
// GetServerOnline 处理命令: 105
|
|
func (h Controller) GetServerOnline(data *user.SidInfo, c gnet.Conn) (result *rpc.CommendSvrInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
|
|
result = rpc.NewInInfo()
|
|
|
|
// if service.NewBaseSysUserService().GetPerson(data.Head.UserID).Debug == 1 {
|
|
// result.IsVip = 1
|
|
// }
|
|
result.IsVip = 1
|
|
result.ServerList = rpc.GetServerInfoList(service.NewBaseSysUserService().GetPerson(data.Head.UserID).Debug)
|
|
return
|
|
|
|
//return //TODO 这里待实现改成接口调用Ret方法
|
|
}
|