|
@@ -10,6 +10,7 @@ import com.helospark.lightdi.annotation.Service;
|
|
|
import com.winhc.dataworks.flow.touch.bean.*;
|
|
|
import com.winhc.dataworks.flow.touch.configuration.SchemaInit;
|
|
|
import com.winhc.dataworks.flow.touch.service.TouchService;
|
|
|
+import com.winhc.dataworks.flow.touch.utils.DateUtils;
|
|
|
import com.winhc.dataworks.flow.touch.utils.DingUtils;
|
|
|
import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -39,7 +40,7 @@ public class Main {
|
|
|
|
|
|
static {
|
|
|
options.addOption("s", "singleJob", false, "选填,是否单独触发一个业务流程");
|
|
|
- options.addOption("b", "bizDate", true, "必填,业务时间");
|
|
|
+ options.addOption("b", "bizDate", true, "选填,业务时间[2020-07-07],默认为昨天");
|
|
|
options.addOption("f", "fileName", true, "必填,yaml文件");
|
|
|
|
|
|
options.addOption("flow", "flow", true, "单任务必填,业务流程名");
|
|
@@ -48,7 +49,7 @@ public class Main {
|
|
|
|
|
|
private static void verify(CommandLine commandLine) {
|
|
|
try {
|
|
|
- if (!commandLine.hasOption("b") || !commandLine.hasOption("f")) {
|
|
|
+ if (!commandLine.hasOption("f")) {
|
|
|
throw new RuntimeException();
|
|
|
}
|
|
|
if (commandLine.hasOption("s")) {
|
|
@@ -71,7 +72,7 @@ public class Main {
|
|
|
try {
|
|
|
CommandLine commandLine = parser.parse(options, args);
|
|
|
verify(commandLine);
|
|
|
- String bizDate = commandLine.getOptionValue("b");
|
|
|
+ String bizDate = commandLine.getOptionValue("b", DateUtils.getYesterday());
|
|
|
String fileName = commandLine.getOptionValue("f");
|
|
|
List<DataWorksFlowJob> jobs = SchemaInit.getJobs(fileName);
|
|
|
|