初始代码

This commit is contained in:
wangmingwei
2026-04-21 17:18:06 +08:00
parent ac9e431f80
commit aa74bd741e
259 changed files with 45901 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>yunzhupaas-scheduletask-starter</artifactId>
<groupId>com.yunzhupaas</groupId>
<version>5.2.0-RELEASE</version>
</parent>
<artifactId>yunzhupaas-scheduletask-model</artifactId>
<packaging>jar</packaging>
<description>共同模型</description>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,38 @@
package com.yunzhupaas.scheduletask.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* 任务调度实体类
*
* @author :云筑产品开发平台组
* @version: V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2022/3/23 9:51
*/
@Data
@TableName("base_handlername")
public class HandlerNameEntity {
/**
* 定时任务主键
*/
@TableId("F_ID")
private String id;
/**
* 任务编码
*/
@TableField("F_HANDLERNAME")
private String handlerName;
/**
* 任务名称
*/
@TableField("F_EXECUTOR")
private String executor;
}

View File

@@ -0,0 +1,148 @@
package com.yunzhupaas.scheduletask.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* 任务调度实体类
*
* @author :云筑产品开发平台组
* @version: V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2022/3/23 9:51
*/
@Data
@TableName("base_timetask")
public class TimeTaskEntity {
/**
* 定时任务主键
*/
@TableId("F_ID")
private String id;
/**
* 任务编码
*/
@TableField("F_ENCODE")
private String enCode;
/**
* 任务名称
*/
@TableField("F_FULLNAME")
private String fullName;
/**
* 执行类型 1.接口 2.存储过程
*/
@TableField("F_EXECUTETYPE")
private String executeType;
/**
* 执行内容
*/
@TableField("F_EXECUTECONTENT")
private String executeContent;
/**
* 执行周期
*/
@TableField("F_EXECUTECYCLEJSON")
private String executeCycleJson;
/**
* 最后运行时间
*/
@TableField("F_LASTRUNTIME")
private Date lastRunTime;
/**
* 下次运行时间
*/
@TableField("F_NEXTRUNTIME")
private Date nextRunTime;
/**
* 运行次数
*/
@TableField("F_RUNCOUNT")
private Integer runCount;
/**
* 描述
*/
@TableField("F_DESCRIPTION")
private String description;
/**
* 排序码
*/
@TableField("F_SORTCODE")
private Long sortCode;
/**
* 有效标志
*/
@TableField("F_ENABLEDMARK")
private Integer enabledMark;
/**
* 创建时间
*/
@TableField(value = "F_CREATORTIME")
private Date creatorTime;
/**
* 创建用户
*/
@TableField(value = "F_CREATORUSERID")
private String creatorUserId;
/**
* 修改时间
*/
@TableField(value = "F_LASTMODIFYTIME")
private Date lastModifyTime;
/**
* 修改用户
*/
@TableField(value = "F_LASTMODIFYUSERID")
private String lastModifyUserId;
/**
* 删除标志
*/
@TableField("F_DELETEMARK")
private Integer deleteMark;
/**
* 删除时间
*/
@TableField("F_DELETETIME")
private Date deleteTime;
/**
* 删除用户
*/
@TableField("F_DELETEUSERID")
private String deleteUserId;
/**
* 删除用户
*/
@TableField("F_EXECUTORNAME")
private String executorName;
/**
* 删除用户
*/
@TableField("F_TenantId")
private String tenantId;
}

View File

@@ -0,0 +1,51 @@
package com.yunzhupaas.scheduletask.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* 定时任务记录
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
@Data
@TableName("base_timetasklog")
public class TimeTaskLogEntity {
/**
* 执行任务主键
*/
@TableId("F_ID")
private String id;
/**
* 定时任务主键
*/
@TableField("F_TASKID")
private String taskId;
/**
* 执行时间
*/
@TableField("F_RUNTIME")
private Date runTime;
/**
* 执行结果
*/
@TableField("F_RUNRESULT")
private Integer runResult;
/**
* 执行说明
*/
@TableField("F_DESCRIPTION")
private String description;
}

View File

