package model import ( "context" "encoding/json" "samba/pkg/log" "samba/util/rdbkey" "time" ) const ( redis30day = time.Hour * 24 * 30 ) func AddRoomGameLog(roomType int, record interface{}) { bRecord, err := json.Marshal(record) //log.Debug(fmt.Sprintf("对局记录:%v", string(bRecord))) if err == nil { err = rdbGameLog.RPush(context.Background(), rdbkey.TrucoRoomGameKey(roomType), string(bRecord)).Err() } if err != nil { log.Error(err.Error()) return } }