| | |
| | | public class Parameter { |
| | | |
| | | private volatile static Parameter instance = null; |
| | | // 验证码开关 |
| | | private String codeSwitch; |
| | | private String ledDefaultMsg; |
| | | // 库位初始化口令 |
| | | private String locMastInitPwd; |
| | | |
| | | private Parameter(){ |
| | | private Parameter() { |
| | | } |
| | | |
| | | public static Parameter get(){ |
| | | if (instance == null){ |
| | | synchronized (Parameter.class){ |
| | | public static Parameter get() { |
| | | if (instance == null) { |
| | | synchronized (Parameter.class) { |
| | | instance = reset(); |
| | | return instance; |
| | | } |
| | |
| | | return instance; |
| | | } |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | public static Parameter reset() { |
| | | /** |
| | | * 重置 |
| | | */ |
| | | public static Parameter reset() { |
| | | ConfigService configService = SpringUtils.getBean(ConfigService.class); |
| | | List<Config> configs = configService.selectList(new EntityWrapper<Config>().eq("status", "1")); |
| | | Map<String, Object> data = new HashMap<>(); |
| | |
| | | instance = Cools.conver(data, Parameter.class); |
| | | return instance; |
| | | } |
| | | |
| | | // 验证码开关 |
| | | private String codeSwitch; |
| | | |
| | | private String ledDefaultMsg; |
| | | |
| | | // 库位初始化口令 |
| | | private String locMastInitPwd; |
| | | |
| | | |
| | | } |