35 lines
913 B
Go
35 lines
913 B
Go
package realarena
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
"go_dreamfactory/sys/configure"
|
|
)
|
|
|
|
// 参数校验
|
|
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.RealArenaInfoReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
//获取基础信息
|
|
func (this *apiComp) Info(session comm.IUserSession, req *pb.RealArenaInfoReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
info *pb.DBRealArena
|
|
err error
|
|
)
|
|
|
|
if info, err = this.module.model.getinfo(session); err != nil {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_ReqParameterError,
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
if configure.Now().Unix() > this.module.model.whichissue.Currendtime {
|
|
this.module.model.computeWhich()
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "info", &pb.RealArenaInfoResp{Info: info, Opentime: this.module.model.whichissue.Curropentime, Endtime: this.module.model.whichissue.Currendtime})
|
|
return
|
|
}
|