From a479a077bafcd74f847d1fb12dcce47cb7cf7b51 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 30 Jan 2024 13:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=E6=8C=91=E6=88=98=E9=98=B5=E5=9E=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/arena/api_challenge.go | 2 +- sys/db/dbmodel.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/arena/api_challenge.go b/modules/arena/api_challenge.go index e969cbb2e..00cfdd936 100644 --- a/modules/arena/api_challenge.go +++ b/modules/arena/api_challenge.go @@ -67,7 +67,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge }) if red.Attack != nil { for i, v := range req.Battle.Format { - if (red.Attack.Formt[i] != nil && red.Attack.Formt[i].Id != v) || (red.Attack.Formt[i] == nil && v == "") { + if (red.Attack.Formt[i] != nil && red.Attack.Formt[i].Id != v) || (red.Attack.Formt[i] == nil && v != "") { change = true } } diff --git a/sys/db/dbmodel.go b/sys/db/dbmodel.go index da2e49c6e..c67004564 100644 --- a/sys/db/dbmodel.go +++ b/sys/db/dbmodel.go @@ -399,7 +399,6 @@ func (this *DBModel) ChangeLists(uid string, datas map[string]interface{}, opt . func (this *DBModel) BatchChange(uids []string, datas map[string]interface{}, opt ...DBOption) (err error) { pipe := this.Redis.RedisPipe(context.TODO()) for _, uid := range uids { - if err = pipe.HMSet(this.ukey(uid), datas); err != nil { log.Error("DBModel ChangeList", log.Field{Key: "err", Value: err.Error()}) return