add some logs
This commit is contained in:
@@ -48,6 +48,7 @@ public class ApiService {
|
||||
ParameterizedTypeReference<List<T>> typeRef = (ParameterizedTypeReference<List<T>>) tableObjectMapping.get(getInfoVO.getTableName());
|
||||
if (typeRef == null) {
|
||||
// throw new IllegalArgumentException("不支持该表名: " + getInfoVO.getTableName());
|
||||
log.error("Pakistan API - 不支持该表名 : {}", getInfoVO.getTableName());
|
||||
return Mono.empty();
|
||||
}
|
||||
|
||||
@@ -62,7 +63,7 @@ public class ApiService {
|
||||
.retrieve()
|
||||
.bodyToMono(typeRef)
|
||||
.onErrorResume(e -> {
|
||||
log.warn("WebClient 请求 eldData 失败,错误: {}", e.getMessage());
|
||||
log.warn("Pakistan API - WebClient 请求 eldData 失败,错误: {}", e.getMessage());
|
||||
return Mono.just(Collections.emptyList());
|
||||
});
|
||||
|
||||
@@ -73,7 +74,9 @@ public class ApiService {
|
||||
public <T> Mono<List<T>> getInfoPro(Integer customerId, String tableName) {
|
||||
ParameterizedTypeReference<List<T>> typeRef = (ParameterizedTypeReference<List<T>>) tableObjectMapping.get(tableName);
|
||||
if (typeRef == null) {
|
||||
throw new IllegalArgumentException("Unsupported table name: " + tableName);
|
||||
// throw new IllegalArgumentException("不支持该表名: " + tableName);
|
||||
log.error("Pro API - 不支持该表名 : {}", tableName);
|
||||
return Mono.empty();
|
||||
}
|
||||
|
||||
return webClientBuilder.baseUrl("https://eldapp.anytrek.app")
|
||||
@@ -88,7 +91,7 @@ public class ApiService {
|
||||
.retrieve()
|
||||
.bodyToMono(typeRef)
|
||||
.onErrorResume(e -> {
|
||||
log.warn("WebClient 请求 eldData 失败,错误: {}", e.getMessage());
|
||||
log.warn("Pro API - WebClient 请求 eldData 失败,错误: {}", e.getMessage());
|
||||
return Mono.just(Collections.emptyList());
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user