feat: 添加对 Kafka CurrentStatus 的 restart 值支持,更新 G5 入库逻辑及相关测试
This commit is contained in:
@@ -12,12 +12,17 @@
|
||||
- **THEN** current_status 等于 CurrentStatus (截断至 255 字符)
|
||||
|
||||
### Requirement: 重启数据处理
|
||||
系统 SHALL 在 RebootReason 非空时强制 current_status 为 on。
|
||||
系统 SHALL 在 `CurrentStatus` 为 `restart` 时将 `current_status` 保留为 `restart`,并在 G5 入库链路中映射为 `3`。
|
||||
|
||||
#### Scenario: 重启数据写入
|
||||
- **GIVEN** RebootReason 为非空值
|
||||
- **WHEN** 消息被处理
|
||||
- **THEN** current_status 等于 on
|
||||
#### Scenario: restart 状态写入
|
||||
- **GIVEN** Kafka 消息中的 `CurrentStatus` 为 `restart`
|
||||
- **WHEN** 消息被处理并写入数据库
|
||||
- **THEN** 普通入库链路保留 `restart`,G5 入库链路将其写入为 `3`
|
||||
|
||||
#### Scenario: 其他状态保持原样
|
||||
- **GIVEN** Kafka 消息中的 `CurrentStatus` 为 `on` 或 `off`
|
||||
- **WHEN** 消息被处理并写入数据库
|
||||
- **THEN** 系统按既有规则处理该状态值
|
||||
|
||||
### Requirement: 空值保留
|
||||
系统 SHALL 保留上游空值,不对字段进行补 0。
|
||||
|
||||
Reference in New Issue
Block a user