mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 22:41:06 +08:00
Merge pull request #11033 from dataease/pr@dev-v2@fix_compress-error
fix: 修复编译错误
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package io.dataease.visualization.utils;
|
||||
|
||||
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.utils.JsonUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class VisualizationUtils {
|
||||
|
||||
public static Map<Long,String> viewTransToStr(Map<Long, ChartViewDTO> source ){
|
||||
Map<Long,String> result = new HashMap<>();
|
||||
source.forEach((key,value) ->{
|
||||
result.put(key, (String)JsonUtil.toJSONString(value));
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<Long,ChartViewDTO> viewTransToObj (Map<Long, String> source ){
|
||||
Map<Long,ChartViewDTO> result = new HashMap<>();
|
||||
source.forEach((key,value) ->{
|
||||
result.put(key, JsonUtil.parseObject(value,ChartViewDTO.class));
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user