wuxw
2022-05-11 bb735e0400ffe2be078614a409f977434f4558ee
java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java
@@ -18,6 +18,7 @@
import com.java110.utils.util.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.ognl.Ognl;
import org.apache.ibatis.ognl.OgnlContext;
import org.apache.ibatis.ognl.OgnlException;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
@@ -353,7 +354,8 @@
            Interpreter interpreter = new Interpreter();
            interpreter.eval(javaCode);
            interpreter.set("params", params);
            return JSONObject.parseObject(interpreter.eval("execute(dataQuery)").toString());
            interpreter.set("queryServiceDAOImpl",queryServiceDAOImpl);
            return JSONObject.parseObject(interpreter.eval("execute(params,queryServiceDAOImpl)").toString());
        } catch (Exception e) {
            logger.error("数据交互异常:", e);
            throw new BusinessException(ResponseConstant.RESULT_CODE_INNER_ERROR, "数据交互异常," + e.getMessage());
@@ -449,7 +451,9 @@
            Object condObj = Ognl.parseExpression(condition);
            Object value = Ognl.getValue(condObj, requestParams);
            OgnlContext context = new OgnlContext(null,null,new DefaultMemberAccess(true));
            Object value = Ognl.getValue(condObj,context, requestParams);
            if (value instanceof Boolean) {
                conditionResult = (Boolean) value;