diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
index ea58a05d40e2aa20a4b2561e30ee08a4625c4350..e03b6f418fe64db0088f653aad18504ffcd6e8bb 100644
--- a/db/tables_xxl_job.sql
+++ b/db/tables_xxl_job.sql
@@ -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;
diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java
index 5db491ac4c4d9d635dea5bd8646e4afbc953be48..b1b57f6871609970616482c4d0a1b6eec437a509 100644
--- a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java
+++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java
@@ -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
diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobInfo.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobInfo.java
index 6ca9909c1d012500ad7db670b7db08316ed63914..669dd0711ee46f75e6e027eb7ab797365f79c1c9 100644
--- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobInfo.java
+++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobInfo.java
@@ -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;
}
diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
index 7dd9c0ddc93af24e8e88ef339e47f40fef8878b8..cfb5a877f68a2f44f1eeadaee4b2b02e941c83f1 100644
--- a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
+++ b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
@@ -23,6 +23,7 @@
+
@@ -42,6 +43,7 @@
t.glue_switch,
t.glue_source,
t.glue_remark,
+ t.glue_updatetime,
t.child_jobkey
@@ -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}
);