From dc0b17d8d9b6f2c17165cd394dbd74e304422a5c Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Tue, 14 Oct 2025 17:22:32 +0800
Subject: [PATCH] 1.重新修改文件分类。 2.整理文件名称统一规范。 3.修改新增时ID类型
---
ard-work/src/main/java/com/ard/work/component/forest/TokenInterceptor.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ard-work/src/main/java/com/ard/work/component/forest/TokenInterceptor.java b/ard-work/src/main/java/com/ard/work/component/forest/TokenInterceptor.java
index e0d89c4..207fbce 100644
--- a/ard-work/src/main/java/com/ard/work/component/forest/TokenInterceptor.java
+++ b/ard-work/src/main/java/com/ard/work/component/forest/TokenInterceptor.java
@@ -1,7 +1,7 @@
package com.ard.work.component.forest;
import com.ard.work.domain.receiver.AccessTokenReceiver;
-import com.ard.work.service.IArdServerService;
+import com.ard.work.service.IArdServerInfoService;
import com.dtflys.forest.http.ForestRequest;
import com.dtflys.forest.interceptor.Interceptor;
import lombok.extern.slf4j.Slf4j;
@@ -12,7 +12,7 @@
@Slf4j
public class TokenInterceptor<T> implements Interceptor<T> {
@Resource
- private IArdServerService ardServerService;
+ private IArdServerInfoService ardServerService;
/**
* 该方法在请求发送之前被调用, 若返回false则不会继续发送请求
@@ -22,8 +22,8 @@
@Override
public boolean beforeExecute(ForestRequest req) {
log.debug("invoke Simple beforeExecute");
- String baseUrl = (String) req.getVariableValue("baseUrl");
- AccessTokenReceiver accessToken = ardServerService.getAccessTokenByBaseUrl(baseUrl);
+ String serverId = (String) req.getVariableValue("serverId");
+ AccessTokenReceiver accessToken = ardServerService.getAccessToken(serverId);
req.addHeader("x-cid", accessToken.getCompanyId());
req.addHeader("x-token", accessToken.getAccessToken());
return true; // 继续执行请求返回true
--
Gitblit v1.9.3