liusheng
8 天以前 34f78281cf395a24e1f3f1c3b861186ff8a03b7b
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 com.ruoyi.othervisit.config;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
/**
 * 其他随访模块的 yml 配置(<b>仅作兜底,不是主开关</b>)。
 *
 * <h3>⚠️ 主开关不在这里</h3>
 * 主开关是 {@code sys_config} 参数配置表里的 {@code othervisit.enabled},
 * 由 {@link OtherVisitSwitch} <b>运行时热读</b>(进程内 10 秒缓存,改完最多 10 秒生效)。
 * 本类只在「sys_config 里没有那一行」或「非 Spring 环境取不到配置服务」时兜底。
 *
 * <h3>为什么默认 true</h3>
 * 手术随访是主力业务:关掉 = 当天手术患者的随访不再生成。
 * 要关闭请到「系统管理 → 参数设置」显式把 {@code othervisit.enabled} 设为 false。
 */
@Data
@Component
@ConfigurationProperties(prefix = "othervisit")
public class OtherVisitProperties {
 
    /**
     * yml 兜底开关(默认 true)
     */
    private boolean enabled = true;
}