Commit Graph

25 Commits

Author SHA1 Message Date
lzh
49366eb871 feat(iot): 合并 IoT 2.0 开发分支到 release/next
合并 feat/iot-2.0 分支代码,保留该分支继续开发。

主要变更:
- Controller 补齐 (B2/B4-6/B10/B11/B12/B13)
- IoT v2.0 菜单迁移脚本(规则链 + 子系统)
- B7 BranchNode 循环依赖修复
- AutoConfiguration.imports 注册

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 09:52:53 +08:00
lzh
7c45f56804 chore(ci): 统一预发环境命名 staging → release
Some checks failed
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
- env/staging.env.example → env/release.env.example(git mv 保留历史)
- Jenkinsfile:STAGING_DEPLOY_HOST/PATH → RELEASE_*,日志和注释同步
- docker-compose.core.yml、5 个 application.yaml 注释里的 staging → release
- TDengine database:aiot_platform_staging → aiot_platform_release
- XXL-Job appname 后缀:-staging → -release

仅命名调整,不动任何运行行为。
2026-04-28 16:45:11 +08:00
lzh
602217274c build(ci): docker-compose 多环境参数化 + staging 中间件配置隔离
Some checks failed
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
问题:docker-compose.core.yml 把 MySQL/Redis/Nacos/RocketMQ/TDengine 等连接信息
全写死成 prod 值,无论 master→PROD 还是 release/next→STAGING 都用同一份,
staging 容器会直接连 prod 数据库写脏数据。

改动:
- docker-compose.core.yml 全参数化(${VAR:-prod_default}),用 YAML anchor
  抽公共 env,未注入 .env 时行为与历史一致(不破坏 prod 当前部署)
- 新增 env/prod.env.example、env/staging.env.example 模板(占位密码进 git)
  和 env/.gitignore(真实 .env 不进 git,由部署机手工维护)
- Jenkinsfile:所有 docker compose 命令加 --env-file .env,并在 Pre-deploy
  Check 阶段验证部署机 .env 文件存在性,缺失直接 fail(防止连错中间件)
- 5 个核心服务 application.yaml 的 xxl-job appname 加 SUFFIX 变量:
    appname: ${spring.application.name}${XXL_JOB_EXECUTOR_APPNAME_SUFFIX:}
  staging 设为 -staging,prod 留空。否则 staging 与 prod 注册到同一个执行器
  组,admin 调度任务会随机打到任一边
- iot-server application-prod.yaml TDengine database 参数化:
    /aiot_platform → /${TDENGINE_DATABASE:aiot_platform}
  staging 用独立 database aiot_platform_staging,避免共享 prod 时序数据

staging 中间件方案:
- MySQL 同实例(172.17.16.8)独立库 aiot-platform-release
- Nacos 同实例独立 namespace e635b215-913e-4bc8-8867-2fbf7d5134aa
- Redis 同 prod 实例(短期,靠 application 层 key 前缀隔离)
- RocketMQ 改用 staging 服务器本地实例 172.17.16.7:9876(内网)
- TDengine 同 prod 实例独立 database(CTSDB 切换为 follow-up)
- XXL-Job admin 共用,executor IP=.7、appname 加 -staging 后缀
2026-04-28 16:37:27 +08:00
lzh
90fa54dc11 build(ci): add stage deployment pipeline and configs 2026-03-30 22:53:46 +08:00
lzh
e11d3e1b6e feat(framework): OssPresignResponseBodyAdvice 支持 List<String> 字段预签名
- @OssPresignUrl 注解现在同时适用于 String 和 List<String> 字段
- 回填时防御不可变 List,自动降级为 ArrayList
- FileServiceImpl 预签名访问 URL 去除查询参数,保持持久化路径干净

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:59:34 +08:00
lzh
ff153dd1a9 refactor(infra): 文件列表接口接入 @OssPresignUrl 自动预签名
FileRespVO.url 字段添加 @OssPresignUrl 注解,移除 Controller 中
手动调用 presignGetUrl 的逻辑,由框架层 ResponseBodyAdvice 统一处理。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:06:23 +08:00
lzh
807d44e398 feat(infra): 批量预签名 API 及单体/微服务双模式自动配置
新增 FileApi.presignGetUrls 批量签名接口(@NotEmpty + @Size(max=500)),
FileServiceImpl 实现带 null 守卫。

自动配置设计:
- 单体模式:ViewshFileAutoConfiguration 直连 FileService
- 微服务模式:OssPresignUrlApiAutoConfiguration 通过 Feign 代理
- 通过 @ConditionalOnMissingBean 互斥,保证同一 JVM 只有一个实现

