From 7e9217e964e06e18e17ac70be1b9283e22656963 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Wed, 26 Apr 2023 16:36:51 +0800 Subject: [PATCH] Update group_op.go --- route/group_r/group_op.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/route/group_r/group_op.go b/route/group_r/group_op.go index 681e899..4aefc40 100644 --- a/route/group_r/group_op.go +++ b/route/group_r/group_op.go @@ -14,6 +14,7 @@ import ( "git.hilo.cn/hilo-common/utils" "github.com/gin-gonic/gin" uuid "github.com/satori/go.uuid" + "github.com/spf13/cast" "gorm.io/gorm" "hilo-group/_const/enum/diamond_e" "hilo-group/_const/enum/group_e" @@ -1819,9 +1820,9 @@ func GroupIn(c *gin.Context) (*mycontext.MyContext, error) { } // 判断是否需要执行游戏逻辑 if enterType != "" && gameCode != "" { - traceId := c.Writer.Header().Get(mycontext.TRACEID) + traceId, _ := c.Get(mycontext.TRACEID) token := c.Writer.Header().Get(mycontext.TOKEN) - err := game_c.SetAutoMathEnterRoom(userId, gi.ImGroupId, traceId, token, enterType, gameCode) + err := game_c.SetAutoMathEnterRoom(userId, gi.ImGroupId, cast.ToString(traceId), token, enterType, gameCode) if err != nil { model.Log.Errorf("GroupIn cache.SetAutoMathEnterRoom userId:%v, imGroupId:%v, err:%v", userId, gi.ImGroupId, err) } -- 2.22.0