部分dto、vo

This commit is contained in:
2025-12-05 11:05:27 +08:00
parent 9a3547b70b
commit 917e9a517a
42 changed files with 2803 additions and 67 deletions

View File

@@ -1,7 +0,0 @@
package org.xyzh;
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

View File

@@ -0,0 +1,9 @@
package org.xyzh.api.crontab;
/**
* 定时任务服务接口
* 用于定时任务管理
*/
public interface CrontabService {
}

View File

@@ -0,0 +1,57 @@
package org.xyzh.api.crontab.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.fastjson2.annotation.JSONField;
import java.util.Date;
/**
* 定时任务执行日志DTO
* 用于记录任务执行情况
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务执行日志DTO")
public class TbCrontabLogDTO extends BaseDTO {
private static final long serialVersionUID = 1L;
@Schema(description = "任务ID")
private String taskId;
@Schema(description = "任务名称")
private String taskName;
@Schema(description = "任务分组")
private String taskGroup;
@Schema(description = "Bean名称")
private String beanName;
@Schema(description = "方法名称")
private String methodName;
@Schema(description = "方法参数")
private String methodParams;
@Schema(description = "执行状态0-失败/1-成功")
private Integer executeStatus;
@Schema(description = "执行结果信息")
private String executeMessage;
@Schema(description = "异常信息")
private String exceptionInfo;
@Schema(description = "开始时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
@Schema(description = "结束时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
@Schema(description = "执行时长(毫秒)")
private Integer executeDuration;
}

View File

@@ -0,0 +1,56 @@
package org.xyzh.api.crontab.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 定时任务DTO
* 用于创建和更新定时任务
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务DTO")
public class TbCrontabTaskDTO extends BaseDTO {
private static final long serialVersionUID = 1L;
@Schema(description = "任务ID更新时需要")
private String taskId;
@Schema(description = "任务名称")
private String taskName;
@Schema(description = "任务分组", defaultValue = "DEFAULT")
private String taskGroup;
@Schema(description = "任务元数据ID")
private String metaId;
@Schema(description = "是否使用默认接收人", defaultValue = "false")
private Boolean defaultRecipient;
@Schema(description = "Bean名称")
private String beanName;
@Schema(description = "方法名称")
private String methodName;
@Schema(description = "方法参数")
private String methodParams;
@Schema(description = "Cron表达式")
private String cronExpression;
@Schema(description = "任务状态0-暂停/1-运行中", defaultValue = "0")
private Integer status;
@Schema(description = "任务描述")
private String description;
@Schema(description = "是否允许并发执行", defaultValue = "false")
private Boolean concurrent;
@Schema(description = "错过执行策略1-立即执行/2-执行一次/3-放弃执行", defaultValue = "1")
private Integer misfirePolicy;
}

View File

@@ -0,0 +1,47 @@
package org.xyzh.api.crontab.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 定时任务元数据DTO
* 用于创建和更新任务元数据配置
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务元数据DTO")
public class TbCrontabTaskMetaDTO extends BaseDTO {
private static final long serialVersionUID = 1L;
@Schema(description = "元数据ID更新时需要")
private String metaId;
@Schema(description = "任务名称")
private String name;
@Schema(description = "任务描述")
private String description;
@Schema(description = "任务分类")
private String category;
@Schema(description = "Bean名称执行器类名")
private String beanName;
@Schema(description = "执行方法名")
private String methodName;
@Schema(description = "Python脚本路径")
private String scriptPath;
@Schema(description = "参数模板JSON格式")
private String paramSchema;
@Schema(description = "是否自动发布", defaultValue = "false")
private Boolean autoPublish;
@Schema(description = "排序号", defaultValue = "0")
private Integer sortOrder;
}

View File

@@ -0,0 +1,72 @@
package org.xyzh.api.crontab.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.fastjson2.annotation.JSONField;
import java.util.Date;
/**
* 定时任务执行日志VO
* 用于前端展示任务执行日志
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务执行日志VO")
public class CrontabLogVO extends BaseVO {
private static final long serialVersionUID = 1L;
@Schema(description = "日志ID")
private String logId;
@Schema(description = "任务ID")
private String taskId;
@Schema(description = "任务名称")
private String taskName;
@Schema(description = "任务分组")
private String taskGroup;
@Schema(description = "Bean名称")
private String beanName;
@Schema(description = "方法名称")
private String methodName;
@Schema(description = "方法参数")
private String methodParams;
@Schema(description = "执行状态0-失败/1-成功")
private Integer executeStatus;
@Schema(description = "执行状态名称")
private String executeStatusName;
@Schema(description = "执行状态颜色")
private String executeStatusColor;
@Schema(description = "执行结果信息")
private String executeMessage;
@Schema(description = "异常信息")
private String exceptionInfo;
@Schema(description = "是否有异常", defaultValue = "false")
private Boolean hasException;
@Schema(description = "开始时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
@Schema(description = "结束时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
@Schema(description = "执行时长(毫秒)")
private Integer executeDuration;
@Schema(description = "执行时长格式化显示")
private String executeDurationFormatted;
}

View File

@@ -0,0 +1,54 @@
package org.xyzh.api.crontab.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.fastjson2.annotation.JSONField;
import java.util.Date;
/**
* 定时任务列表VO
* 用于前端列表展示(简化版)
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务列表VO")
public class CrontabTaskListVO extends BaseVO {
private static final long serialVersionUID = 1L;
@Schema(description = "任务ID")
private String taskId;
@Schema(description = "任务名称")
private String taskName;
@Schema(description = "任务分组")
private String taskGroup;
@Schema(description = "Cron表达式")
private String cronExpression;
@Schema(description = "Cron表达式描述")
private String cronDescription;
@Schema(description = "任务状态")
private Integer status;
@Schema(description = "任务状态名称")
private String statusName;
@Schema(description = "下次执行时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date nextExecuteTime;
@Schema(description = "最后执行时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date lastExecuteTime;
@Schema(description = "最后执行状态")
private Integer lastExecuteStatus;
@Schema(description = "创建者姓名")
private String creatorName;
}

View File

@@ -0,0 +1,56 @@
package org.xyzh.api.crontab.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 定时任务元数据VO
* 用于前端展示任务元数据信息
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务元数据VO")
public class CrontabTaskMetaVO extends BaseVO {
private static final long serialVersionUID = 1L;
@Schema(description = "元数据ID")
private String metaId;
@Schema(description = "任务名称")
private String name;
@Schema(description = "任务描述")
private String description;
@Schema(description = "任务分类")
private String category;
@Schema(description = "Bean名称执行器类名")
private String beanName;
@Schema(description = "执行方法名")
private String methodName;
@Schema(description = "Python脚本路径")
private String scriptPath;
@Schema(description = "参数模板JSON格式")
private String paramSchema;
@Schema(description = "是否自动发布", defaultValue = "false")
private Boolean autoPublish;
@Schema(description = "排序号")
private Integer sortOrder;
@Schema(description = "关联的任务数量")
private Integer taskCount;
@Schema(description = "创建者姓名")
private String creatorName;
@Schema(description = "更新者姓名")
private String updaterName;
}

View File

@@ -0,0 +1,87 @@
package org.xyzh.api.crontab.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.fastjson2.annotation.JSONField;
import java.util.Date;
/**
* 定时任务VO
* 用于前端展示定时任务信息
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务VO")
public class CrontabTaskVO extends BaseVO {
private static final long serialVersionUID = 1L;
@Schema(description = "任务ID")
private String taskId;
@Schema(description = "任务名称")
private String taskName;
@Schema(description = "任务分组")
private String taskGroup;
@Schema(description = "任务元数据ID")
private String metaId;
@Schema(description = "元数据名称")
private String metaName;
@Schema(description = "是否使用默认接收人", defaultValue = "false")
private Boolean defaultRecipient;
@Schema(description = "Bean名称")
private String beanName;
@Schema(description = "方法名称")
private String methodName;
@Schema(description = "方法参数")
private String methodParams;
@Schema(description = "Cron表达式")
private String cronExpression;
@Schema(description = "Cron表达式描述中文")
private String cronDescription;
@Schema(description = "任务状态")
private Integer status;
@Schema(description = "任务状态名称")
private String statusName;
@Schema(description = "任务描述")
private String description;
@Schema(description = "是否允许并发执行", defaultValue = "false")
private Boolean concurrent;
@Schema(description = "错过执行策略")
private Integer misfirePolicy;
@Schema(description = "错过执行策略名称")
private String misfirePolicyName;
@Schema(description = "下次执行时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date nextExecuteTime;
@Schema(description = "最后执行时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date lastExecuteTime;
@Schema(description = "最后执行状态0-失败/1-成功")
private Integer lastExecuteStatus;
@Schema(description = "创建者姓名")
private String creatorName;
@Schema(description = "更新者姓名")
private String updaterName;
}