lzh
8ae7b1a823
docs(video): 遗留项防御性加固 — GB2022 扩展字段 exist=false + Mapper 继承警告
基于遗留项调研结论(三项均无当前运行时风险,真正价值是防御未来
误用 BaseMapperX 高层方法),执行最小化防御性修复:
PlatformChannel 的 20 个 GB2022 扩展字段加 @TableField(exist=false):
- customSecurityLevelCode / customPhotoelectricImagingTyp /
customCapturePositionType / customStreamNumberList /
customSsvcRatioSupportList / customMobileDeviceType /
customHorizontalFieldAngle / customVerticalFieldAngle /
customMaxViewDistance / customGrassrootsCode / customPoType /
customPoCommonName / customMac / customFunctionType /
customEncodeType / customInstallTime / customManagementUnit /
customContactInfo / customRecordSaveDays / customIndustrialClassification
这些是 WVP 预占位字段,SQL 尚未建列,加 exist=false 消除
BaseMapperX 反射写入时 "Unknown column" 的潜在风险,
待业务方决定是否推进 GB2022 自定义属性持久化再补 SQL 列。
StreamProxyMapper / StreamPushMapper 加接口级 Javadoc 警告:
- StreamProxy/StreamPush 继承 CommonGBChannel 带入 40+ 个 gb_* 字段,
但 video_stream_proxy / video_stream_push 表不含这些列
(gb 通道信息由 GbChannelService 写入 video_common_gb_channel)
- 警告开发者严禁使用 BaseMapperX 的 insert/updateById/selectByMap
自动映射方法,写入必须走显式 SQL 方法(add/update/addAll)
- 读取 selectById/selectList 可用(SELECT 时 gb_* 字段返回 null 不报错)
未改动(零当前风险 + 改动成本高):
- SIP 协议时间字段(register_time 等 varchar):Mapper 全显式 SQL
用 #{} 绑定 String,与 varchar 列自洽;DateUtil.getNow() 返回
"yyyy-MM-dd HH:mm:ss" 格式字符串,时间比较查询的字符串排序
与 datetime 排序结果一致;改造涉及 72+ 处调用链
- StreamProxy/StreamPush 继承架构:改组合式重构代价大,
通过 Javadoc 警告防御未来误用即可
编译通过(mvn compile BUILD SUCCESS)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 13:43:23 +08:00
..
2026-04-21 13:43:23 +08:00
2026-04-21 10:15:14 +08:00