Commit 3f6bdaaa by huangfusuper

立即执行命令替换

parent d516d987
......@@ -7,9 +7,11 @@ import com.byit.dto.plugin.RunLog;
import com.byit.dto.plugin.RunNode;
import com.byit.enums.NodePropertyEnum;
import com.byit.enums.NodeTypeEnum;
import com.byit.enums.PlaceholderEnum;
import com.byit.enums.ScheduleTypeEnum;
import com.byit.job.WorkRoulette;
import com.byit.job.utils.CronExpression;
import com.byit.job.utils.DateUtil;
import com.byit.job.utils.PlaceholderUtils;
import com.byit.mapper.JavaTaskMapper;
import com.byit.mapper.JobTaskRunLogMapper;
......@@ -79,6 +81,12 @@ public class ApiNodeServiceImpl implements ApiNodeService {
schedule.setScheduleType(ScheduleTypeEnum.REAL.getCode());
schedule.setRunParam(PlaceholderUtils.formatParam(schedule.getRunParam()));
String runCommand = schedule.getRunCommand();
if (StringUtils.isNotBlank(runCommand)) {
runCommand.replace("${"+ PlaceholderEnum.DATE_PLACEHOLDER.getName() +"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1));
schedule.setRunCommand(runCommand);
}
JobTaskRunLogWithBLOBs jobTaskRunLog = new JobTaskRunLogWithBLOBs();
BeanUtils.copyProperties(schedule, jobTaskRunLog);
......
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