diff --git a/route/group_r/group_op.go b/route/group_r/group_op.go index f3839ac999fc7ce02d46f22ffb5fdd018b9779e3..4502ac1ddb94efee372ce95e9a9ed83a78543a31 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" @@ -1812,9 +1813,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) }