From 9651a7d7fc670f28ef0eb8773cdbb169adce0be4 Mon Sep 17 00:00:00 2001 From: xivLi <13191800224@163.com> Date: Sat, 22 May 2021 15:52:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E5=8E=BButils.uuid=E4=B8=8B=20IdU?= =?UTF-8?q?tils=E7=B1=BB=E4=B8=AD=20=E5=A4=9A=E4=BD=99=E7=9A=84import(?= =?UTF-8?q?=E5=90=8C=E5=8C=85=E4=B8=8B=E7=9A=84UUID=E7=B1=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/utils/uuid/IdUtils.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java index eb78f6f..6f9577f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java @@ -1,21 +1,17 @@ package com.ruoyi.common.utils.uuid; -import com.ruoyi.common.utils.uuid.UUID; - /** * ID生成器工具类 * * @author ruoyi */ -public class IdUtils -{ +public class IdUtils { /** * 获取随机UUID * * @return 随机UUID */ - public static String randomUUID() - { + public static String randomUUID() { return UUID.randomUUID().toString(); } @@ -24,8 +20,7 @@ public class IdUtils * * @return 简化的UUID,去掉了横线 */ - public static String simpleUUID() - { + public static String simpleUUID() { return UUID.randomUUID().toString(true); } @@ -34,8 +29,7 @@ public class IdUtils * * @return 随机UUID */ - public static String fastUUID() - { + public static String fastUUID() { return UUID.fastUUID().toString(); } @@ -44,8 +38,7 @@ public class IdUtils * * @return 简化的UUID,去掉了横线 */ - public static String fastSimpleUUID() - { + public static String fastSimpleUUID() { return UUID.fastUUID().toString(true); } } From f3e5d908d61f8f6946d099c474d3bb21b413e4c9 Mon Sep 17 00:00:00 2001 From: xivLi <13191800224@163.com> Date: Sat, 22 May 2021 16:05:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?quartz=E6=A8=A1=E5=9D=97=E4=B8=8B=20domain?= =?UTF-8?q?=E5=8C=85=E4=B8=AD=E7=9A=84=20SysJob=E7=B1=BB=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=AE=9E=E7=8E=B0Serializable=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/quartz/domain/SysJob.java | 80 ++++++------------- 1 file changed, 26 insertions(+), 54 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java index e9b8071..9fca0c7 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java @@ -1,6 +1,5 @@ package com.ruoyi.quartz.domain; -import java.io.Serializable; import java.util.Date; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; @@ -19,8 +18,7 @@ import com.ruoyi.quartz.util.CronUtils; * * @author ruoyi */ -public class SysJob extends BaseEntity implements Serializable -{ +public class SysJob extends BaseEntity { private static final long serialVersionUID = 1L; /** 任务ID */ @@ -55,118 +53,92 @@ public class SysJob extends BaseEntity implements Serializable @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停") private String status; - public Long getJobId() - { + public Long getJobId() { return jobId; } - public void setJobId(Long jobId) - { + public void setJobId(Long jobId) { this.jobId = jobId; } @NotBlank(message = "任务名称不能为空") @Size(min = 0, max = 64, message = "任务名称不能超过64个字符") - public String getJobName() - { + public String getJobName() { return jobName; } - public void setJobName(String jobName) - { + public void setJobName(String jobName) { this.jobName = jobName; } - public String getJobGroup() - { + public String getJobGroup() { return jobGroup; } - public void setJobGroup(String jobGroup) - { + public void setJobGroup(String jobGroup) { this.jobGroup = jobGroup; } @NotBlank(message = "调用目标字符串不能为空") @Size(min = 0, max = 500, message = "调用目标字符串长度不能超过500个字符") - public String getInvokeTarget() - { + public String getInvokeTarget() { return invokeTarget; } - public void setInvokeTarget(String invokeTarget) - { + public void setInvokeTarget(String invokeTarget) { this.invokeTarget = invokeTarget; } @NotBlank(message = "Cron执行表达式不能为空") @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符") - public String getCronExpression() - { + public String getCronExpression() { return cronExpression; } - public void setCronExpression(String cronExpression) - { + public void setCronExpression(String cronExpression) { this.cronExpression = cronExpression; } @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - public Date getNextValidTime() - { - if (StringUtils.isNotEmpty(cronExpression)) - { + public Date getNextValidTime() { + if (StringUtils.isNotEmpty(cronExpression)) { return CronUtils.getNextExecution(cronExpression); } return null; } - public String getMisfirePolicy() - { + public String getMisfirePolicy() { return misfirePolicy; } - public void setMisfirePolicy(String misfirePolicy) - { + public void setMisfirePolicy(String misfirePolicy) { this.misfirePolicy = misfirePolicy; } - public String getConcurrent() - { + public String getConcurrent() { return concurrent; } - public void setConcurrent(String concurrent) - { + public void setConcurrent(String concurrent) { this.concurrent = concurrent; } - public String getStatus() - { + public String getStatus() { return status; } - public void setStatus(String status) - { + public void setStatus(String status) { this.status = status; } @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("jobId", getJobId()) - .append("jobName", getJobName()) - .append("jobGroup", getJobGroup()) - .append("cronExpression", getCronExpression()) - .append("nextValidTime", getNextValidTime()) - .append("misfirePolicy", getMisfirePolicy()) - .append("concurrent", getConcurrent()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("jobId", getJobId()) + .append("jobName", getJobName()).append("jobGroup", getJobGroup()) + .append("cronExpression", getCronExpression()).append("nextValidTime", getNextValidTime()) + .append("misfirePolicy", getMisfirePolicy()).append("concurrent", getConcurrent()) + .append("status", getStatus()).append("createBy", getCreateBy()).append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()) + .toString(); } }