上传世界任务变化

This commit is contained in:
liwei 2023-07-27 15:57:34 +08:00
parent 0d07d92df5
commit a05d0c235f

View File

@ -58,6 +58,16 @@ func (this *apiComp) Exchange(session comm.IUserSession, req *pb.WTaskExchangeRe
return return
} }
info.Exchange[req.Eid]++ 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}) session.SendMsg(string(this.module.GetType()), "exchange", &pb.WTaskExchangeReq{Eid: req.Eid})
return return
} }