serv-定时任务
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
package org.xyzh.common.dto.crontab;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description 定时任务执行日志表
|
||||
* @filename TbCrontabLog.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-25
|
||||
*/
|
||||
public class TbCrontabLog extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* @description 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* @description 任务分组
|
||||
*/
|
||||
private String taskGroup;
|
||||
|
||||
/**
|
||||
* @description Bean名称
|
||||
*/
|
||||
private String beanName;
|
||||
|
||||
/**
|
||||
* @description 方法名称
|
||||
*/
|
||||
private String methodName;
|
||||
|
||||
/**
|
||||
* @description 方法参数
|
||||
*/
|
||||
private String methodParams;
|
||||
|
||||
/**
|
||||
* @description 执行状态(0:失败 1:成功)
|
||||
*/
|
||||
private Integer executeStatus;
|
||||
|
||||
/**
|
||||
* @description 执行结果信息
|
||||
*/
|
||||
private String executeMessage;
|
||||
|
||||
/**
|
||||
* @description 异常信息
|
||||
*/
|
||||
private String exceptionInfo;
|
||||
|
||||
/**
|
||||
* @description 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* @description 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* @description 执行时长(毫秒)
|
||||
*/
|
||||
private Integer executeDuration;
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskGroup() {
|
||||
return taskGroup;
|
||||
}
|
||||
|
||||
public void setTaskGroup(String taskGroup) {
|
||||
this.taskGroup = taskGroup;
|
||||
}
|
||||
|
||||
public String getBeanName() {
|
||||
return beanName;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
public String getMethodName() {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
public void setMethodName(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public String getMethodParams() {
|
||||
return methodParams;
|
||||
}
|
||||
|
||||
public void setMethodParams(String methodParams) {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
public Integer getExecuteStatus() {
|
||||
return executeStatus;
|
||||
}
|
||||
|
||||
public void setExecuteStatus(Integer executeStatus) {
|
||||
this.executeStatus = executeStatus;
|
||||
}
|
||||
|
||||
public String getExecuteMessage() {
|
||||
return executeMessage;
|
||||
}
|
||||
|
||||
public void setExecuteMessage(String executeMessage) {
|
||||
this.executeMessage = executeMessage;
|
||||
}
|
||||
|
||||
public String getExceptionInfo() {
|
||||
return exceptionInfo;
|
||||
}
|
||||
|
||||
public void setExceptionInfo(String exceptionInfo) {
|
||||
this.exceptionInfo = exceptionInfo;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Integer getExecuteDuration() {
|
||||
return executeDuration;
|
||||
}
|
||||
|
||||
public void setExecuteDuration(Integer executeDuration) {
|
||||
this.executeDuration = executeDuration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbCrontabLog{" +
|
||||
"id=" + getID() +
|
||||
", taskId='" + taskId + '\'' +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", taskGroup='" + taskGroup + '\'' +
|
||||
", executeStatus=" + executeStatus +
|
||||
", startTime=" + startTime +
|
||||
", endTime=" + endTime +
|
||||
", executeDuration=" + executeDuration +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
package org.xyzh.common.dto.crontab;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description 定时任务配置表
|
||||
* @filename TbCrontabTask.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-25
|
||||
*/
|
||||
public class TbCrontabTask extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* @description 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* @description 任务分组
|
||||
*/
|
||||
private String taskGroup;
|
||||
|
||||
/**
|
||||
* @description Bean名称
|
||||
*/
|
||||
private String beanName;
|
||||
|
||||
/**
|
||||
* @description 方法名称
|
||||
*/
|
||||
private String methodName;
|
||||
|
||||
/**
|
||||
* @description 方法参数
|
||||
*/
|
||||
private String methodParams;
|
||||
|
||||
/**
|
||||
* @description Cron表达式
|
||||
*/
|
||||
private String cronExpression;
|
||||
|
||||
/**
|
||||
* @description 任务状态(0:暂停 1:运行中)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* @description 任务描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 是否允许并发执行(0:否 1:是)
|
||||
*/
|
||||
private Integer concurrent;
|
||||
|
||||
/**
|
||||
* @description 错过执行策略(1:立即执行 2:执行一次 3:放弃执行)
|
||||
*/
|
||||
private Integer misfirePolicy;
|
||||
|
||||
/**
|
||||
* @description 创建者
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新者
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskGroup() {
|
||||
return taskGroup;
|
||||
}
|
||||
|
||||
public void setTaskGroup(String taskGroup) {
|
||||
this.taskGroup = taskGroup;
|
||||
}
|
||||
|
||||
public String getBeanName() {
|
||||
return beanName;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
public String getMethodName() {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
public void setMethodName(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public String getMethodParams() {
|
||||
return methodParams;
|
||||
}
|
||||
|
||||
public void setMethodParams(String methodParams) {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
public String getCronExpression() {
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression(String cronExpression) {
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Integer getConcurrent() {
|
||||
return concurrent;
|
||||
}
|
||||
|
||||
public void setConcurrent(Integer concurrent) {
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
|
||||
public Integer getMisfirePolicy() {
|
||||
return misfirePolicy;
|
||||
}
|
||||
|
||||
public void setMisfirePolicy(Integer misfirePolicy) {
|
||||
this.misfirePolicy = misfirePolicy;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbCrontabTask{" +
|
||||
"id=" + getID() +
|
||||
", taskId='" + taskId + '\'' +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", taskGroup='" + taskGroup + '\'' +
|
||||
", beanName='" + beanName + '\'' +
|
||||
", methodName='" + methodName + '\'' +
|
||||
", cronExpression='" + cronExpression + '\'' +
|
||||
", status=" + status +
|
||||
", concurrent=" + concurrent +
|
||||
", misfirePolicy=" + misfirePolicy +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
package org.xyzh.common.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description 定时任务日志视图对象
|
||||
* @filename CrontabLogVO.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-25
|
||||
*/
|
||||
public class CrontabLogVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 日志ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* @description 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* @description 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* @description 任务分组
|
||||
*/
|
||||
private String taskGroup;
|
||||
|
||||
/**
|
||||
* @description Bean名称
|
||||
*/
|
||||
private String beanName;
|
||||
|
||||
/**
|
||||
* @description 方法名称
|
||||
*/
|
||||
private String methodName;
|
||||
|
||||
/**
|
||||
* @description 方法参数
|
||||
*/
|
||||
private String methodParams;
|
||||
|
||||
/**
|
||||
* @description 执行状态(0:失败 1:成功)
|
||||
*/
|
||||
private Integer executeStatus;
|
||||
|
||||
/**
|
||||
* @description 执行结果信息
|
||||
*/
|
||||
private String executeMessage;
|
||||
|
||||
/**
|
||||
* @description 异常信息
|
||||
*/
|
||||
private String exceptionInfo;
|
||||
|
||||
/**
|
||||
* @description 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* @description 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* @description 执行时长(毫秒)
|
||||
*/
|
||||
private Integer executeDuration;
|
||||
|
||||
/**
|
||||
* @description 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskGroup() {
|
||||
return taskGroup;
|
||||
}
|
||||
|
||||
public void setTaskGroup(String taskGroup) {
|
||||
this.taskGroup = taskGroup;
|
||||
}
|
||||
|
||||
public String getBeanName() {
|
||||
return beanName;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
public String getMethodName() {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
public void setMethodName(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public String getMethodParams() {
|
||||
return methodParams;
|
||||
}
|
||||
|
||||
public void setMethodParams(String methodParams) {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
public Integer getExecuteStatus() {
|
||||
return executeStatus;
|
||||
}
|
||||
|
||||
public void setExecuteStatus(Integer executeStatus) {
|
||||
this.executeStatus = executeStatus;
|
||||
}
|
||||
|
||||
public String getExecuteMessage() {
|
||||
return executeMessage;
|
||||
}
|
||||
|
||||
public void setExecuteMessage(String executeMessage) {
|
||||
this.executeMessage = executeMessage;
|
||||
}
|
||||
|
||||
public String getExceptionInfo() {
|
||||
return exceptionInfo;
|
||||
}
|
||||
|
||||
public void setExceptionInfo(String exceptionInfo) {
|
||||
this.exceptionInfo = exceptionInfo;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Integer getExecuteDuration() {
|
||||
return executeDuration;
|
||||
}
|
||||
|
||||
public void setExecuteDuration(Integer executeDuration) {
|
||||
this.executeDuration = executeDuration;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CrontabLogVO{" +
|
||||
"id='" + id + '\'' +
|
||||
", taskId='" + taskId + '\'' +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", executeStatus=" + executeStatus +
|
||||
", startTime=" + startTime +
|
||||
", endTime=" + endTime +
|
||||
", executeDuration=" + executeDuration +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
package org.xyzh.common.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description 定时任务视图对象
|
||||
* @filename CrontabTaskVO.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-25
|
||||
*/
|
||||
public class CrontabTaskVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* @description 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* @description 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* @description 任务分组
|
||||
*/
|
||||
private String taskGroup;
|
||||
|
||||
/**
|
||||
* @description Bean名称
|
||||
*/
|
||||
private String beanName;
|
||||
|
||||
/**
|
||||
* @description 方法名称
|
||||
*/
|
||||
private String methodName;
|
||||
|
||||
/**
|
||||
* @description 方法参数
|
||||
*/
|
||||
private String methodParams;
|
||||
|
||||
/**
|
||||
* @description Cron表达式
|
||||
*/
|
||||
private String cronExpression;
|
||||
|
||||
/**
|
||||
* @description 任务状态(0:暂停 1:运行中)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* @description 任务描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 是否允许并发执行(0:否 1:是)
|
||||
*/
|
||||
private Integer concurrent;
|
||||
|
||||
/**
|
||||
* @description 错过执行策略(1:立即执行 2:执行一次 3:放弃执行)
|
||||
*/
|
||||
private Integer misfirePolicy;
|
||||
|
||||
/**
|
||||
* @description 下次执行时间
|
||||
*/
|
||||
private Date nextExecuteTime;
|
||||
|
||||
/**
|
||||
* @description 创建者
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* @description 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskGroup() {
|
||||
return taskGroup;
|
||||
}
|
||||
|
||||
public void setTaskGroup(String taskGroup) {
|
||||
this.taskGroup = taskGroup;
|
||||
}
|
||||
|
||||
public String getBeanName() {
|
||||
return beanName;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
public String getMethodName() {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
public void setMethodName(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public String getMethodParams() {
|
||||
return methodParams;
|
||||
}
|
||||
|
||||
public void setMethodParams(String methodParams) {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
public String getCronExpression() {
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression(String cronExpression) {
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Integer getConcurrent() {
|
||||
return concurrent;
|
||||
}
|
||||
|
||||
public void setConcurrent(Integer concurrent) {
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
|
||||
public Integer getMisfirePolicy() {
|
||||
return misfirePolicy;
|
||||
}
|
||||
|
||||
public void setMisfirePolicy(Integer misfirePolicy) {
|
||||
this.misfirePolicy = misfirePolicy;
|
||||
}
|
||||
|
||||
public Date getNextExecuteTime() {
|
||||
return nextExecuteTime;
|
||||
}
|
||||
|
||||
public void setNextExecuteTime(Date nextExecuteTime) {
|
||||
this.nextExecuteTime = nextExecuteTime;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CrontabTaskVO{" +
|
||||
"id='" + id + '\'' +
|
||||
", taskId='" + taskId + '\'' +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", taskGroup='" + taskGroup + '\'' +
|
||||
", cronExpression='" + cronExpression + '\'' +
|
||||
", status=" + status +
|
||||
", nextExecuteTime=" + nextExecuteTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user