From 2e2b7fe0d0cc11dd5f3f884b2cd0c074e44d70f3 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 18 Aug 2021 11:50:06 +0800 Subject: [PATCH] js --- .../datasettransform/service/impl/JsTransformServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasettransform/service/impl/JsTransformServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasettransform/service/impl/JsTransformServiceImpl.java index 22945676..082a2796 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasettransform/service/impl/JsTransformServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasettransform/service/impl/JsTransformServiceImpl.java @@ -54,9 +54,7 @@ public class JsTransformServiceImpl implements TransformStrategy { engine.eval(js); if(engine instanceof Invocable){ Invocable invocable = (Invocable) engine; - Object exec = invocable.invokeFunction("dataTransform", data); - ObjectMapper objectMapper = new ObjectMapper(); - return objectMapper.convertValue(exec, List.class); + return (List) invocable.invokeFunction("dataTransform", data); } } catch (Exception ex) {