From 184c640595b085ede9431feddcf81fe78eb6311d Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 2 Feb 2024 20:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E9=A2=86=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/arena/api_danreceive.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/arena/api_danreceive.go b/modules/arena/api_danreceive.go index 3cf1514c5..d23450392 100644 --- a/modules/arena/api_danreceive.go +++ b/modules/arena/api_danreceive.go @@ -64,6 +64,17 @@ func (this *apiComp) DanReceive(session comm.IUserSession, req *pb.ArenaDanRecei } return } - session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.ArenaDanReceiveResp{Dan: req.Dan, Award: atno}) + if err = this.module.modelArena.Change(session.GetUserId(), map[string]interface{}{ + "danaward": info.Danaward, + }); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + session.SendMsg(string(this.module.GetType()), "danreceive", &pb.ArenaDanReceiveResp{Dan: req.Dan, Award: atno}) return }