mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 17:58:11 +08:00
fix(X-Pack): 定时报告查询组件没有作用于导出的图表数据
This commit is contained in:
committed by
fit2cloud-chenyw
parent
0a0074fee0
commit
c95162617a
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
public class JsonUtil {
|
||||
|
||||
private static final ObjectMapper objectMapper;
|
||||
|
||||
static {
|
||||
objectMapper = new ObjectMapper();
|
||||
// 配置更大的 StreamReadConstraints 限制
|
||||
@@ -47,6 +48,17 @@ public class JsonUtil {
|
||||
return t;
|
||||
}
|
||||
|
||||
public static <T> T parseObject(String json, TypeReference<T> typeReference) {
|
||||
if (json == null) return null;
|
||||
T t = null;
|
||||
try {
|
||||
t = objectMapper.readValue(json, typeReference);
|
||||
} catch (JsonProcessingException e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
public static <T> List<T> parseList(String json, TypeReference<List<T>> classOfT) {
|
||||
if (ObjectUtils.isEmpty(json)) return Collections.emptyList();
|
||||
List<T> t = null;
|
||||
|
||||
Reference in New Issue
Block a user