fix(01-01): 统一实名状态常量(CRITICAL-01 核心)

- polling_handler.go: parseRealnameStatus 不再返回硬编码 2,改为 constants.RealNameStatusVerified(=1)
- polling_handler.go: isFirstRealname 判断改用常量比较,不再使用 == 2
- polling_handler.go: HandleProtectConsistencyCheck 注释更正为 real_name_status=1
- iot_card.go: RealNameStatus gorm comment 统一为 0-未实名 1-已实名(去除行业卡说明)
- asset_dto.go: RealNameStatus description 更正为 0未实名 1已实名(去除错误的 1实名中 2已实名)
- scheduler.go: getCardCondition 改用常量替代硬编码 0/1/2 判断
- iot_card/service.go: parseGatewayRealnameStatus 注释更正,返回值改为常量
This commit is contained in:
2026-03-27 22:53:30 +08:00
parent bfcea1c18f
commit 1fd0072f69
5 changed files with 29 additions and 28 deletions

View File

@@ -870,12 +870,12 @@ func parseNetworkStatus(cardStatus string) int {
}
// parseGatewayRealnameStatus 将网关返回的实名状态布尔值转换为 real_name_status 数值
// true=已实名(2)false=未实名(0)
// true=已实名(1)false=未实名(0)
func parseGatewayRealnameStatus(realStatus bool) int {
if realStatus {
return 2
return constants.RealNameStatusVerified
}
return 0
return constants.RealNameStatusNotVerified
}
// UpdatePollingStatus 更新卡的轮询状态