未验证 提交 a65cb481 编写于 作者: G gabry.wu 提交者: GitHub

always send emails no matter there are results (#3015)

* always send emails no matter there are results

* always send emails no matter there are results
上级 eef39767
......@@ -270,16 +270,9 @@ public class SqlTask extends AbstractTask {
String result = JSONUtils.toJsonString(resultJSONArray);
logger.debug("execute sql : {}", result);
// if there is a result set
if (!resultJSONArray.isEmpty(null) ) {
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) {
sendAttachment(sqlParameters.getTitle(),
JSONUtils.toJsonString(resultJSONArray));
}else{
sendAttachment(taskExecutionContext.getTaskName() + " query resultsets ",
JSONUtils.toJsonString(resultJSONArray));
}
}
sendAttachment(StringUtils.isNotEmpty(sqlParameters.getTitle()) ?
sqlParameters.getTitle(): taskExecutionContext.getTaskName() + " query result sets",
JSONUtils.toJsonString(resultJSONArray));
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册