Browse Source

Merge pull request #390 from lgcareer/branch-1.0.2

update getSqlAndSqlParamsMap in order to replace title
pull/2/head
lgcareer 6 years ago committed by GitHub
parent
commit
3ebc913195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      escheduler-server/src/main/java/cn/escheduler/server/worker/task/sql/SqlTask.java

6
escheduler-server/src/main/java/cn/escheduler/server/worker/task/sql/SqlTask.java

@ -189,6 +189,12 @@ public class SqlTask extends AbstractTask {
return new SqlBinds(sqlBuilder.toString(), sqlParamsMap);
}
if (StringUtils.isNotEmpty(sqlParameters.getTitle())){
String title = ParameterUtils.convertParameterPlaceholders(sqlParameters.getTitle(), ParamUtils.convert(paramsMap));
logger.info(title);
sqlParameters.setTitle(title);
}
// special characters need to be escaped, ${} needs to be escaped
String rgex = "'?\\$\\{(.*?)\\}'?";
setSqlParamsMap(sql,rgex,sqlParamsMap,paramsMap);

Loading…
Cancel
Save