Compare commits

...

2 Commits

Author SHA1 Message Date
孙小云 3a9b077abe Merge branch 'main' of http://th.local.t-aaron.com:13000/THENG/a-cloud-all 2026-03-06 09:19:47 +08:00
孙小云 af9aa18353 xx 2026-03-06 09:19:43 +08:00
4 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,32 @@
package com.ruoyi.task.api.enums;
public enum CycleTypeEnum {
DAILY("daily", "日周期"),
WEEKLY("weekly", "周周期"),
MONTHLY("monthly", "月周期");
private final String code;
private final String name;
CycleTypeEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public static CycleTypeEnum getByCode(String code) {
for (CycleTypeEnum type : values()) {
if (type.code.equals(code)) {
return type;
}
}
return null;
}
}

View File

@ -0,0 +1,31 @@
package com.ruoyi.task.api.enums;
public enum ExecuteTypeEnum {
ONCE("once", "单次执行"),
CONTINUOUS("continuous", "连续执行");
private final String code;
private final String name;
ExecuteTypeEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public static ExecuteTypeEnum getByCode(String code) {
for (ExecuteTypeEnum type : values()) {
if (type.code.equals(code)) {
return type;
}
}
return null;
}
}

View File

@ -0,0 +1,31 @@
package com.ruoyi.task.api.enums;
public enum PlanTypeEnum {
TIMED("timed", "定时任务"),
CYCLE("cycle", "周期任务");
private final String code;
private final String name;
PlanTypeEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public static PlanTypeEnum getByCode(String code) {
for (PlanTypeEnum type : values()) {
if (type.code.equals(code)) {
return type;
}
}
return null;
}
}

View File

@ -0,0 +1,34 @@
package com.ruoyi.task.api.enums;
public enum StatusEnum {
PENDING("pending", "待执行"),
RUNNING("running", "执行中"),
COMPLETED("completed", "已完成"),
FAILED("failed", "失败"),
CANCELED("canceled", "已取消");
private final String code;
private final String name;
StatusEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public static StatusEnum getByCode(String code) {
for (StatusEnum status : values()) {
if (status.code.equals(code)) {
return status;
}
}
return null;
}
}