29 lines
1.2 KiB
Markdown
29 lines
1.2 KiB
Markdown
Status: done
|
||
|
||
## Parent
|
||
|
||
`.scratch/iot-risk-import-voucher-remark/PRD.md`
|
||
|
||
## What to build
|
||
|
||
在 `PollingCardStatusHandler` 中,当轮询查询网关后将新的 `gateway_extend` 写入 DB,若新值命中风险常量(`GatewayCardExtendRiskStop` 或 `GatewayCardExtendCancelled`)且该卡 `is_standalone = true`,则:
|
||
|
||
1. 调用现有的 `UpdatePollingStatus(false)` 将 `enable_polling` 写为 `false`
|
||
2. 跳过末尾的 `requeueCard`,终止该卡的轮询循环
|
||
|
||
检查时机:在 `UpdateFields` 写入 `gateway_extend` 成功之后,`requeueCard` 调用之前。
|
||
|
||
不需要 Schema 变更,不需要 Migration。
|
||
|
||
## Acceptance criteria
|
||
|
||
- [ ] 轮询处理器在写入 `gateway_extend` 后检查风险状态
|
||
- [ ] 独立卡(`is_standalone=true`)命中风险值时调用 `UpdatePollingStatus(false)`,`tb_iot_card.enable_polling` 被置为 `false`
|
||
- [ ] 该卡不再入队(不调用 `requeueCard`),轮询循环终止
|
||
- [ ] 已绑定设备的卡(`is_standalone=false`)命中风险值时不触发此逻辑,轮询正常继续
|
||
- [ ] 可通过 PostgreSQL MCP 验证:风险状态卡处理后 `enable_polling = false`
|
||
|
||
## Blocked by
|
||
|
||
- `issues/01-risk-resume-block.md`(依赖 `GatewayCardExtendRiskStop`、`GatewayCardExtendCancelled` 常量)
|