java110
2020-07-07 70862b9228ccb2156971a22085ac31b6c8b6d2cd
java110-service/src/main/java/com/java110/service/context/DataQuery.java
@@ -1,9 +1,9 @@
package com.java110.service.context;
import com.alibaba.fastjson.JSONObject;
import com.java110.common.factory.ApplicationContextFactory;
import com.java110.utils.factory.ApplicationContextFactory;
import com.java110.entity.service.ServiceSql;
import com.java110.service.dao.IQueryServiceDAO;
import com.java110.db.dao.IQueryServiceDAO;
import org.springframework.http.RequestEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
@@ -132,7 +132,7 @@
     * @param sqlParam sql 参数
     * @return 查询结果
     */
    public Object queryDataBySql(String sql, List<Object> sqlParam){
    public List<Map<String, Object>> queryDataBySql(String sql, List<Object> sqlParam){
        IQueryServiceDAO queryServiceDAOImpl = ApplicationContextFactory.getBean("queryServiceDAOImpl",IQueryServiceDAO.class);
        return queryServiceDAOImpl.executeSql(sql, sqlParam.toArray());
    }
@@ -159,7 +159,7 @@
        if(innerService){
            restTemplate = ApplicationContextFactory.getBean("restTemplate",RestTemplate.class);
        }else{
            restTemplate = ApplicationContextFactory.getBean("restTemplateNoLoadBalanced",RestTemplate.class);
            restTemplate = ApplicationContextFactory.getBean("outRestTemplate",RestTemplate.class);
        }
        return restTemplate.exchange(requestEntity,String.class);
    }