This commit is contained in:
张良(004796)
2024-01-30 11:39:38 +08:00
parent d0bfbf36a1
commit 135f45d2c3
18 changed files with 407 additions and 37 deletions

View File

@@ -18,4 +18,14 @@ public enum SystemPushGroupIdEnum {
this.code = code;
this.text = text;
}
public static SystemPushGroupIdEnum getByCode(Integer groupId) {
SystemPushGroupIdEnum[] values = SystemPushGroupIdEnum.values();
for (SystemPushGroupIdEnum value : values) {
if(value.getCode().equals(groupId)){
return value;
}
}
return null;
}
}

View File

@@ -4,7 +4,7 @@ import lombok.Getter;
// 推送状态:0=未推送,1=推送中,2=推送失败,3=推送成功
@Getter
public enum SystemPushLogStatus {
public enum SystemPushLogStatusEnum {
NO_SEND(0,"未推送"),
SENDING(1,"推送中"),
SEND_FAIL(2,"推送失败"),
@@ -13,7 +13,7 @@ public enum SystemPushLogStatus {
private final Integer code;
private final String text;
SystemPushLogStatus(Integer code, String text) {
SystemPushLogStatusEnum(Integer code, String text) {
this.code = code;
this.text = text;
}

View File

@@ -16,4 +16,14 @@ public enum SystemPushSendTimeTypeEnum {
this.code = code;
this.text = text;
}
public static SystemPushSendTimeTypeEnum getByCode(Integer sendTimeType) {
SystemPushSendTimeTypeEnum[] values = SystemPushSendTimeTypeEnum.values();
for (SystemPushSendTimeTypeEnum value : values) {
if(value.getCode().equals(sendTimeType)){
return value;
}
}
return null;
}
}

View File

@@ -9,6 +9,8 @@ public enum SystemPushStatusEnum {
RUNNING(1,"执行中"),
QUEUE_RUNNING(2,"队列执行中"),
COMPLETE(3,"已完成"),
CLOSE(4,"已取消"),
FAIL(10,"执行失败"),
;
private final Integer code;
private final String text;