提交 | 用户 | 时间
|
4eb113
|
1 |
package com.iailab.module.model.mcs.pre.enums; |
潘 |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* @author PanZhibao |
|
8 |
* @Description |
|
9 |
* @createTime 2024年11月11日 |
|
10 |
*/ |
|
11 |
@Getter |
|
12 |
@AllArgsConstructor |
|
13 |
public enum ItemRunStatusEnum { |
|
14 |
PROCESSING(1, "处理中"), |
|
15 |
SUCCESS(2, "成功"), |
|
16 |
FAIL(3, "失败"); |
|
17 |
|
|
18 |
private Integer code; |
|
19 |
private String desc; |
|
20 |
|
|
21 |
public static ItemRunStatusEnum getEumByCode(Integer code) { |
|
22 |
if (code == null) { |
|
23 |
return null; |
|
24 |
} |
|
25 |
|
|
26 |
for (ItemRunStatusEnum statusEnum : ItemRunStatusEnum.values()) { |
|
27 |
if (statusEnum.getCode().equals(code)) { |
|
28 |
return statusEnum; |
|
29 |
} |
|
30 |
} |
|
31 |
return null; |
|
32 |
} |
|
33 |
} |