@@ -0,0 +1,52 @@
package com.yunzhupaas.scheduletask.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* Created by xuxueli on 16/9/30.
*/
@Data
@TableName("xxl_job_group")
public class XxlJobGroup {
@TableId(type = IdType.ASSIGN_ID)
private String id;
@TableField("APP_NAME")
private String appname;
@TableField("TITLE")
private String title;
@TableField("ADDRESS_TYPE")
private int addressType;
// 执行器地址类型0=自动注册、1=手动录入
@TableField("ADDRESS_LIST")
private String addressList; // 执行器地址列表,多地址逗号分隔(手动录入)
@TableField("UPDATE_TIME")
private Date updateTime;
// registry list
@TableField(exist = false)
private List<String> registryList; // 执行器地址列表(系统注册)
public List<String> getRegistryList() {
if (addressList!=null && addressList.trim().length()>0) {
registryList = new ArrayList<String>(Arrays.asList(addressList.split(",")));
}
return registryList;
}
}

View File

@@ -0,0 +1,92 @@
package com.yunzhupaas.scheduletask.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* xxl-job info
*
* @author xuxueli 2016-1-12 18:25:49
*/
@Data
@TableName("xxl_job_info")
public class XxlJobInfo {
@TableId(type = IdType.ASSIGN_ID)
private String id; // 主键ID
@TableField("JOB_GROUP")
private String jobGroup; // 执行器主键ID
@TableField("JOB_DESC")
private String jobDesc;
@TableField("ADD_TIME")
private Date addTime;
@TableField("UPDATE_TIME")
private Date updateTime;
@TableField("AUTHOR")
private String author; // 负责人
@TableField("ALARM_EMAIL")
private String alarmEmail; // 报警邮件
@TableField("SCHEDULE_TYPE")
private String scheduleType; // 调度类型
@TableField("SCHEDULE_CONF")
private String scheduleConf; // 调度配置,值含义取决于调度类型
@TableField("MISFIRE_STRATEGY")
private String misfireStrategy; // 调度过期策略
@TableField("EXECUTOR_ROUTE_STRATEGY")
private String executorRouteStrategy; // 执行器路由策略
@TableField("EXECUTOR_HANDLER")
private String executorHandler; // 执行器任务Handler名称
@TableField("EXECUTOR_PARAM")
private String executorParam; // 执行器,任务参数
@TableField("EXECUTOR_BLOCK_STRATEGY")
private String executorBlockStrategy; // 阻塞处理策略
@TableField("EXECUTOR_TIMEOUT")
private int executorTimeout; // 任务执行超时时间,单位秒
@TableField("EXECUTOR_FAIL_RETRY_COUNT")
private int executorFailRetryCount; // 失败重试次数
@TableField("GLUE_TYPE")
private String glueType; // GLUE类型 #com.xxl.job.core.glue.GlueTypeEnum
@TableField("GLUE_SOURCE")
private String glueSource; // GLUE源代码
@TableField("GLUE_REMARK")
private String glueRemark; // GLUE备注
@TableField("GLUE_UPDATETIME")
private Date glueUpdatetime; // GLUE更新时间
@TableField("CHILD_JOBID")
private String childJobId; // 子任务ID多个逗号分隔
@TableField("TRIGGER_STATUS")
private int triggerStatus; // 调度状态0-停止1-运行
@TableField("TRIGGER_LAST_TIME")
private long triggerLastTime; // 上次调度时间
@TableField("TRIGGER_NEXT_TIME")
private long triggerNextTime; // 下次调度时间
/**
* 租户编码
* @return
*/
@TableField("TENANTID")
private String tenantId;
/**
* 租户编码
* @return
*/
@TableField("TASKID")
private String taskId;
}

View File

@@ -0,0 +1,61 @@
package com.yunzhupaas.scheduletask.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* xxl-job log, used to track trigger process
* @author xuxueli 2015-12-19 23:19:09
*/
@Data
@TableName("xxl_job_log")
public class XxlJobLog {
@TableId(type = IdType.ASSIGN_ID)
private String id;
// job info
@TableField("JOB_GROUP")
private String jobGroup;
@TableField("JOB_ID")
private String jobId;
// execute info
@TableField("EXECUTOR_ADDRESS")
private String executorAddress;
@TableField("EXECUTOR_HANDLER")
private String executorHandler;
@TableField("EXECUTOR_PARAM")
private String executorParam;
@TableField("EXECUTOR_SHARDING_PARAM")
private String executorShardingParam;
@TableField("EXECUTOR_FAIL_RETRY_COUNT")
private int executorFailRetryCount;
// trigger info
@TableField("TRIGGER_TIME")
private Date triggerTime;
@TableField("TRIGGER_CODE")
private int triggerCode;
@TableField("TRIGGER_MSG")
private String triggerMsg;
// handle info
@TableField("HANDLE_TIME")
private Date handleTime;
@TableField("HANDLE_CODE")
private int handleCode;
@TableField("HANDLE_MSG")
private String handleMsg;
// alarm info
@TableField("ALARM_STATUS")
private int alarmStatus;
}

