|
@@ -213,27 +213,28 @@ public class ParameterUtils {
|
|
|
return inputString;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
|
|
|
- * new
|
|
|
- * $[yyyyMMdd] replace scheduler time
|
|
|
+ * $[yyyyMMdd] replace schedule time
|
|
|
* @param text
|
|
|
- * @param paramsMap
|
|
|
+ * @param scheduleTime
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String replaceScheduleTime(String text, Date scheduleTime, Map<String, Property> paramsMap) {
|
|
|
- if (paramsMap != null) {
|
|
|
+ public static String replaceScheduleTime(String text, Date scheduleTime) {
|
|
|
+ Map<String, Property> paramsMap = new HashMap<>();
|
|
|
|
|
|
if (null == scheduleTime) {
|
|
|
scheduleTime = new Date();
|
|
|
}
|
|
|
+
|
|
|
String dateTime = org.apache.dolphinscheduler.common.utils.DateUtils.format(scheduleTime, Constants.PARAMETER_FORMAT_TIME);
|
|
|
Property p = new Property();
|
|
|
p.setValue(dateTime);
|
|
|
p.setProp(Constants.PARAMETER_SHECDULE_TIME);
|
|
|
paramsMap.put(Constants.PARAMETER_SHECDULE_TIME, p);
|
|
|
text = ParameterUtils.convertParameterPlaceholders2(text, convert(paramsMap));
|
|
|
- }
|
|
|
- return text;
|
|
|
+
|
|
|
+ return text;
|
|
|
}
|
|
|
|
|
|
|