作者 唐旭辉

bug 修复

... ... @@ -25,6 +25,7 @@ func SetLoginToken(param protocol.LoginAuthToken, userid int64, companyid int64)
value, _ = json.Marshal(data)
key = GetKeyLoginToken(userid, companyid)
client.Del(key)
err = client.Set(key, string(value), LOGIN_TOKEN_EXP).Err()
return err
}
... ... @@ -89,6 +90,7 @@ func RefreshLoginTokenExpires(userid int64, companyid int64) error {
func SetCaptchAuth(phone string, captchAuth string) error {
key := GetKeyCaptchAuth(phone)
client := redis.GetRedis()
client.Del(key)
err := client.Set(key, captchAuth, CAPTCHA_AUTH_EXP).Err()
return err
}
... ... @@ -103,6 +105,7 @@ func GetCaptchAuth(phone string) (string, error) {
func SetUserPermission(objMap map[string]rbac.PermissionOptionObject, userid int64) error {
key := GetKeyUserPermission(userid)
client := redis.GetRedis()
client.Del(key)
for k := range objMap {
s, err := json.Marshal(objMap[k])
if err != nil {
... ...