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

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

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