View File

@@ -0,0 +1,73 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
import java.util.List;
import com.yunzhupaas.base.UserInfo;
import com.yunzhupaas.model.visualJson.TemplateJsonModel;
/**
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/12 15:31
*/
@Data
public class ContentNewModel {
/**
* 表达式设置
*/
private String cron;
/**
* 数据接口Id
*/
private String interfaceId;
/**
* 数据接口名称
*/
private String interfaceName;
/**
* 本地任务Id
*/
private String localHostTaskId;
// /**
// * 租户id
// */
// private String tenantId;
//
// /**
// * 租户库
// */
// private String tenantDbConnectionString;
/**
* 用户信息
*/
private UserInfo userInfo;
/**
* token
*/
private String token;
/**
* 开始时间
*/
private Long startTime;
/**
* 结束时间
*/
private Long endTime;
private String executeType;
/**
* 请求参数
*/
private List<TemplateJsonModel> parameter;
}

View File

@@ -0,0 +1,43 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
import com.yunzhupaas.base.UserInfo;
import jakarta.validation.constraints.NotBlank;
/**
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/12 15:31
*/
@Data
public class TaskCrForm {
private String id;
@NotBlank(message = "必填")
private String fullName;
@NotBlank(message = "必填")
private String executeType;
private String description;
@NotBlank(message = "必填")
private String executeContent;
private long sortCode;
private String enCode;
private Integer enabledMark;
private UserInfo userInfo;
/**
* 开始时间
*/
private Long startTime;
/**
* 结束时间
*/
private Long endTime;
}

View File

@@ -0,0 +1,23 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
/**
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/12 15:31
*/
@Data
public class TaskInfoVO {
private String id;
private String fullName;
private String executeType;
private String description;
private String executeContent;
private Long sortCode;
private String enCode;
private Integer enabledMark;
}

View File

@@ -0,0 +1,22 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
/**
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/12 15:31
*/
@Data
public class TaskLogVO {
private String description;
private String id;
private Integer runResult;
private Long runTime;
}

View File

@@ -0,0 +1,35 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
import java.io.Serializable;
/**
* 展示本地方法列表使用
*
* @author :云筑产品开发平台组
* @version: V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2022/3/9 15:40
*/
@Data
public class TaskMethodsVO implements Serializable {
// 展示使用-------------
/**
* id
*/
private String id;
/**
* 展示的方法名
*/
private String fullName;
/**
* 方法说明
*/
private String description;
}

View File

@@ -0,0 +1,23 @@
package com.yunzhupaas.scheduletask.model;
import com.yunzhupaas.base.Pagination;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司http://www.szlecheng.cn
* @date 2021/5/18
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class TaskPage extends Pagination {
private Integer runResult;
private Long startTime;
private Long endTime;
}

View File

@@ -0,0 +1,47 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
/**
* 任务调度参数
*
* @author :云筑产品开发平台组
* @version: V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2022/3/8 17:10
*/
@Data
public class TaskParameterModel {
private String id;
/**
* 默认值
*/
private String defaultValue;
/**
* 字段名
*/
private String field;
/**
* 数据类型
*/
private String dataType;
/**
* 是否必填
*/
private String required;
/**
* 字段说明
*/
private String fieldName;
/**
* 值
*/
private String value;
/**
* 值
*/
private String relationField;
}

View File

@@ -0,0 +1,17 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/12 15:31
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class TaskUpForm extends TaskCrForm {
}

View File

@@ -0,0 +1,34 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
/**
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/12 15:31
*/
@Data
public class TaskVO {
private String fullName;
private String enCode;
private String runCount;
private Long lastRunTime;
private Long nextRunTime;
private String description;
private String id;
private Integer enabledMark;
private Long sortCode;
/**
* 开始时间
*/
private Long startTime;
/**
* 结束时间
*/
private Long endTime;
}

View File

@@ -0,0 +1,18 @@
package com.yunzhupaas.scheduletask.model;
import lombok.Data;
import java.io.Serializable;
import com.yunzhupaas.base.UserInfo;
import com.yunzhupaas.scheduletask.entity.TimeTaskEntity;
@Data
public class UpdateTaskModel implements Serializable {
private TimeTaskEntity entity;
private UserInfo userInfo;
}