ソースを参照

Merge branch 'hotfix/v1.1.31.1_ws' of BaseService/jyMicroservices into hotfix/v1.1.31.1

wangshan 1 年間 前
コミット
0257927e1f
1 ファイル変更6 行追加3 行削除
  1. 6 3
      jyBXBase/rpc/model/newestBidding.go

+ 6 - 3
jyBXBase/rpc/model/newestBidding.go

@@ -282,19 +282,22 @@ func GetRedisKeyTimeout(status int, positionId int64) config.CacheConfig {
 	switch status {
 	case StatusNoLogin:
 		redisKey = IC.C.NewsCache.NoLogin.Key
-		redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
+		//redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
+		redisKey = fmt.Sprintf(redisKey, time.Now().Year(), 8, 8) //最开始逻辑是每日更新---》每7天更新一次;不麻烦改配置,就改代码默认月份是8 日期是8
 		timeOut = IC.C.NewsCache.NoLogin.Timeout
 		cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.NoLogin.CacheUpdateKey)
 		cuTimeOut = IC.C.NewsCache.NoLogin.CacheUpdateTimeout
 	case StatusLoginUser:
 		redisKey = IC.C.NewsCache.LoginUser.Key // 登录用户使用的缓存key
-		redisKey = fmt.Sprintf(redisKey, positionId, time.Now().Year(), time.Now().Month(), time.Now().Day())
+		//redisKey = fmt.Sprintf(redisKey, positionId, time.Now().Year(), time.Now().Month(), time.Now().Day())
+		redisKey = fmt.Sprintf(redisKey, positionId, time.Now().Year(), 8, 8) //
 		timeOut = IC.C.NewsCache.LoginUser.Timeout
 		cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.LoginUser.CacheUpdateKey)
 		cuTimeOut = IC.C.NewsCache.LoginUser.CacheUpdateTimeout
 	case StatusLogin:
 		redisKey = IC.C.NewsCache.Login.Key // 登录用户使用的最新标讯缓存key
-		redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
+		//redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
+		redisKey = fmt.Sprintf(redisKey, time.Now().Year(), 8, 8) //
 		timeOut = IC.C.NewsCache.Login.Timeout
 		cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.Login.CacheUpdateKey)
 		cuTimeOut = IC.C.NewsCache.Login.CacheUpdateTimeout