|
|
54250f2f5a
|
feat(video): video_media_server 补齐 deleted 列对齐 BaseDO
- DO 继承 BaseDO(含 @TableLogic),但建表脚本初版漏了 deleted 列,
MyBatis Plus 自动生成的 UPDATE/SELECT 语句会报
"Unknown column 'deleted' in 'where clause'"。
- 同步更新 video.sql 中的建表脚本与段落注释,增量脚本放到
sql/mysql/migrations/2026-04-22_video_media_server_deleted.sql,
已部署库手动执行即可。
|
2026-04-23 14:59:31 +08:00 |
|
|
|
88cab42a9c
|
feat(system): 用户-项目绑定管理 API + 顶栏项目下拉修正
- 新增 UserProjectService/ServiceImpl/Controller:给用户分配项目、给项目分配成员
幂等覆盖写入(diff 出增删),参考 PermissionServiceImpl.assignUserRole 模式
- 自踢守卫:禁止用户把自己从当前正在访问的项目中移除
- 超管守卫:assignProjectUsers 拒绝移除持有超管角色的用户(用 RoleService.hasAnySuperAdmin 判别,非 userId==1)
- ProjectController.simple-list 改为只返回"当前用户授权且启用"的项目(修 bug:原返回整租户启用项目,会让顶栏下拉看到无权访问的项目)
- 新增 /system/project/all-simple-list:管理员分配场景的全量项目下拉,权限复用 system:project:query
- ProjectService.deleteProject 加 @Transactional,同事务内级联软删 system_user_project
- 新增两条菜单权限种子 SQL,parent_id 子查询动态定位:
* system:user:assign-project
* system:project:assign-user
- 新增错误码 USER_PROJECT_CANNOT_REMOVE_SELF_CURRENT / USER_PROJECT_CANNOT_REMOVE_SUPER_ADMIN
设计文档:docs/design/2026-04-23-user-project-binding.md(在前端仓库)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-23 14:48:57 +08:00 |
|
|
|
3a3f7b78d4
|
refactor(video): 预置 AI 算法改为 SQL 种子数据,移除 @PostConstruct 初始化
原 AiAlgorithmServiceImpl.initPresetAlgorithms() 在 @PostConstruct
里插入 4 条预置算法,带来两个问题:
1. 启动时无登录上下文,MP 自动填充 creator 失效 → 启动失败
2. 算法清单硬编码在 Java 代码,迭代要重编译发布
改为 video.sql 种子数据管理:
- video.sql 的预置算法 INSERT 扩展为 4 条(leave_post / intrusion /
illegal_parking / vehicle_congestion),参数 schema 与边缘端对齐
- 使用 ON DUPLICATE KEY UPDATE 保证幂等:新库初始化 + 存量库升级
都走同一条语句,param_schema / description 会被自动校正
- 保留用户侧可修改的字段(is_active / global_params)不被覆盖
代码层:
- 删除 initPresetAlgorithms() 方法与 PRESET_ALGORITHMS 静态 Map
- 删除 SYSTEM_USER 常量
- 删除 @PostConstruct / HashMap 相关 import
- 保留 syncFromEdge() 作为边缘端主动同步的运行时入口
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-22 13:54:39 +08:00 |
|
|
|
0ca1adf2a4
|
refactor(video): P2 应用层时间字段 varchar → datetime / String → LocalDateTime
SQL 类型优化(应用层生成的业务时间改为标准 datetime):
- video_ai_edge_device: last_heartbeat / updated_at
- video_ai_config_log: updated_at
- video_ai_config_snapshot: created_at
- video_ai_algorithm: sync_time
- video_ai_alert: received_at
- video_media_server: last_keepalive_time
DO 字段 String → LocalDateTime 对齐:AiEdgeDevice / AiConfigLog /
AiConfigSnapshot / AiAlgorithm / AiAlert / MediaServer
调用点适配:
- Service 层 new Date() 字符串格式化赋值统一改为 LocalDateTime.now()
- AiAlertController.edgeReport / MqttService.handleAlert 新增
parseEventTime / parseTimestamp 私有方法,外部字符串防御性解析
保留 varchar(本批次暂不动,SIP 协议原生字符串,改动涉及 72+ 处
Mapper 与 SIP 处理器,单独迭代):
- video_device.register_time / keepalive_time
- video_device_channel.end_time / gps_time
- video_device_mobile_position.time
- video_stream_push.push_time
编译通过(mvn compile BUILD SUCCESS)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-21 12:32:23 +08:00 |
|
|
|
64dcdd8d4c
|
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>
|
2026-04-21 12:13:56 +08:00 |
|
|
|
1698c71d84
|
fix(video): P0 修复 @TableName 映射错误、字段命名、补缺列与 exist=false
@TableName 修正:
- CommonGBChannel: "video_device_channel" → "video_common_gb_channel"
- DeviceChannel: 显式加 @TableName("video_device_channel")
- PlatformChannel: 补充 @TableName("video_platform_channel")
避免因继承 CommonGBChannel 而写入错误表
字段命名规范化(修复驼峰转 snake_case 错位):
- CommonGBChannel.recordPLan → recordPlanId(对应 record_plan_id)
- MediaServer.httpSSlPort / flvSSLPort / wsFlvSSLPort
→ httpSslPort / flvSslPort / wsFlvSslPort
(原命名 L 大写/双大写导致转 snake 变 http_s_sl_port)
- 同步更新 Mapper SQL 中的 #{xxx} 引用和 ZLM/ABL 节点服务调用点
@TableField(exist=false) 标注(JOIN 显示字段/业务计算值/内存对象):
- DeviceChannel: parentDeviceId、parentName、ptzTypeText
- DeviceAlarm: deviceName、alarmPriorityDescription、alarmMethodDescription、
alarmTypeDescription
- AiAlert: cameraName、roiName
- Device: sipTransactionInfo
- MobilePosition: channelDeviceId
- StreamPush: uniqueKey
补齐 SQL 缺失列(需持久化的业务状态字段):
- video_device: channel_count
- video_platform: channel_count / catalog_subscribe / alarm_subscribe
/ mobile_position_subscribe
- video_media_server: status / last_keepalive_time
- video_cloud_record: reserve
- video_device_mobile_position.channel_id: varchar(50) → bigint
(DO 字段是 Long,作为外键引用 video_device_channel.id)
补齐 DO 缺失字段:
- AiAlgorithm: 新增 globalParams(对应 SQL global_params)
- StreamPush: 新增 status(对应 SQL status)
编译通过(mvn compile BUILD SUCCESS)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-21 12:07:47 +08:00 |
|
|
|
43becf998c
|
refactor(video): projectId 两级隔离适配 + SQL 融合到 video.sql
SQL 融合:
- sql/mysql/video.sql 作为最终主脚本(26 张表),整合用户改造版表前缀 video_
与 cherry-pick 版的框架字段(tenant_id/creator/updater/deleted/datetime)
- 新增 video_ai_camera_snapshot(AI 抓拍)、video_common_gb_channel(国标通道抽象)
- 删除旧的 aiot-video.sql(被 video.sql 替代)
- 17 张业务表 + 6 张 AI 业务表加 project_id 列(项目级隔离)
- 2 张字典表(video_ai_algorithm/video_ai_algo_template)仅租户级
- video_media_server 全局共享,无多租户字段
代码改造:
- 21 个 DO 的 @TableName 从 wvp_* 改为 video_*
- 16 个业务 DO 改继承 ProjectBaseDO(StreamProxy/StreamPush 通过
CommonGBChannel 自动获得),字典 DO 保留 TenantBaseDO,
MediaServer 保留 BaseDO
- 28 个 Mapper/Provider 的 SQL 表名全部更新为 video_*
- application.yaml 新增 tenant.ignore-project-tables 配置,
列出 video_media_server/video_ai_algorithm/video_ai_algo_template
不参与项目隔离
- 编译通过(mvn compile BUILD SUCCESS)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-21 11:10:27 +08:00 |
|
|
|
a604471e6f
|
feat(video): Phase 5-9 编译修复、Controller 路径、数据库 SQL
Phase 5: 全局编译修复 — Security 引用清理、JT1078 引用移除
PageInfo shim 兼容类(后续迁移到 PageResult)
web/custom 和 web/gb28181 补充迁移
Phase 6: SecurityConfiguration 更新放行 Hook/SSE 路径
Phase 7: 32 个 Controller 路径 /api/ → /video/
Phase 8: aiot-video 数据库 SQL(25 张表,含多租户 tenant_id + 逻辑删除 deleted)
Phase 9: mvn compile BUILD SUCCESS
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-21 10:15:14 +08:00 |
|
|
|
a2f500fa20
|
feat(tenant): 租户-项目两级架构 Phase 2 — IoT + Ops 业务迁移
DO 迁移 (15个 TenantBaseDO → ProjectBaseDO):
- IoT: IotDeviceDO
- Ops 核心: OpsOrderDO, OpsOrderEventDO, OpsOrderDispatchDO, OpsOrderQueueDO,
OpsBusAreaDO, OpsAreaDeviceRelationDO, OpsDeviceTrajectoryDO
- Ops 保洁: OpsOrderCleanExtDO, OpsCleanerStatusDO, OpsCleanerPerformanceMonthlyDO,
OpsInspectionRecordDO, OpsInspectionRecordItemDO
- Ops 安保: OpsOrderSecurityExtDO, OpsAreaSecurityUserDO
IoT 适配:
- IotDeviceRespDTO 新增 projectId 字段
- IotDeviceMessage 新增 projectId 字段
- IotDeviceMessageServiceImpl.appendDeviceMessage() 设置 projectId
- IotCleanRuleMessageHandler 嵌套 ProjectUtils.execute() 设置项目上下文
缓存改造:
- ProjectRedisCacheManager extends TenantRedisCacheManager,追加 :projectId 后缀
- ViewshTenantAutoConfiguration 替换为 ProjectRedisCacheManager
SQL 迁移脚本 (sql/mysql/project/):
- 01-create-tables.sql: system_project + system_user_project 建表
- 02-default-data.sql: 默认项目 + 用户关联回填
- 03-alter-business-tables.sql: 15 张表添加 project_id (NULL → 回填 → NOT NULL → 索引)
- 04-index-audit.sql: 现有索引审计 + project_id 补充建议
- 99-rollback.sql: 完整回滚方案
附带修复:
- fix(ops): UserDispatchStatusServiceImpl 添加缺失的 KEY_PREFIX 常量
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-16 22:27:34 +08:00 |
|
|
|
bf5aa21648
|
feat(trajectory): 新增轨迹事件消费与落库模型
- 新增 ops_device_trajectory 表及轨迹数据对象、Mapper\n- 消费 trajectory-enter / trajectory-leave 事件并做幂等处理\n- 落地设备进入/离开区域记录,补充停留时长与离开原因字段\n- 在服务层封装轨迹写入、关闭未离场记录等核心逻辑
|
2026-03-31 22:56:18 +08:00 |
|
|
|
53f51e7336
|
feat(security): 安保扩展表新增 assigned_user_phone 字段及迁移脚本
建表 SQL 补充 camera_name 和 assigned_user_phone 列;
新增增量迁移脚本 ops_order_security_ext_migrate_v1.2.sql。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-25 14:27:04 +08:00 |
|
|
|
a7b98e0e5f
|
feat(ops): 补齐巡检和安保模块的 system_menu 权限记录
新增 13 条权限菜单(5088-5100),对齐代码中 @PreAuthorize 声明:
- 巡检记录:ops:inspection:query/create(父:保洁巡检 5087)
- 巡检模板:ops:inspection-template:query/create/update/delete(父:巡检项配置 5085)
- 安保工单:ops:security-order:create/confirm/complete(父:工单中心 5043)
- 安保人员:ops:security-area-user:query/create/update/delete(父:安保配置 5084)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-22 20:08:55 +08:00 |
|
|
|
41e9cb4d4e
|
feat(ops): 巡检表结构新增检查项描述、照片字段并补齐 AUTO_INCREMENT
- ops_inspection_template 新增 item_description 字段(合格标准说明)
- ops_inspection_record 新增 photos 字段 varchar(4096),存储巡检照片 URL
- 三张巡检表 id 补 AUTO_INCREMENT
- 包含建表语句和增量 ALTER 语句
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-22 14:58:55 +08:00 |
|
|
|
c20a42f68a
|
feat(ops): 巡检记录新增快捷标签字段
巡检主记录和明细项新增 tags 字段(JSON 数组),支持巡检员在提交时
选择预设的快捷标签(如"地面污渍"、"垃圾未清理"),便于后续统计分析。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-19 09:22:25 +08:00 |
|
|
|
01e9a556ab
|
Merge branch 'master' of http://124.222.218.198:3000/XW-AIOT/aiot-platform-cloud into feature/cleaning-inspection
|
2026-03-18 23:01:09 +08:00 |
|
|
|
c9d443a75b
|
feat(sql): 安保工单扩展表新增 false_alarm 字段,附增量迁移脚本
- DDL: ops_order_security_ext 新增 false_alarm tinyint(1) 列
- 增量迁移: ops_order_security_ext_migrate.sql 供已部署环境 ALTER TABLE
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-15 10:35:30 +08:00 |
|
|
|
d53d1c4584
|
feat(ops): 新增安保模块数据模型与 Mapper
新增安保区域人员绑定表 ops_area_security_user 和安保工单扩展表
ops_order_security_ext,以及对应的 DO 和 Mapper 接口。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-11 17:32:56 +08:00 |
|
|
|
e3882e1c2f
|
fix(ops): code review 修复巡检模块6项问题
1. @Async 指定 ops-task-executor 线程池,避免使用默认线程池
2. 归属判定无工单/无标准时长时标记为 ATTRIBUTION_NORMAL(3),不再静默跳过
3. 补充 completionSeconds 字段语义注释和 standardDuration 单位转换说明
4. 整改工单默认时长 30 提取为 DEFAULT_RECTIFICATION_DURATION_MINUTES 常量
5. SQL 补充 idx_generated_order_id 和 idx_template_id 索引
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-05 20:40:36 +08:00 |
|
|
|
99651be386
|
feat(ops): 巡检模板CRUD及动态表单接口(Task 2+3)
|
2026-03-05 17:04:45 +08:00 |
|
|
|
b4de9d0df8
|
feat(config): 修改测试环境地址
|
2026-02-26 17:16:24 +08:00 |
|
|
|
c9195f78e9
|
feat(ops): 新增告警管理功能
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
添加告警请求VO、服务接口、服务实现及Controller,支持告警的基本管理操作。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-13 09:30:57 +08:00 |
|
|
|
46024fd043
|
refactor(iot): 重构客流计数器为增量累加模式,支持 people_out
- 删除旧 TrafficCounterBaseRedisDAO(基准值模式),新增 TrafficCounterRedisDAO
支持阈值计数器(达标后重置)和当日累积统计(用于报表)
- TrafficThresholdRuleProcessor 改为增量原子累加,消除基准值校准逻辑
- CleanRuleProcessorManager 路由增加 people_out 支持
- TrafficCounterBaseResetJob 改为每日清除阈值计数器,持久化职责移交 Ops 模块
- 使用 SCAN 替代 KEYS 避免阻塞 Redis
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-02-03 15:34:03 +08:00 |
|
|
|
c75696c644
|
feat(ops): 新增业务日志表
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
- 新增 ops_business_event_log 表结构
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-21 18:44:30 +08:00 |
|
|
|
85f1a2cca7
|
feat(ops): 新增工单模块初始数据库脚本
|
2026-01-15 16:14:12 +08:00 |
|
|
|
8ccfafe2bb
|
first commit
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
|
2025-12-31 11:48:19 +08:00 |
|