diff --git a/pkg/common/db/redisModel.go b/pkg/common/db/redisModel.go index c28f67f3f..97ad066bc 100644 --- a/pkg/common/db/redisModel.go +++ b/pkg/common/db/redisModel.go @@ -88,7 +88,12 @@ func (d *DataBases) GetTokenMapByUidPid(userID, platformID string) (map[string]i } func (d *DataBases) SetTokenMapByUidPid(userID string, platformID int32, m map[string]int) error { key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID) - _, err := d.Exec("SET", key, m) + var a []interface{} + for k, v := range m { + a = append(a, k) + a = append(a, v) + } + _, err := d.Exec("HMSET", key, a...) return err }