test modify

This commit is contained in:
Gordon 2021-11-30 20:33:34 +08:00
parent 01515f919d
commit 5f90851458

View File

@ -88,12 +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)
var a []interface{}
for k, v := range m {
a = append(a, k)
a = append(a, v)
}
_, err := d.Exec("HMSET", key, a)
//var a []interface{}
//for k, v := range m {
// a = append(a, k)
// a = append(a, v)
//}
_, err := d.Exec("HMSET", key, redis.Args{}.Add(m))
return err
}