From 599453aa4944cd1d67e6a5894f3833b84ca2d36c Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 08 九月 2019 15:26:38 +0800
Subject: [PATCH] 解决bug execute(com.java110.service.context.DataQuery@7fcbe4c6);

---
 java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java b/java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java
index 0d13cd5..1d7a71c 100644
--- a/java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java
+++ b/java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java
@@ -12,11 +12,10 @@
 import com.java110.common.log.LoggerEngine;
 import com.java110.common.util.Assert;
 import com.java110.common.util.StringUtil;
-import com.java110.entity.service.DataQuery;
+import com.java110.service.context.DataQuery;
 import com.java110.entity.service.ServiceSql;
 import com.java110.service.dao.IQueryServiceDAO;
 import com.java110.service.smo.IQueryServiceSMO;
-import javassist.ClassPool;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.ognl.Ognl;
 import org.apache.ibatis.ognl.OgnlException;
@@ -183,20 +182,9 @@
 
             Interpreter interpreter = new Interpreter();
             interpreter.eval(javaCode);
-           /* String param = "";
-            for (String key : params.keySet()) {
-                param += (params.getString(key) + ",");
-            }
-
-            if (param.endsWith(",")) {
-                param = param.substring(0, param.length() - 1);
-            }*/
-
-
-
-
+            interpreter.set("dataQuery", dataQuery);
             dataQuery.setResponseInfo(DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_SUCCESS,
-                    "鎴愬姛", JSONObject.parseObject(interpreter.eval("execute(" + dataQuery + ")").toString())));
+                    "鎴愬姛", JSONObject.parseObject(interpreter.eval("execute(dataQuery)").toString())));
         } catch (Exception e) {
             logger.error("鏁版嵁浜や簰寮傚父锛�", e);
             throw new BusinessException(ResponseConstant.RESULT_CODE_INNER_ERROR, "鏁版嵁浜や簰寮傚父," + e.getMessage());

--
Gitblit v1.8.0