liusheng
2026-10-10 33e1839c6214ad72cc5a76ae254ce0bb542e9263
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.ruoyi.quartz.enums;
 
/**
 * 省立同德门急诊采集参数(sys_config,机构 orgid=20001001)
 * <p>
 * 把配置 key、默认值、取值范围绑在一起,读取时只要传枚举本身,
 * 避免 key 和默认值写散在任务里、改一个漏一个
 *
 * @author smartor
 */
public enum MzGatherParamEnum {
 
    /**
     * 单轮采集时间预算(分钟)
     * 必须小于调度间隔,保证 30 分钟一调时本轮能赶在下一轮之前结束
     */
    BUDGET_MINUTES("sltd.gather.mz.budget.minutes", 20L, 1L, 24L * 60L),
 
    /** 分页每页条数 */
    PAGE_SIZE("sltd.gather.mz.page.size", 500L, 1L, 5000L),
 
    /** 单日最多翻页数,防止接口异常一直返回满页导致死循环 */
    MAX_PAGE("sltd.gather.mz.max.page", 2000L, 1L, 100000L);
 
    /** sys_config.config_key */
    private final String key;
    /** 配置缺失或超范围时使用的默认值 */
    private final long defaultValue;
    /** 允许的最小值(含) */
    private final long min;
    /** 允许的最大值(含) */
    private final long max;
 
    MzGatherParamEnum(String key, long defaultValue, long min, long max) {
        this.key = key;
        this.defaultValue = defaultValue;
        this.min = min;
        this.max = max;
    }
 
    public String getKey() {
        return key;
    }
 
    public long getDefaultValue() {
        return defaultValue;
    }
 
    public long getMin() {
        return min;
    }
 
    public long getMax() {
        return max;
    }
}