mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 20:58:11 +08:00
add title in SqlParameters
This commit is contained in:
parent
d973d50d3e
commit
4381955962
@ -73,6 +73,11 @@ public class SqlParameters extends AbstractParameters {
|
||||
*/
|
||||
private List<String> postStatements;
|
||||
|
||||
/**
|
||||
* title
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* receivers
|
||||
*/
|
||||
@ -139,6 +144,14 @@ public class SqlParameters extends AbstractParameters {
|
||||
this.connParams = connParams;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getReceivers() {
|
||||
return receivers;
|
||||
}
|
||||
@ -190,6 +203,7 @@ public class SqlParameters extends AbstractParameters {
|
||||
", udfs='" + udfs + '\'' +
|
||||
", showType='" + showType + '\'' +
|
||||
", connParams='" + connParams + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", receivers='" + receivers + '\'' +
|
||||
", receiversCc='" + receiversCc + '\'' +
|
||||
", preStatements=" + preStatements +
|
||||
|
@ -279,7 +279,11 @@ public class SqlTask extends AbstractTask {
|
||||
logger.info("showType is empty,don't need send email");
|
||||
} else {
|
||||
if (array.size() > 0) {
|
||||
sendAttachment(taskProps.getNodeName() + " query resultsets ", JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) {
|
||||
sendAttachment(sqlParameters.getTitle(), JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
}else{
|
||||
sendAttachment(taskProps.getNodeName() + " query resultsets ", JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user