pull/236/head
Gordon 3 years ago
parent 34fe9596a9
commit 2f2f72fe4b

@ -95,7 +95,11 @@ func (d *DataBases) GetTokenMapByUidPid(userID, platformID string) (map[string]i
}
func (d *DataBases) SetTokenMapByUidPid(userID string, platformID int, m map[string]int) error {
key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID)
return d.rdb.HSet(context.Background(), key, m).Err()
mm := make(map[string]interface{})
for k, v := range m {
mm[k] = v
}
return d.rdb.HSet(context.Background(), key, mm).Err()
}
func (d *DataBases) DeleteTokenByUidPid(userID string, platformID int, fields []string) error {
key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID)

Loading…
Cancel
Save