java110
2021-05-10 3835848b28f3cf605aa1fbda443024ee11740493
java110-core/src/main/java/com/java110/core/factory/CallApiServiceFactory.java
old mode 100644 new mode 100755
@@ -10,6 +10,7 @@
import com.java110.utils.exception.SMOException;
import com.java110.utils.factory.ApplicationContextFactory;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.StringUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
@@ -201,6 +202,8 @@
    public static ResponseEntity<String> callCenterService(RestTemplate restTemplate, IPageData pd, String param, String url, HttpMethod httpMethod) {
        ResponseEntity<String> responseEntity = null;
        long startTime = DateUtil.getCurrentDate().getTime();
        logger.debug(url + "调用api开始:" + (startTime));
        HttpHeaders header = new HttpHeaders();
        header.add(CommonConstant.HTTP_APP_ID.toLowerCase(), StringUtil.isEmpty(pd.getAppId()) ? AppDto.WEB_APP_ID : pd.getAppId());
        header.add(CommonConstant.HTTP_USER_ID.toLowerCase(), StringUtil.isEmpty(pd.getUserId()) ? CommonConstant.ORDER_DEFAULT_USER_ID : pd.getUserId());
@@ -217,6 +220,8 @@
            responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
        } finally {
            logger.debug("请求地址为,{} 请求中心服务信息,{},中心服务返回信息,{}", url, httpEntity, responseEntity);
            logger.debug(url + "调用api耗时:" + (DateUtil.getCurrentDate().getTime() - startTime));
            return responseEntity;
        }