SysJob.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. * Copyright (c) 2021-2025, LXQ All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: LXQ (609827073@qq.com)
  16. */
  17. package com.kxs.daemon.quartz.entity;
  18. import com.baomidou.mybatisplus.annotation.FieldFill;
  19. import com.baomidou.mybatisplus.annotation.IdType;
  20. import com.baomidou.mybatisplus.annotation.TableField;
  21. import com.baomidou.mybatisplus.annotation.TableId;
  22. import com.baomidou.mybatisplus.extension.activerecord.Model;
  23. import io.swagger.v3.oas.annotations.media.Schema;
  24. import lombok.AllArgsConstructor;
  25. import lombok.Builder;
  26. import lombok.Data;
  27. import lombok.NoArgsConstructor;
  28. import java.time.LocalDateTime;
  29. /**
  30. * 定时任务调度表
  31. *
  32. * @author LXQ
  33. */
  34. @Data
  35. @Builder
  36. @NoArgsConstructor
  37. @AllArgsConstructor
  38. @Schema(description = "定时任务")
  39. public class SysJob extends Model<SysJob> {
  40. private static final long serialVersionUID = 1L;
  41. /**
  42. * 任务id
  43. */
  44. @TableId(value = "job_id", type = IdType.ASSIGN_ID)
  45. private Long jobId;
  46. /**
  47. * 任务名称
  48. */
  49. private String jobName;
  50. /**
  51. * 任务组名
  52. */
  53. private String jobGroup;
  54. /**
  55. * 组内执行顺利,值越大执行优先级越高,最大值9,最小值1
  56. */
  57. private String jobOrder;
  58. /**
  59. * 1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他
  60. */
  61. private String jobType;
  62. /**
  63. * job_type=3时,rest调用地址,仅支持rest get协议,需要增加String返回值,0成功,1失败;job_type=4时,jar路径;其它值为空
  64. */
  65. private String executePath;
  66. /**
  67. * job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空
  68. */
  69. private String className;
  70. /**
  71. * 任务方法
  72. */
  73. private String methodName;
  74. /**
  75. * 参数值
  76. */
  77. private String methodParamsValue;
  78. /**
  79. * cron执行表达式
  80. */
  81. private String cronExpression;
  82. /**
  83. * 错失执行策略(1错失周期立即执行 2错失周期执行一次 3下周期执行)
  84. */
  85. private String misfirePolicy;
  86. /**
  87. * 1、多租户任务;2、非多租户任务
  88. */
  89. private String jobTenantType;
  90. /**
  91. * 状态(0、未发布;1、已发布;2、运行中;3、暂停;4、删除;)
  92. */
  93. private String jobStatus;
  94. /**
  95. * 状态(0正常 1异常)
  96. */
  97. private String jobExecuteStatus;
  98. /**
  99. * 创建者
  100. */
  101. @TableField(fill = FieldFill.INSERT)
  102. private String createBy;
  103. /**
  104. * 更新者
  105. */
  106. @TableField(fill = FieldFill.UPDATE)
  107. private String updateBy;
  108. /**
  109. * 创建时间
  110. */
  111. @TableField(fill = FieldFill.INSERT)
  112. private LocalDateTime createTime;
  113. /**
  114. * 修改时间
  115. */
  116. @TableField(fill = FieldFill.UPDATE)
  117. private LocalDateTime updateTime;
  118. /**
  119. * 首次执行时间
  120. */
  121. private LocalDateTime startTime;
  122. /**
  123. * 上次执行时间
  124. */
  125. private LocalDateTime previousTime;
  126. /**
  127. * 下次执行时间
  128. */
  129. private LocalDateTime nextTime;
  130. /**
  131. * 备注信息
  132. */
  133. private String remark;
  134. }