From d4d23fa736d033fc30ace72caec547e0e9704bf9 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 18 Nov 2024 22:18:32 +0800 Subject: [PATCH] 1 --- app/lib/auth/base.go | 2 +- app/md/app_redis_key.go | 4 ++-- go.mod | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/lib/auth/base.go b/app/lib/auth/base.go index 06d6d93..517a3a5 100644 --- a/app/lib/auth/base.go +++ b/app/lib/auth/base.go @@ -9,7 +9,7 @@ import ( // TokenExpireDuration is jwt 过期时间 const TokenExpireDuration = time.Hour * 24 -var Secret = []byte("smart_canteen_admin") +var Secret = []byte("egg_admin") // JWTUser 如果想要保存更多信息,都可以添加到这个结构体中 type JWTUser struct { diff --git a/app/md/app_redis_key.go b/app/md/app_redis_key.go index fb85fa6..08fb5bb 100644 --- a/app/md/app_redis_key.go +++ b/app/md/app_redis_key.go @@ -4,9 +4,9 @@ package md const ( JwtTokenKey = "%s:egg_admin_jwt_token:%s" // jwt, 占位符:ip, admin:id - JwtTokenCacheTime = 3600 * 4 + JwtTokenCacheTime = 3600 * 6 - AppCfgCacheKey = "cfg_cache:%s" // 占位符: key的第一个字母 + AppCfgCacheKey = "egg_admin_cfg_cache:%s" // 占位符: key的第一个字母 CfgCacheTime = 86400 diff --git a/go.mod b/go.mod index 2d37c05..a89d88a 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/forgoer/openssl v0.0.0-20201023062029-c3112b0c8700 - github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin v1.9.1 github.com/go-playground/locales v0.14.1 github.com/go-playground/universal-translator v0.18.1 github.com/go-playground/validator/v10 v10.20.0 @@ -35,11 +35,12 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241112032738-ca9b07ba7b24 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241118141706-576f2789ac24 code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.3 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0 code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible + github.com/gin-contrib/sessions v1.0.1 github.com/go-sql-driver/mysql v1.8.1 github.com/gocolly/colly v1.2.0 github.com/olivere/elastic/v7 v7.0.32 @@ -73,9 +74,9 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/gookit/color v1.3.8 // indirect - github.com/gorilla/context v1.1.1 // indirect - github.com/gorilla/securecookie v1.1.1 // indirect - github.com/gorilla/sessions v1.2.1 // indirect + github.com/gorilla/context v1.1.2 // indirect + github.com/gorilla/securecookie v1.1.2 // indirect + github.com/gorilla/sessions v1.2.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kennygrant/sanitize v1.2.4 // indirect