Powerjob-server 服务管理端 4.3.6 版本
zrj
2024-09-24 1216a77e26cb2c788fa6a78991e073e671f0f59d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package tech.powerjob.common.model;
 
import lombok.Data;
import tech.powerjob.common.serialize.JsonUtils;
 
/**
 * @author Echo009
 * @since 2022/3/22
 */
@Data
public class LifeCycle {
 
    public static final LifeCycle EMPTY_LIFE_CYCLE = new LifeCycle();
 
    private Long start;
 
    private Long end;
 
    public static LifeCycle parse(String lifeCycle){
        try {
           return JsonUtils.parseObject(lifeCycle,LifeCycle.class);
        }catch (Exception e){
            // ignore
            return EMPTY_LIFE_CYCLE;
        }
    }
 
}