package com.ruoyi.othervisit.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; /** * 其他随访模块的 yml 配置(仅作兜底,不是主开关)。 * *

⚠️ 主开关不在这里

* 主开关是 {@code sys_config} 参数配置表里的 {@code othervisit.enabled}, * 由 {@link OtherVisitSwitch} 运行时热读(进程内 10 秒缓存,改完最多 10 秒生效)。 * 本类只在「sys_config 里没有那一行」或「非 Spring 环境取不到配置服务」时兜底。 * *

为什么默认 true

* 手术随访是主力业务:关掉 = 当天手术患者的随访不再生成。 * 要关闭请到「系统管理 → 参数设置」显式把 {@code othervisit.enabled} 设为 false。 */ @Data @Component @ConfigurationProperties(prefix = "othervisit") public class OtherVisitProperties { /** * yml 兜底开关(默认 true) */ private boolean enabled = true; }