浏览代码

Merge branch 'fixbug/533-huaguo-checktoken' into debug

jimmyyem 1 天之前
父节点
当前提交
787556be0a
共有 1 个文件被更改,包括 2 次插入1 次删除
  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()
 	expireAt := tokenItem.ExpireAt.Unix()
 	timestamp := time.Now().Add(time.Hour * 8).Unix()
 	timestamp := time.Now().Add(time.Hour * 8).Unix()
+	currentTimestamp := time.Now().Unix()
 	//l.Logger.Infof("expireAt=%v timestamp=%v \n", expireAt, timestamp)
 	//l.Logger.Infof("expireAt=%v timestamp=%v \n", expireAt, timestamp)
 	if tokenItem == nil { // 判断Token是否存在
 	if tokenItem == nil { // 判断Token是否存在
 		valid = false
 		valid = false
@@ -106,7 +107,7 @@ func (l *CheckTokenLogic) CheckToken(req *types.CheckTokenReq) (resp *types.Chec
 	return &types.CheckTokenResp{
 	return &types.CheckTokenResp{
 		Valid:           &valid,
 		Valid:           &valid,
 		Sign:            &sign,
 		Sign:            &sign,
-		Timestamp:       &timestamp,
+		Timestamp:       &currentTimestamp,
 		AgentInfo:       &agentInfo,
 		AgentInfo:       &agentInfo,
 		CustomAgentBase: &customAgentBase,
 		CustomAgentBase: &customAgentBase,
 		CustomAgentKey:  &customAgentKey,
 		CustomAgentKey:  &customAgentKey,