爬塔奖励领取

This commit is contained in:
meixiongfeng 2023-11-28 17:26:36 +08:00
parent 8e44899d3c
commit bb24e0943b

View File

@ -3,6 +3,7 @@ package pagoda
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
) )
//参数校验 //参数校验
@ -20,13 +21,23 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
var ( var (
atno []*pb.UserAtno atno []*pb.UserAtno
pagoda *pb.DBPagoda
err error
_cfg *cfg.GamePagodaTaskRewardData
) )
if errdata = this.GetRewardCheck(session, req); errdata != nil { if errdata = this.GetRewardCheck(session, req); errdata != nil {
return // 参数校验失败直接返回 return // 参数校验失败直接返回
} }
if pagoda, err := this.module.modelPagoda.getPagodaList(session.GetUserId()); err != nil { if pagoda, err = this.module.modelPagoda.getPagodaList(session.GetUserId()); err != nil {
_cfg, err := this.module.configure.GetPagodaRewardconfig(req.Id) errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
_cfg, err = this.module.configure.GetPagodaRewardconfig(req.Id)
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, Code: pb.ErrorCode_ConfigNoFound,
@ -70,6 +81,6 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PagodaGetRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PagodaGetRewardReq", atno)
}) })
}
return return
} }