34 lines
838 B
Go
34 lines
838 B
Go
package dreamwarorder
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
// 参数校验
|
|
func (this *apiComp) BuyLvCheck(session comm.IUserSession, req *pb.DreamWarorderBuyLvReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
// /获取自己的排行榜信息
|
|
func (this *apiComp) BuyLv(session comm.IUserSession, req *pb.DreamWarorderBuyLvReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
info *pb.DBDreamWarorder
|
|
err error
|
|
)
|
|
if errdata = this.BuyLvCheck(session, req); errdata != nil {
|
|
return
|
|
}
|
|
if info, err = this.module.model.getUserDreamwarorder(session.GetUserId()); err != nil {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_DBError,
|
|
Title: pb.ErrorCode_DBError.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "info", &pb.DreamWarorderBuyLvResp{Info: info})
|
|
return
|
|
}
|