29 lines
670 B
Go
29 lines
670 B
Go
package practice
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.PracticeInfoReq) (code pb.ErrorCode) {
|
|
|
|
return
|
|
}
|
|
|
|
///练功请求
|
|
func (this *apiComp) Info(session comm.IUserSession, req *pb.PracticeInfoReq) (code pb.ErrorCode, data proto.Message) {
|
|
var (
|
|
err error
|
|
room *pb.DBPracticeRoom
|
|
)
|
|
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
|
code = pb.ErrorCode_DBError
|
|
return
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "info", &pb.PracticeInfoResp{Info: room})
|
|
return
|
|
}
|