From a05d0c235fa8008554220eda40d151cf8dec4e1b Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Thu, 27 Jul 2023 15:57:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=B8=96=E7=95=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/wtask/api_exchange.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/wtask/api_exchange.go b/modules/wtask/api_exchange.go index 9712f53c2..d86cc33bc 100644 --- a/modules/wtask/api_exchange.go +++ b/modules/wtask/api_exchange.go @@ -58,6 +58,16 @@ func (this *apiComp) Exchange(session comm.IUserSession, req *pb.WTaskExchangeRe return } info.Exchange[req.Eid]++ + if err = this.module.modelwtask.Change(session.GetUserId(), map[string]interface{}{ + "exchange": info.Exchange, + }); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } session.SendMsg(string(this.module.GetType()), "exchange", &pb.WTaskExchangeReq{Eid: req.Eid}) return }