Commit 06aa5294 by fudahua

Merge branch 'fix-2023-04' into 'developer'

feat: gaoj

See merge request !99
parents 2388ed1f 0e338de7
package com.gic.cloud.data.hook.service;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.gic.commons.util.DingtalkMessageUtil;
import com.gic.commons.util.TraceIdUtil;
import com.gic.dubbo.entity.ProviderLocalTag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DingWarningUtil {
private static Logger logger = LoggerFactory.getLogger(DingWarningUtil.class);
private static final String dingdingurl="https://oapi.dingtalk.com/robot/send?access_token=1d6a0756fcfe5f215e3ed37d7e60960635d0009f71b476f3b402e7671fc2a8ca";
public static void sendCountWarning(String msg) {
Config appConfig = ConfigService.getAppConfig();
String url = appConfig.getProperty("ding.url", dingdingurl);
ProviderLocalTag localTag = ProviderLocalTag.tag.get();
String traceId = localTag.traceId;
try {
msg=msg+": "+traceId;
DingtalkMessageUtil.sendAlertMessage(msg,url);
}catch (Exception e) {
logger.info("异常:{}",e);
}
}
}
......@@ -966,6 +966,10 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
saveXlsSplitNew(currentFile.get().filepath,null,null,currentFile.get(),count,true,queryDataType);
stopWatch.stop();
logger.info("写入本地excel耗时:{}, 数量: {}-》{}",stopWatch.getLastTaskTimeMillis(),task.getAmount(),total);
if (task.getAmount()!=total.intValue()) {
String msg="取数任务:"+task.getId()+"下载数量对不上: 数量: "+task.getAmount()+"->"+total;
DingWarningUtil.sendCountWarning(msg);
}
stopWatch.start();
//是否压缩
boolean zipFlag = (xlsxFiles.size() > 1) ? true : false;
......
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