mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
3.2.1
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# changelog
|
||||
|
||||
## 3.2.1
|
||||
|
||||
- 强化RouteInterceptorContext,可获取微服务信息
|
||||
|
||||
## 3.2.0
|
||||
|
||||
- 使用alibaba cloud
|
||||
|
@@ -150,6 +150,11 @@ public abstract class BaseExecutorAdapter<T, R> implements ResultExecutor<T, R>
|
||||
}
|
||||
ErrorMeta errorMeta = errorEnum.getErrorMeta();
|
||||
JSONObject responseData = JSON.parseObject(serviceResult);
|
||||
ApiParam apiParam = this.getApiParam(request);
|
||||
if (apiParam != null) {
|
||||
// 全局请求id,方便追踪定位
|
||||
responseData.put("request_id", apiParam.fetchRequestId());
|
||||
}
|
||||
responseData.put(GATEWAY_CODE_NAME, errorMeta.getCode());
|
||||
responseData.put(GATEWAY_MSG_NAME, errorMeta.getError(getLocale(request)).getMsg());
|
||||
return responseData;
|
||||
@@ -185,8 +190,6 @@ public abstract class BaseExecutorAdapter<T, R> implements ResultExecutor<T, R>
|
||||
params = new ApiParam();
|
||||
params.setName("error");
|
||||
}
|
||||
// 全局请求id,方便追踪定位
|
||||
finalData.put("request_id", params.fetchRequestId());
|
||||
ApiConfig apiConfig = ApiConfig.getInstance();
|
||||
// 点换成下划线
|
||||
DataNameBuilder dataNameBuilder = apiConfig.getDataNameBuilder();
|
||||
|
Reference in New Issue
Block a user