修复时间问题

This commit is contained in:
ZJY 2021-09-03 19:42:20 +08:00
parent 5b8fc96354
commit c22c609557
2 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,7 @@ func (c *Container) getToken() error {
}
} else {
logs.Info("缓存token")
h, _ := time.ParseDuration("+640h")
h, _ := time.ParseDuration("+624h")
tZero := time.Now().Add(h)
logs.Info(tZero)
logs.Info(token.Expiration)

View File

@ -322,5 +322,5 @@ func setSqlToken(token *Token) error {
func getSqlToken() (*Token, error) {
token := &Token{}
return token, db.Order("expiration desc").First(token).Error
return token, db.Order("expiration asc").First(token).Error
}