Files
bl/logic/controller/login_getserver.go
昔念 54e0649313 ```
feat: 添加WebSSH功能并重构塔服务

- 添加WebSSH中间件,支持通过
2026-01-09 00:43:06 +08:00

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方法
}