张金坤 8 سال پیش
والد
کامیت
92740879d8
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      common/src/github.com/go-xweb/httpsession/redissessionstore.go

+ 3 - 1
common/src/github.com/go-xweb/httpsession/redissessionstore.go

@@ -95,7 +95,9 @@ func (store *redisStore) UpdateByCustomField(findkey string, findvalue interface
 	}
 	var data map[string]interface{}
 	json.Unmarshal(*bs, &data)
-
+	data[setkey] = setvalue
+	putdata, _ := json.Marshal(data)
+	redis.PutBytes("session", findkey, &putdata, int(store.maxAge.Seconds()))
 	store.lock.Unlock()
 	return true
 }