bug--定时任务entity注解规范
This commit is contained in:
@ -1,12 +1,9 @@
|
|||||||
package co.yixiang.modules.quartz.domain;
|
package co.yixiang.modules.quartz.domain;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.bean.copier.CopyOptions;
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
import javax.persistence.*;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -14,58 +11,56 @@ import java.io.Serializable;
|
|||||||
* @author hupeng
|
* @author hupeng
|
||||||
* @date 2020-05-13
|
* @date 2020-05-13
|
||||||
*/
|
*/
|
||||||
@Entity
|
|
||||||
@Data
|
@Data
|
||||||
@Table(name="quartz_job")
|
@TableName("quartz_job")
|
||||||
public class QuartzJob implements Serializable {
|
public class QuartzJob implements Serializable {
|
||||||
|
|
||||||
public static final String JOB_KEY = "JOB_KEY";
|
public static final String JOB_KEY = "JOB_KEY";
|
||||||
|
|
||||||
/** 定时任务ID */
|
/** 定时任务ID */
|
||||||
@Id
|
@TableId
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
||||||
@Column(name = "id")
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
/** Spring Bean名称 */
|
/** Spring Bean名称 */
|
||||||
@Column(name = "bean_name")
|
//@Column(name = "bean_name")
|
||||||
private String beanName;
|
private String beanName;
|
||||||
|
|
||||||
|
|
||||||
/** cron 表达式 */
|
/** cron 表达式 */
|
||||||
@Column(name = "cron_expression")
|
//@Column(name = "cron_expression")
|
||||||
private String cronExpression;
|
private String cronExpression;
|
||||||
|
|
||||||
|
|
||||||
/** 状态:1暂停、0启用 */
|
/** 状态:1暂停、0启用 */
|
||||||
@Column(name = "is_pause")
|
//@Column(name = "is_pause")
|
||||||
private Boolean isPause;
|
private Boolean isPause;
|
||||||
|
|
||||||
|
|
||||||
/** 任务名称 */
|
/** 任务名称 */
|
||||||
@Column(name = "job_name")
|
//@Column(name = "job_name")
|
||||||
private String jobName;
|
private String jobName;
|
||||||
|
|
||||||
|
|
||||||
/** 方法名称 */
|
/** 方法名称 */
|
||||||
@Column(name = "method_name")
|
//@Column(name = "method_name")
|
||||||
private String methodName;
|
private String methodName;
|
||||||
|
|
||||||
|
|
||||||
/** 参数 */
|
/** 参数 */
|
||||||
@Column(name = "params")
|
//@Column(name = "params")
|
||||||
private String params;
|
private String params;
|
||||||
|
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@Column(name = "remark")
|
//@Column(name = "remark")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
/** 创建日期 */
|
/** 创建日期 */
|
||||||
@Column(name = "create_time")
|
//@Column(name = "create_time")
|
||||||
@TableField(fill= FieldFill.INSERT)
|
//@TableField(fill= FieldFill.INSERT)
|
||||||
private Timestamp createTime;
|
private Timestamp createTime;
|
||||||
|
|
||||||
public void copy(QuartzJob source){
|
public void copy(QuartzJob source){
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
package co.yixiang.modules.quartz.domain;
|
package co.yixiang.modules.quartz.domain;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.bean.copier.CopyOptions;
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -14,60 +12,59 @@ import java.io.Serializable;
|
|||||||
* @author hupeng
|
* @author hupeng
|
||||||
* @date 2020-05-13
|
* @date 2020-05-13
|
||||||
*/
|
*/
|
||||||
@Entity
|
|
||||||
@Data
|
@Data
|
||||||
@Table(name="quartz_log")
|
@TableName("quartz_log")
|
||||||
public class QuartzLog implements Serializable {
|
public class QuartzLog implements Serializable {
|
||||||
|
|
||||||
@Id
|
/** 任务日志ID */
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@TableId
|
||||||
@Column(name = "id")
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
/** 任务名称 */
|
/** 任务名称 */
|
||||||
@Column(name = "baen_name")
|
//@Column(name = "baen_name")
|
||||||
private String baenName;
|
private String baenName;
|
||||||
|
|
||||||
|
|
||||||
/** Bean名称 */
|
/** Bean名称 */
|
||||||
@Column(name = "create_time")
|
@Column(name = "create_time")
|
||||||
@TableField(fill= FieldFill.INSERT)
|
//@TableField(fill= FieldFill.INSERT)
|
||||||
private Timestamp createTime;
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
|
||||||
/** cron表达式 */
|
/** cron表达式 */
|
||||||
@Column(name = "cron_expression")
|
//@Column(name = "cron_expression")
|
||||||
private String cronExpression;
|
private String cronExpression;
|
||||||
|
|
||||||
|
|
||||||
/** 异常详细 */
|
/** 异常详细 */
|
||||||
@Column(name = "exception_detail")
|
//@Column(name = "exception_detail")
|
||||||
private String exceptionDetail;
|
private String exceptionDetail;
|
||||||
|
|
||||||
|
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
@Column(name = "is_success")
|
//@Column(name = "is_success")
|
||||||
private Boolean isSuccess;
|
private Boolean isSuccess;
|
||||||
|
|
||||||
|
|
||||||
/** 任务名称 */
|
/** 任务名称 */
|
||||||
@Column(name = "job_name")
|
//@Column(name = "job_name")
|
||||||
private String jobName;
|
private String jobName;
|
||||||
|
|
||||||
|
|
||||||
/** 方法名称 */
|
/** 方法名称 */
|
||||||
@Column(name = "method_name")
|
//@Column(name = "method_name")
|
||||||
private String methodName;
|
private String methodName;
|
||||||
|
|
||||||
|
|
||||||
/** 参数 */
|
/** 参数 */
|
||||||
@Column(name = "params")
|
//@Column(name = "params")
|
||||||
private String params;
|
private String params;
|
||||||
|
|
||||||
|
|
||||||
/** 耗时(毫秒) */
|
/** 耗时(毫秒) */
|
||||||
@Column(name = "time")
|
//@Column(name = "time")
|
||||||
private Long time;
|
private Long time;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user