Browse Source

fix:检查token

jimmyyem 1 day ago
parent
commit
8dddeb0491
1 changed files with 2 additions and 1 deletions
  1. 2 1
      internal/logic/token/check_token_logic.go

+ 2 - 1
internal/logic/token/check_token_logic.go

@@ -50,6 +50,7 @@ func (l *CheckTokenLogic) CheckToken(req *types.CheckTokenReq) (resp *types.Chec
 
 	expireAt := tokenItem.ExpireAt.Unix()
 	timestamp := time.Now().Add(time.Hour * 8).Unix()
+	currentTimestamp := time.Now().Unix()
 	//l.Logger.Infof("expireAt=%v timestamp=%v \n", expireAt, timestamp)
 	if tokenItem == nil { // 判断Token是否存在
 		valid = false
@@ -106,7 +107,7 @@ func (l *CheckTokenLogic) CheckToken(req *types.CheckTokenReq) (resp *types.Chec
 	return &types.CheckTokenResp{
 		Valid:           &valid,
 		Sign:            &sign,
-		Timestamp:       &timestamp,
+		Timestamp:       &currentTimestamp,
 		AgentInfo:       &agentInfo,
 		CustomAgentBase: &customAgentBase,
 		CustomAgentKey:  &customAgentKey,