Commit b5c8a828 by 陶光胜

init

parent 300b5bf0
......@@ -2,6 +2,9 @@ package com.gic.download.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.gic.commons.httpclient.HttpClientUtil;
import com.gic.download.constants.ExcelExtensionEnum;
import com.gic.download.dto.DownloadReportTempDTO;
import com.gic.download.qo.DownloadExcelQO;
......@@ -407,6 +410,8 @@ public class DownloadUtils {
int pageNum = 1;
int maxLength = 102400;
while (maxLength -- > 0) {
//每次获取数据都进行心跳包发送
sendHeart(reportId);
// 分页获取数据
List<T> objList = null;
try {
......@@ -537,4 +542,14 @@ public class DownloadUtils {
}
}
private void sendHeart(Integer reportId){
Map<String, String> param = new HashMap<>();
param.put("reportId", reportId.toString());
Config config = ConfigService.getConfig("COMMON.4.0-gic-properties");
String url = config.getProperty("gic_host", "");
url += "/gic-enterprise-web/receive-heart";
LOGGER.info("发送心跳包");
HttpClientUtil.get(url, param);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment