diff --git a/domain/cache/game_c/game.go b/domain/cache/game_c/game.go index aa23dbb470ad536dd317efef079155f7144ca5e7..a8f212fbeb6a0948f060db879bc2314d79e76142 100644 --- a/domain/cache/game_c/game.go +++ b/domain/cache/game_c/game.go @@ -21,7 +21,7 @@ type gameAutoJoinMsg struct { func SetAutoMathEnterRoom(userId uint64, imGroupId, traceId, token, enterType, gameCode, is1V1, gameMode, is1V1Robot string) error { key := game_e.GetAutoMathEnterRoom(userId, imGroupId) - mylogrus.MyLog.Infof("Start1V1AfterEnterRoom is1V1Robot:%d, userId:%d, imGroupId:%v", is1V1Robot, userId, imGroupId) + mylogrus.MyLog.Infof("Start1V1AfterEnterRoom is1V1Robot:%s, userId:%d, imGroupId:%v", is1V1Robot, userId, imGroupId) info := gameAutoJoinMsg{traceId, token, enterType, gameCode, is1V1, gameMode, is1V1Robot} data, err := json.Marshal(info) if err != nil { diff --git a/route/group_r/group_op.go b/route/group_r/group_op.go index cafd44ba589521ad741eb1c342d1aa9b2a84cb7a..10f99df0c6cfb2a4dd503c90688c120d5d610e23 100644 --- a/route/group_r/group_op.go +++ b/route/group_r/group_op.go @@ -1893,7 +1893,7 @@ func GroupIn(c *gin.Context) (*mycontext.MyContext, error) { }() } // 判断是否需要执行游戏逻辑 - if enterType != "" && gameCode != "" { + if enterType != "" && (gameCode != "" || is1V1Robot == "1") { traceId, _ := c.Get(mycontext.TRACEID) token := c.Writer.Header().Get(mycontext.TOKEN) err := game_c.SetAutoMathEnterRoom(userId, gi.ImGroupId, cast.ToString(traceId), token, enterType, gameCode, is1V1, gameMode, is1V1Robot)