Commit 1af52401 by gdj

修复任务id格式问题。

parent f58fa42a
...@@ -95,7 +95,7 @@ public class WaylineJobServiceImpl extends ServiceImpl<IWaylineJobMapper, Waylin ...@@ -95,7 +95,7 @@ public class WaylineJobServiceImpl extends ServiceImpl<IWaylineJobMapper, Waylin
} }
// Immediate tasks, allocating time on the backend. // Immediate tasks, allocating time on the backend.
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH-mm-ss");
String formattedDateTime = now.format(formatter); String formattedDateTime = now.format(formatter);
String jobId = param.getName() + "-" + formattedDateTime+ "-" + UUID.randomUUID().toString().substring(0, 4); String jobId = param.getName() + "-" + formattedDateTime+ "-" + UUID.randomUUID().toString().substring(0, 4);
...@@ -127,7 +127,7 @@ public class WaylineJobServiceImpl extends ServiceImpl<IWaylineJobMapper, Waylin ...@@ -127,7 +127,7 @@ public class WaylineJobServiceImpl extends ServiceImpl<IWaylineJobMapper, Waylin
} }
WaylineJobEntity jobEntity = this.dto2Entity(parentJobOpt.get()); WaylineJobEntity jobEntity = this.dto2Entity(parentJobOpt.get());
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH-mm-ss");
String formattedDateTime = now.format(formatter); String formattedDateTime = now.format(formatter);
jobEntity.setJobId(jobEntity.getName() + "-" + formattedDateTime+ "-" + UUID.randomUUID().toString().substring(0, 4)); jobEntity.setJobId(jobEntity.getName() + "-" + formattedDateTime+ "-" + UUID.randomUUID().toString().substring(0, 4));
jobEntity.setErrorCode(null); jobEntity.setErrorCode(null);
......
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