feat: 增加设备空闲状态检测配置
主要修改: 1. 在SystemConfigService中新增获取设备空闲状态的方法。 2. 更新DeviceStatusService和DeviceStatusCheckService,使用可配置的空闲状态字符串替代硬编码。 3. 在文档中添加设备检测相关配置的说明,提升系统灵活性和可维护性。 技术细节: - 通过引入设备空闲状态的配置,支持多语言环境下的设备状态标识,便于系统维护和扩展。
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
- `script.server_url`: 脚本服务器地址(默认值:http://36.138.184.60:12345)
|
||||
- `script.qr_path_template`: 二维码图片路径模板(默认值:/{machineId}/二维码.png)
|
||||
|
||||
### 设备检测相关配置
|
||||
- `device.idle_status`: 设备空闲状态的字符串标识(默认值:空闲)
|
||||
|
||||
## 参数说明
|
||||
|
||||
### 链接生成接口参数
|
||||
@@ -119,6 +122,9 @@ Integer refreshInterval = systemConfigService.getRefreshInterval();
|
||||
|
||||
// 获取脚本服务器地址
|
||||
String serverUrl = systemConfigService.getScriptServerUrl();
|
||||
|
||||
// 获取设备空闲状态字符串
|
||||
String idleStatus = systemConfigService.getDeviceIdleStatus();
|
||||
```
|
||||
|
||||
### 动态修改配置
|
||||
@@ -148,4 +154,23 @@ systemConfigService.updateConfig(config);
|
||||
- 游戏规则配置
|
||||
- 第三方服务配置
|
||||
- 日志级别配置
|
||||
- 性能调优参数
|
||||
- 性能调优参数
|
||||
- 设备状态检测相关配置
|
||||
|
||||
## 配置变更说明
|
||||
|
||||
### 设备空闲状态检测优化
|
||||
|
||||
为了提高系统的灵活性,将设备空闲状态的判断字符串从硬编码改为可配置:
|
||||
|
||||
**影响的服务:**
|
||||
- `DeviceStatusService`: 设备状态解析服务
|
||||
- `DeviceStatusCheckService`: 设备状态检查服务
|
||||
|
||||
**配置项:**
|
||||
- `device.idle_status`: 用于判断设备是否空闲的字符串(默认:空闲)
|
||||
|
||||
**使用场景:**
|
||||
- 当设备管理系统返回的空闲状态字符串发生变化时,只需修改配置即可
|
||||
- 支持多语言环境下的设备状态标识
|
||||
- 便于系统维护和扩展
|
||||
Reference in New Issue
Block a user