Commit f73f8c4f by guominglei

任务节点添加强弱依赖配置

parent 0982ec46
......@@ -250,6 +250,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}else {
node.setRemainingCount(-1);
}
//判断是否在上级成功是才执行下级作业
if (null != ((PluginNode) pluginNode).getSuperSuccessRun()){
node.setSuperSuccessRun(((PluginNode) pluginNode).getSuperSuccessRun());
}else {
node.setSuperSuccessRun("0");
}
node.setIsVirtual(NodePropertyEnum.ISNOT_VIRTUAL.getCode());
}
}
......
......@@ -2,9 +2,10 @@ package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
......@@ -205,6 +206,12 @@ public class Node implements Serializable {
private String runSource;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
@ApiModelProperty("是否上级运行成功时运行(0 是 1 否)")
private String superSuccessRun;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -2,9 +2,10 @@ package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
......@@ -217,6 +218,12 @@ public class NodeVersion implements Serializable {
private String runSource;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
@ApiModelProperty("是否上级运行成功时运行(0 是 1 否)")
private String superSuccessRun;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -212,6 +212,12 @@ public class NodeVo implements Serializable {
@ApiModelProperty("依赖节点")
private List<Integer> dependNodeId;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
@ApiModelProperty("是否上级运行成功时运行(0 是 1 否)")
private String superSuccessRun;
/**
*/
......
......@@ -34,6 +34,7 @@
<result column="version_name" jdbcType="VARCHAR" property="versionName" />
<result column="on_fork" jdbcType="CHAR" property="onFork" />
<result column="run_command" jdbcType="VARCHAR" property="runCommand" />
<result column="super_success_run" jdbcType="CHAR" property="superSuccessRun"/>
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.Node">
<!-- generated @mbg.generated date: 2019-12-31 -->
......@@ -45,7 +46,7 @@
job_type, handler_name, node_cron, node_desc, node_name, map_flow_id, node_timeout,
is_virtual, plugin_urls, priority, remaining_count, repeat_count, failed_retry_interval,
routing_strategy, run_param, run_source_desc, script_urls, source_principal, source_update_time,
trigger_next_time, author, add_time, version_name, on_fork, run_command
trigger_next_time, author, add_time, version_name, on_fork, run_command, super_success_run
</sql>
<sql id="Blob_Column_List">
......@@ -230,6 +231,9 @@
<if test="runSource != null">
run_source,
</if>
<if test="superSuccessRun != null">
super_success_run,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
......@@ -328,6 +332,9 @@
<if test="runSource != null">
#{runSource,jdbcType=LONGVARCHAR},
</if>
<if test="superSuccessRun != null">
#{superSuccessRun,jdbcType=CHAR},
</if>
</trim>
</insert>
......@@ -437,6 +444,9 @@
<if test="runSource != null">
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
<if test="superSuccessRun != null">
super_success_run = #{superSuccessRun,jdbcType=CHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
......
......@@ -36,6 +36,7 @@
<result column="version_name" jdbcType="VARCHAR" property="versionName" />
<result column="on_fork" jdbcType="CHAR" property="onFork" />
<result column="run_command" jdbcType="VARCHAR" property="runCommand" />
<result column="super_success_run" jdbcType="CHAR" property="superSuccessRun"/>
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.NodeVersion">
<!-- generated @mbg.generated date: 2019-12-31 -->
......@@ -48,7 +49,7 @@
map_flow_id, node_timeout, is_virtual, plugin_urls, priority, remove_mark, repeat_count,
failed_retry_interval, routing_strategy, run_param, run_source_desc, script_urls,
source_principal, source_update_time, version_mark, author, add_time, version_name,
on_fork, run_command
on_fork, run_command, super_success_run
</sql>
<sql id="Blob_Column_List">
<!-- generated @mbg.generated date: 2019-12-31 -->
......@@ -178,6 +179,9 @@
<if test="runSource != null">
run_source,
</if>
<if test="superSuccessRun != null">
super_success_run,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeVersionId != null">
......@@ -282,6 +286,9 @@
<if test="runSource != null">
#{runSource,jdbcType=LONGVARCHAR},
</if>
<if test="superSuccessRun != null">
#{superSuccessRun,jdbcType=CHAR},
</if>
</trim>
</insert>
......@@ -394,6 +401,9 @@
<if test="runSource != null">
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
<if test="superSuccessRun != null">
super_success_run = #{superSuccessRun,jdbcType=CHAR},
</if>
</set>
where node_version_id = #{nodeVersionId,jdbcType=INTEGER}
</update>
......
......@@ -47,6 +47,11 @@ public class PluginNode extends PluginBaseNode implements Serializable {
private String sourcePrincipal;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
private String superSuccessRun;
/**
* 节点的配置
*/
private PluginNodeConfig config;
......
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