提交 f2d24228 编写于 作者: X xueli.xue

任务新增GLUE更新时间属性;

上级 c264f489
...@@ -160,6 +160,7 @@ CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` ( ...@@ -160,6 +160,7 @@ CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
`glue_switch` int(11) DEFAULT '0' COMMENT 'GLUE模式开关:0-否,1-是', `glue_switch` int(11) DEFAULT '0' COMMENT 'GLUE模式开关:0-否,1-是',
`glue_source` text COMMENT 'GLUE源代码', `glue_source` text COMMENT 'GLUE源代码',
`glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注', `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
`glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
`child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key', `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
......
...@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -60,6 +61,7 @@ public class JobCodeController { ...@@ -60,6 +61,7 @@ public class JobCodeController {
// update new code // update new code
exists_jobInfo.setGlueSource(glueSource); exists_jobInfo.setGlueSource(glueSource);
exists_jobInfo.setGlueRemark(glueRemark); exists_jobInfo.setGlueRemark(glueRemark);
exists_jobInfo.setGlueUpdatetime(new Date());
xxlJobInfoDao.update(exists_jobInfo); xxlJobInfoDao.update(exists_jobInfo);
// remove code backup more than 30 // remove code backup more than 30
......
...@@ -27,6 +27,7 @@ public class XxlJobInfo { ...@@ -27,6 +27,7 @@ public class XxlJobInfo {
private int glueSwitch; // GLUE模式开关:0-否,1-是 private int glueSwitch; // GLUE模式开关:0-否,1-是
private String glueSource; // GLUE源代码 private String glueSource; // GLUE源代码
private String glueRemark; // GLUE备注 private String glueRemark; // GLUE备注
private Date glueUpdatetime;// GLUE更新时间
private String childJobKey; // 子任务Key private String childJobKey; // 子任务Key
...@@ -145,6 +146,14 @@ public class XxlJobInfo { ...@@ -145,6 +146,14 @@ public class XxlJobInfo {
this.glueRemark = glueRemark; this.glueRemark = glueRemark;
} }
public Date getGlueUpdatetime() {
return glueUpdatetime;
}
public void setGlueUpdatetime(Date glueUpdatetime) {
this.glueUpdatetime = glueUpdatetime;
}
public String getChildJobKey() { public String getChildJobKey() {
return childJobKey; return childJobKey;
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<result column="glue_switch" property="glueSwitch" /> <result column="glue_switch" property="glueSwitch" />
<result column="glue_source" property="glueSource" /> <result column="glue_source" property="glueSource" />
<result column="glue_remark" property="glueRemark" /> <result column="glue_remark" property="glueRemark" />
<result column="glue_updatetime" property="glueUpdatetime" />
<result column="child_jobkey" property="childJobKey" /> <result column="child_jobkey" property="childJobKey" />
</resultMap> </resultMap>
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
t.glue_switch, t.glue_switch,
t.glue_source, t.glue_source,
t.glue_remark, t.glue_remark,
t.glue_updatetime,
t.child_jobkey t.child_jobkey
</sql> </sql>
...@@ -88,6 +90,7 @@ ...@@ -88,6 +90,7 @@
glue_switch, glue_switch,
glue_source, glue_source,
glue_remark, glue_remark,
glue_updatetime,
child_jobkey child_jobkey
) VALUES ( ) VALUES (
#{jobGroup}, #{jobGroup},
...@@ -103,6 +106,7 @@ ...@@ -103,6 +106,7 @@
#{glueSwitch}, #{glueSwitch},
#{glueSource}, #{glueSource},
#{glueRemark}, #{glueRemark},
NOW(),
#{childJobKey} #{childJobKey}
); );
<!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> <!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
...@@ -131,6 +135,7 @@ ...@@ -131,6 +135,7 @@
glue_switch = #{glueSwitch}, glue_switch = #{glueSwitch},
glue_source = #{glueSource}, glue_source = #{glueSource},
glue_remark = #{glueRemark}, glue_remark = #{glueRemark},
glue_updatetime = #{glueUpdatetime},
child_jobkey = #{childJobKey} child_jobkey = #{childJobKey}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册