From e9962f1b74040886fbaf25d5797e87bbb110c483 Mon Sep 17 00:00:00 2001 From: ayflying Date: Fri, 25 Apr 2025 11:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9act=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8F=96=E5=87=BA=E7=9A=84=E6=97=B6=E5=80=99=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=B3=9B=E5=9E=8B=E5=A4=8D=E5=88=B6=E8=80=8C=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=E8=BD=AC=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/gameAct/gameAct.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/logic/gameAct/gameAct.go b/internal/logic/gameAct/gameAct.go index d7c35b5..d77f498 100644 --- a/internal/logic/gameAct/gameAct.go +++ b/internal/logic/gameAct/gameAct.go @@ -9,6 +9,7 @@ import ( service2 "github.com/ayflying/utility_go/service" "github.com/ayflying/utility_go/tools" "github.com/gogf/gf/v2/container/gset" + "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gctx" "github.com/gogf/gf/v2/os/gtime" @@ -63,8 +64,11 @@ func (s *sGameAct) Info(uid int64, actId int) (data *g.Var, err error) { Uid: uid, ActId: actId, }).Fields("action").OrderDesc("updated_at").Value() - getDb.Scan(&data) - + //getDb.Scan(&data) + if getDb == nil || getDb.IsEmpty() { + return + } + data = gvar.New(getDb) if data == nil || data.IsEmpty() { return }