36 lines
859 B
Go
36 lines
859 B
Go
package addrecharge
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
// 参数校验
|
|
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.AddRechargeInfoReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
// /获取自己的排行榜信息
|
|
func (this *apiComp) Info(session comm.IUserSession, req *pb.AddRechargeInfoReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
info *pb.DBAddRecharge
|
|
err error
|
|
)
|
|
if errdata = this.InfoCheck(session, req); errdata != nil {
|
|
return
|
|
}
|
|
|
|
if info, err = this.module.modelRecharge.getUserDTasks(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.AddRechargeInfoResp{Record: info.Record, Integral: info.Integral})
|
|
return
|
|
}
|