diff --git a/route/group_r/group_op.go b/route/group_r/group_op.go index 681e899460135484a1d7b97e17d9d445bd668466..4aefc400565e1a306257914f870e6eed7db585a2 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) }