From dc3a8cc05c66d6527d4330cc970c56bec6d7441c Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Wed, 23 Nov 2022 20:52:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_getreward.go | 5 +++-- modules/rtask/module.go | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/friend/api_cross_getreward.go b/modules/friend/api_cross_getreward.go index 0740363b3..d9e489416 100644 --- a/modules/friend/api_cross_getreward.go +++ b/modules/friend/api_cross_getreward.go @@ -37,8 +37,9 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar return } - if code = this.moduleFriend.DispenseRes(session, this.moduleFriend.globalConf.FriendPeize, true); code != pb.ErrorCode_Success { - this.moduleFriend.Error("好友领奖励", log.Fields{"uid": uid, "reward": this.moduleFriend.globalConf.FriendPeize, "code": code}) + globalConf := this.moduleFriend.configure.GetGlobalConf() + if code = this.moduleFriend.DispenseRes(session, globalConf.FriendPeize, true); code != pb.ErrorCode_Success { + this.moduleFriend.Error("好友领奖励", log.Fields{"uid": uid, "reward": globalConf.FriendPeize, "code": code}) return } diff --git a/modules/rtask/module.go b/modules/rtask/module.go index d57c569af..b43def226 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -174,7 +174,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() { comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53, comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60, - comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72,comm.Rtype104: + comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype104: this.registerVerifyHandle(v.Id, &rtaskCondi{ cfg: typeCfg, find: this.modelRtaskRecord.lessEqualFirstParam, @@ -188,7 +188,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() { verify: this.modelRtask.verifyRtype20, update: this.modelRtaskRecord.overrideUpdate, }) - case comm.Rtype22,comm.Rtype109: + case comm.Rtype22, comm.Rtype109: this.registerVerifyHandle(v.Id, &rtaskCondi{ cfg: typeCfg, find: this.modelRtaskRecord.equalFirstParam, @@ -263,11 +263,13 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T } if v.find == nil { + this.Warn("未设置find Handle", log.Fields{"uid": uid, "condiId": codi.Id}) return } + if condiId, err = v.find(v.cfg, params...); condiId == 0 { if err != nil { - this.Warn(errors.WithMessage(err, uid).Error(), log.Fields{}) + this.Warnln(errors.WithMessage(err, uid).Error()) } } else { condis = append(condis, v)