提交 | 用户 | 时间
|
ed4107
|
1 |
package com.iailab.module.model.enums; |
潘 |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* 调度模型触发方式 |
|
8 |
* |
|
9 |
* @author PanZhibao |
|
10 |
* @Description |
|
11 |
* @createTime 2024年12月31日 |
|
12 |
*/ |
|
13 |
@Getter |
|
14 |
@AllArgsConstructor |
|
15 |
public enum ScheduleTriggerMethodEnum { |
|
16 |
|
|
17 |
EVENT("1", "事件触发"), |
|
18 |
JOB("2", "定时触发"); |
|
19 |
|
|
20 |
private String code; |
|
21 |
private String desc; |
|
22 |
|
|
23 |
public static ScheduleTriggerMethodEnum getEumByCode(String code) { |
|
24 |
if (code == null) { |
|
25 |
return null; |
|
26 |
} |
|
27 |
|
|
28 |
for (ScheduleTriggerMethodEnum statusEnum : ScheduleTriggerMethodEnum.values()) { |
|
29 |
if (statusEnum.getCode().equals(code)) { |
|
30 |
return statusEnum; |
|
31 |
} |
|
32 |
} |
|
33 |
return null; |
|
34 |
} |
|
35 |
} |