refactor(video): P1 类型规范化 — varchar 数值转 int / Integer 布尔转 Boolean

SQL 类型修正(数值语义列不再用 varchar):
- video_platform: device_port / expires / keep_timeout varchar(50) → int
- video_platform_channel: custom_cert_num / custom_end_time varchar(50) → int

DO 布尔语义字段 Integer → Boolean(SQL 早已是 tinyint(1),DO 对齐语义):
- AiAlgorithm.isActive
- AiRoi.enabled
- AiRoiAlgoBind.enabled
同步修复 ~20 处调用点的布尔判断,setEnabled(1) → setEnabled(true),
getEnabled() == 1 → Boolean.TRUE.equals(getEnabled())

MediaServer.hookAliveInterval Float → Integer(SQL 是 int,Float 精度丢失)
同步修复 MediaConfig、ABL/ZLM 两个 StatusManager 的 10F → 10 字面量

编译通过(mvn compile BUILD SUCCESS)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
lzh
2026-04-21 12:13:56 +08:00
parent 1698c71d84
commit 64dcdd8d4c
15 changed files with 39 additions and 35 deletions

View File

@@ -363,11 +363,11 @@ CREATE TABLE `video_platform` (
`server_port` int NULL COMMENT '上级平台注册端口',
`device_gb_id` varchar(50) NULL COMMENT '本平台向上注册的国标编码',
`device_ip` varchar(50) NULL COMMENT '本平台信令IP',
`device_port` varchar(50) NULL COMMENT '本平台信令端口',
`device_port` int NULL COMMENT '本平台信令端口',
`username` varchar(255) NULL COMMENT '注册用户名',
`password` varchar(50) NULL COMMENT '注册密码',
`expires` varchar(50) NULL COMMENT '注册有效期',
`keep_timeout` varchar(50) NULL COMMENT '心跳超时时间',
`expires` int NULL COMMENT '注册有效期(秒)',
`keep_timeout` int NULL COMMENT '心跳超时时间(秒)',
`transport` varchar(50) NULL COMMENT '传输协议UDP/TCP',
`civil_code` varchar(50) NULL COMMENT '行政区划代码',
`manufacturer` varchar(255) NULL COMMENT '厂商',
@@ -422,10 +422,10 @@ CREATE TABLE `video_platform_channel` (
`custom_parent_id` varchar(50) NULL COMMENT '自定义父节点',
`custom_safety_way` int NULL COMMENT '自定义安全防范',
`custom_register_way` int NULL COMMENT '自定义注册方式',
`custom_cert_num` varchar(50) NULL COMMENT '自定义证书编号',
`custom_cert_num` int NULL COMMENT '自定义证书编号',
`custom_certifiable` int NULL COMMENT '自定义可认证标志',
`custom_err_code` int NULL COMMENT '自定义错误码',
`custom_end_time` varchar(50) NULL COMMENT '自定义止时间',
`custom_end_time` int NULL COMMENT '自定义止时间',
`custom_secrecy` int NULL COMMENT '自定义保密级别',
`custom_ip_address` varchar(50) NULL COMMENT '自定义IP',
`custom_port` int NULL COMMENT '自定义端口',