新增 OssPresignHelper 工具类,供 Handler 层处理动态 Map 字段
(如 extInfo 中的图片 URL),提供静默降级的单个/批量/JSON数组签名方法。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:06:05 +08:00
lzh
a567c62ae2 feat(infra): 文件列表及详情接口增加私有桶预签名
- FileController.getFilePage/getFile 对私有桶文件 URL 生成预签名访问地址

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 17:44:28 +08:00
lzh
6a9aa82bac feat(infra): S3 私有桶预签名核心能力
- S3FileClient.buildDomain() 修复 COS virtual-hosted-style 域名生成
- S3FileClient.presignGetUrl() 支持跨桶签名及 endpoint 校验
- FileApi.presignGetUrl() 修复 Feign nullable 参数注解

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 17:44:21 +08:00
lzh
b4de9d0df8 feat(config): 修改测试环境地址 2026-02-26 17:16:24 +08:00
lzh
a68ce9a28a fix(xxl-job): 配置executor IP和端口解决跨服务器回调失败
Some checks failed
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
XXL-Job Admin部署在Infra服务器,executor运行在Prod服务器的Docker容器中,
容器内部IP不可达,需指定宿主机IP和独立端口供Admin回调。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 17:03:39 +08:00
lzh
26e909cce9 fix(deploy): 迁移Nacos/TDengine/XXL-Job至Infra服务器(172.17.16.7)
Some checks failed
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
将基础设施服务地址从Prod服务器(172.17.16.14)统一迁移至Infra服务器(172.17.16.7):
- Nacos: 172.17.16.14:8848 → 172.17.16.7:8848
- TDengine: 172.17.16.14:6041 → 172.17.16.7:6041
- XXL-Job: 172.17.16.14:19090 → 172.17.16.7:19090

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:22:02 +08:00
lzh
547da7cfd2 refactor(deploy): 迁移CI/CD至双服务器架构
Some checks failed
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
- Jenkinsfile: Registry改为Infra内网172.17.16.7:5000,部署目标改为Prod内网172.17.16.14
- docker-compose: 镜像源改为172.17.16.7:5000,MySQL改为172.17.16.8,Redis改为172.17.16.13,RocketMQ改为腾讯云TDMQ
- 所有模块application-prod.yaml: 统一更新MySQL/Redis/RocketMQ默认连接地址
- deploy.sh: Registry地址同步更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 10:41:54 +08:00
lzh
2a1cdfc4dc Merge remote-tracking branch 'origin/master' into merge-temp 2026-01-14 22:49:28 +08:00
lzh
01f900a6fe fix: 修改xxl-job地址
Some checks failed
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
2026-01-14 15:43:41 +08:00
lzh
0923fc6868 fix: Jenkins修复5-defaultTarget must start with '/' or with 'http(s)
Some checks failed
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
2026-01-14 12:39:12 +08:00
lzh
14f9015939 fix: Jenkins修复4-开启Spring Boot Admin
Some checks failed
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
2026-01-14 12:22:55 +08:00
lzh
52017f7e23 fix: Jenkins修复3-prod缺失配置添加
Some checks failed
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
2026-01-14 11:43:47 +08:00
lzh
a20ef566d0 fix: Jenkins修复3-修改nacos配置
Some checks failed
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
2026-01-14 11:12:28 +08:00
lzh
efe05ad624 refactor: 重构配置管理,移除.env依赖,使用docker-compose环境变量+Nacos配置中心
Some checks failed
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
- 更新所有application-prod.yaml,将环境变量占位符替换为硬编码默认值
- 重写docker-compose.core.yml,使用Spring Boot环境变量命名规范
- 修复Jenkins pipeline中的getContainerName方法调用错误
- 配置优先级:Nacos配置中心 > Docker环境变量 > application-prod.yaml

变更文件:
- viewsh-gateway/src/main/resources/application-prod.yaml
- viewsh-module-system-server/src/main/resources/application-prod.yaml
- viewsh-module-infra-server/src/main/resources/application-prod.yaml
- viewsh-module-iot-server/src/main/resources/application-prod.yaml
- viewsh-module-iot-gateway/src/main/resources/application-prod.yaml
- docker-compose.core.yml
- Jenkinsfile
2026-01-13 23:50:37 +08:00
lzh
b7664f7dd0 fix: 修复健康检查和配置问题
Some checks failed
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
- 修复健康检查 IP 地址 (172.17.16.14 -> localhost)
  - 禁用微信自动配置避免 appid 错误
  - 添加服务依赖关系和启动顺序
  - 优化 Jenkinsfile 部署流程
  - 添加 Quartz 优雅关闭配置
  - 注释 XXL-JOB Admin 配置(暂不部署)
2026-01-13 19:13:30 +08:00
lzh
2b9c1aa7d8 feat: 添加所有核心服务的生产环境配置文件
Some checks failed
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
- 创建 application-prod.yaml 支持环境变量占位符
- 支持 Docker Compose 环境变量注入
- 支持 Nacos 配置中心覆盖
- 涵盖 5 个核心服务: gateway, system, infra, iot-server, iot-gateway
2026-01-13 11:52:27 +08:00
lzh
4f293436ef chore: system、infra、iot、server配置文件调整 - nacos使用124.221.55.225 2025-12-31 14:21:48 +08:00
lzh
ba22a96e44 chore: system、infra、iot、server配置文件调整v1.0 2025-12-31 14:09:36 +08:00
lzh
8ccfafe2bb first commit
Some checks failed
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