|
@@ -9,18 +9,18 @@ import java.util.stream.Stream;
|
|
|
* Description: ${DESCRIPTION}
|
|
|
*/
|
|
|
public enum EmailCron {
|
|
|
- EVERY_HOUR("1", "0 0 0/1 * * *"), ONE_AM("2", "0 0 1 * * *");
|
|
|
+ EVERY_HOUR(1, "0 0 0/1 * * *"), ONE_AM(2, "0 0 1 * * *");
|
|
|
|
|
|
- private final String text;
|
|
|
+ private final Integer text;
|
|
|
private final String cron;
|
|
|
|
|
|
- EmailCron(String text, String cron)
|
|
|
+ EmailCron(Integer text, String cron)
|
|
|
{
|
|
|
this.text = text;
|
|
|
this.cron = cron;
|
|
|
}
|
|
|
|
|
|
- public static EmailCron getEmailCronByText(String text) {
|
|
|
+ public static EmailCron getEmailCronByText(Integer text) {
|
|
|
if (null == text){
|
|
|
return null;
|
|
|
}
|
|
@@ -36,7 +36,7 @@ public enum EmailCron {
|
|
|
return Stream.of(EmailCron.values()).filter(e -> e.cron.equals(cron)).findFirst().orElse(null);
|
|
|
}
|
|
|
|
|
|
- public String getText()
|
|
|
+ public Integer getText()
|
|
|
{
|
|
|
return text;
|
|
|
}
|