提交图

189 次代码提交

作者 SHA1 备注 提交日期
XuqmGroup
200f8ae54a feat: 引入 Flyway 数据库版本管理,替换 ddl-auto: update
所有服务(tenant/im/file/update/license/push/demo)统一:
- 添加 flyway-core + flyway-mysql 依赖
- ddl-auto 从 update 改为 validate
- 添加 V1__init.sql 基线(CREATE TABLE IF NOT EXISTS,幂等)
- baseline-on-migrate=true 兼容已有部署,存量库不重跑 V1

后续 Entity 变更须同步写 V(n+1) 迁移 SQL,Flyway 在容器
启动时自动按版本顺序执行,update.sh 无需任何改动。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 23:28:12 +08:00
XuqmGroup
ede000eac1 fix(dashboard): 统计应用数量时排除系统应用(is_default=1)
DashboardService.stats() 中过滤 isDefault=true 的系统应用,
与 AppService.listByTenant() 保持一致,避免控制台 dashboard
与应用列表页显示数量不符。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 23:09:26 +08:00
XuqmGroup
ce64c8fa60 fix: 修复私有化一键更新三个问题
1. Jenkinsfile: versions.json 补充 platformVersion 字段(取 tenant-service 版本),
   并为每个服务添加 changed 标记;私有部署 checkForUpdates 依赖此字段判断是否有新版本,
   缺失时始终返回 hasUpdate=false。

2. SystemUpdateService: dockerLogin 改为返回 boolean,凭据缺失/登录失败时
   中止更新流程(原来失败后继续,导致 docker compose pull 静默失败仍用旧镜像)。
   readRemoteVersions 新增 VERSIONS_MANIFEST_URL 远端拉取支持,
   私有服务器可在 .env 中配置后自动同步公有端版本清单。
   新增 migrate_v20260610_gray_mode_simplify_bookmark 迁移标记(实际 SQL 由 update-service 执行)。

3. SystemUpdateController: 新增 GET /api/system/versions/manifest 公开端点,
   公有服务器部署后即可作为私有服务器的 VERSIONS_MANIFEST_URL 目标地址。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 20:04:47 +08:00
XuqmGroup
e42a4e3172 ci: auto-infer SERVICE from Jenkins job name
Jobs named xuqmgroup-<service> (e.g. xuqmgroup-update-service) now
automatically build only that service without requiring manual param
selection. Falls back to params.SERVICE for manual runs or all-in-one job.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 19:30:49 +08:00
XuqmGroup
e774c4ef25 ci: per-service version files, DB migration support ready
- Each service now has its own VERSION.<service> file (all at 1.0.0)
- Jenkinsfile bumps each service's version independently
- versions.json updated per-service (no cross-service overwrite)
- Summary log shows all service:version pairs on success

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 19:26:46 +08:00
XuqmGroup
5593ad790e ci: auto semver versioning, remove manual params, add demo-service
- Remove VERSION_STRATEGY/CUSTOM_VERSION/CHANGELOG/DEPLOY params
- Auto patch-bump from VERSION file (reset to 1.0.0 semver)
- Push :VERSION + :latest tags per service for one-click update
- Add demo-service to build choices
- Always deploy; merge-update versions.json (no web entry overwrite)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 17:30:53 +08:00
XuqmGroup
81dfb2910b refactor(jenkins): 简化 Jenkinsfile 版本管理和部署流程
- 移除复杂的版本策略参数,统一使用自动递增版本号
- 修改 Docker 镜像标签策略,使用 latest 标签进行部署
- 简化版本计算逻辑,统一维护服务版本文件
- 更新部署脚本,直接使用 latest 标签拉取镜像
- 添加版本文件自动提交到 Git 的功能
- 重构版本记录更新机制,使用 Python 脚本管理 versions.json
- 统一所有 Jenkinsfile 的环境变量和构建参数结构
2026-06-11 17:23:49 +08:00
XuqmGroup
72eb60f8ca fix(ci): 修复 bat 脚本错误处理,Docker 失败时立即退出
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 15:20:24 +08:00
XuqmGroup
167d403da6 feat(system): 添加系统更新管理和版本控制功能
- 新增私有化部署系统更新API接口(检查更新、选择性更新、重置等)
- 实现版本管理系统,支持平台版本和服务版本对比检查
- 集成Jenkinsfile自动化构建流程,支持多种版本策略
- 添加Docker镜像版本标签管理和自动注入功能
- 实现选择性更新机制,可指定服务进行增量更新
- 完善版本日志记录和更新历史追踪功能
2026-06-11 13:30:41 +08:00
XuqmGroup
77553cd105 feat(app): 支持多平台包名配置和应用信息编辑功能
- 后端增加至少填写一个平台包名的验证逻辑
- 前端调整应用数据模型,将包名字段改为可选类型
- 添加应用详情页的编辑功能和表单验证
- 优化应用列表页包名显示逻辑,支持多平台包名展示
- 重构应用配置指引页面,按平台分类展示商店配置指南
- 在版本管理页面增加包名配置检查和相应提示
- 新增应用信息编辑弹窗组件和相关业务逻辑
2026-06-11 13:04:28 +08:00
XuqmGroup
3e2db6441e feat(update): 添加 API Key 管理和 WebSocket 实时通知功能
- 新增 API Key 管理功能,支持外部工具认证调用平台 API
- 实现 WebSocket 实时通知,版本发布时推送轻量通知给客户端
- 添加 APK 文件哈希校验,支持已下载检测和直接安装
- 支持外部 APK 上传使用 API Key 认证
- 优化私有化部署自动注入 nginx WebSocket 代理配置
- 扩展 SDK 功能包括已下载检测、直接安装和实时通知监听
2026-06-11 12:25:16 +08:00
XuqmGroup
e3d7fbd591 feat(app): 添加重新生成应用配置文件功能
- 在AppController中新增regenerateConfigFile接口
- 在AppService中实现重新生成配置文件的业务逻辑
- 记录重新生成配置文件的操作日志
- 在前端API中添加重新生成功能调用方法
- 在应用详情页面添加重新生成按钮和确认对话框
- 实现重新生成配置文件的前端交互逻辑
2026-06-02 17:43:36 +08:00
XuqmGroup
596927c1c6 refactor(app): 将许可证文件功能替换为配置文件功能
- 替换 LicenseFileCrypto 为 ConfigFileCrypto 加密类
- 将 /license-file 相关接口重命名为 /config-file
- 修改数据库实体中的 licenseFileContent 字段为 configFileContent
- 更新前端 API 调用从 downloadLicenseFile 改为 downloadConfigFile
- 将安全中心的 License 文件解析功能改为 Config 文件解析
- 更新文件扩展名从 .xuqmlicense 改为 .xuqmconfig
- 修改后端服务方法 ensureLicenseFile 为 ensureConfigFile
- 调整加密解密逻辑以支持新的配置文件格式
2026-06-02 17:35:29 +08:00
XuqmGroup
21fa87b3ac feat(ui): 添加服务应用切换记忆功能并优化菜单结构
- 在IM、授权、推送、版本管理视图中添加最近使用应用的记忆功能
- 新增serviceApp工具函数用于存储和获取最近使用的应用
- 将系统日志、数据库、操作日志菜单项归类到运维管理子菜单
- 修复实体类索引字段命名不一致问题
- 在安全配置中启用方法级别安全注解支持
2026-05-28 10:53:12 +08:00
XuqmGroup
eb8bc70ff5 feat(deploy): 优化版本管理和多租户合并逻辑
- 修改 readCurrentVersion 方法优先读取镜像内的 /app/VERSION 文件
- 添加对宿主机挂载目录 VERSION 文件的兼容性支持
- 移除 bumpVersionFile 方法,不再在更新后写入版本号
- 重构多租户合并逻辑,优化数据库查询和更新操作
- 简化孤儿数据修复逻辑,直接更新为保留租户ID
- 在 Dockerfile 中复制 VERSION 文件到镜像内部
- 在 Jenkinsfile 中添加自动递增构建号功能
2026-05-27 19:25:50 +08:00
XuqmGroup
898597d6b6 ```
refactor(tenant): 优化系统更新服务和租户数据修复逻辑

- 添加版本文件更新功能,在更新完成后写入新版本号到 VERSION 文件
- 重命名租户数据修复方法,从 consolidate_private_tenants 改为 fix_orphan_tenant_data
- 重构租户数据修复逻辑,支持多租户合并和孤儿数据修复两种场景
- 优化数据库操作,使用更精确的查询条件修复孤儿租户数据
- 改进迁移过程的日志输出和状态记录机制
```
2026-05-27 19:14:45 +08:00
XuqmGroup
e3e16352d5 ```
fix(tenant): 修复私有化部署下的租户注册和引导配置逻辑

- 修改 PrivateDeploymentProperties 中的 tenantRegisterEnabled 方法,
  在私有化模式下始终返回 false
- 修改 PrivateDeploymentProperties 中的 tenantBootstrapEnabled 方法,
  在私有化模式下始终返回 true
- 在 SystemUpdateService 中注入 PrivateDeploymentProperties 依赖
- 添加 migrate_v20260527_consolidate_private_tenants 数据库迁移方法
- 实现私有化部署下合并多租户功能,保留最早租户并替换其余租户ID
- 迁移涉及 t_app、t_operation_log、t_migrate_key 等表的数据
- 更新子账号的 parent_id 指向保留的租户
- 删除合并后多余的租户记录
```
2026-05-27 18:57:21 +08:00
XuqmGroup
db986808f2 feat(database): 新增 push 和 license 操作日志表
- 在 tenant-service 的系统更新服务中添加新的数据库迁移方法
- 为 push-service 创建 PushSchemaMigrationService 并实现数据库迁移逻辑
- 为 license-service 创建 LicenseSchemaMigrationService 并实现数据库迁移逻辑
- 创建 push_operation_log 表用于记录推送服务操作日志
- 创建 license_operation_log 表用于记录授权服务操作日志
- 实现数据库迁移记录表 _schema_migrations 以跟踪迁移状态
- 添加迁移验证和错误处理机制确保迁移过程可靠性
2026-05-27 18:01:31 +08:00
XuqmGroup
73dd4814f2 feat(logs): 添加操作日志功能支持推送和授权模块
- 在JwtAuthFilter中设置认证详情到claims
- 为license-service添加LicenseOperationLog相关实体、仓库和服务
- 为push-service添加PushOperationLog相关实体、仓库和服务
- 在LicenseAdminController中注入并使用操作日志记录授权变更
- 在PushManagementController中注入并使用操作日志记录推送操作
- 更新OperationLogService以支持从JWT claims获取用户信息
- 扩展OperationLogService支持推送和授权操作日志查询
- 在前端OperationLogView中添加推送和授权日志选项卡
- 添加LicenseOperationLog和PushOperationLog接口定义
- 实现推送和授权日志的数据加载和分页功能
- 添加操作类型和资源类型的标签映射支持
2026-05-27 13:36:16 +08:00
XuqmGroup
f9ad40cb98 feat(log): 优化操作日志记录和展示功能
- 在OperationLogEntity实体中新增summary和ipAddress字段存储摘要和IP信息
- 修改operationLogService.record方法支持传入操作摘要信息
- 实现客户端IP地址解析功能,支持X-Forwarded-For和X-Real-IP头
- 更新系统更新服务中的数据库表结构迁移逻辑,增加NOT NULL列处理
- 优化前端操作日志页面展示,添加标签分类和详情弹窗功能
- 在系统更新流式响应中增加网络连接异常处理机制
- 添加Nginx代理配置中的缓冲区设置以支持实时日志流式传输
2026-05-27 12:27:42 +08:00
XuqmGroup
50da70d580 fix(core): 统一全局异常处理器并添加数据库管理功能
- 在所有服务的GlobalExceptionHandler中添加HttpServletRequest参数以记录请求上下文
- 统一异常响应格式为ResponseEntity<ApiResponse<Void>>并改进错误日志记录
- 添加对多种异常类型的处理包括参数验证、请求方法不支持、权限拒绝等
- 为业务异常添加不同级别的日志记录(warn/error)和状态码映射
- 在前端系统API中新增数据库表管理相关接口定义和实现
- 添加数据库表列表、列信息和数据查询的API调用函数
2026-05-27 11:51:19 +08:00
XuqmGroup
e75aa66747 refactor(update): 移除包名校验逻辑简化版本检查接口
- 移除了 AppVersionController 中的 packageName 参数验证
- 简化了 resolveAndValidate 方法的参数列表
- 删除了包名校验相关的业务逻辑和异常抛出
- 移除了对 tenantClient 平台信息的包名校验调用
- 更新了方法签名以减少参数传递复杂度
2026-05-23 03:48:02 +08:00
XuqmGroup
978f919e4c fix(jenkins): add containerd cache cleanup before deploy to prevent concurrent pull corruption
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 02:48:43 +08:00
XuqmGroup
67da05dadc fix: remove @NotBlank from Java records, add manual validation + reset with data preservation
- Remove @Valid/@NotBlank/@Size/@Email/@NotNull from all Java record DTOs
  (incompatible with Jackson deserialization in Spring Boot 3.x)
- Add manual validation in controllers instead
- Add database reset with data preservation to reset container feature
  (exports core config tables, drops all tables, Hibernate recreates on startup,
  then restores preserved data)
- Update nginx timeout regex to cover all system endpoints

Affected services: tenant-service, license-service, im-service, push-service

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 02:43:35 +08:00
XuqmGroup
8e131906d8 feat(license): 添加应用信息接口并增强验证逻辑
- 在 SecurityConfig 中为 /api/license/app-info 接口添加无需认证访问权限
- 优化 GlobalExceptionHandler 中的参数验证错误信息显示,提供详细的字段错误信息
- 移除 RegisterRequest 和 VerifyRequest 中的注解验证,改用代码手动验证
- 为 register 接口添加 deviceId 非空检查
- 为 verify 接口添加 deviceId 和 token 非空检查
- 移除 RegisterRequest 中对 deviceId 的 @NotBlank 注解验证
- 移除 VerifyRequest 中对 deviceId 和 token 的 @NotBlank 注解验证
2026-05-23 02:23:53 +08:00
XuqmGroup
b7c2f0144f refactor(license): remove server-side package name validation
Package name matching is now entirely the SDK's responsibility.
- DeviceService: drop packageName param from register/verify, delete validatePackageName()
- LicensePublicController: remove matchesPackageName check in resolveAppKey(),
  remove packageName from service calls, add GET /api/license/app-info for
  SDK appKey-only flow to fetch configured package names for local comparison

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 00:28:51 +08:00
XuqmGroup
26261263a0 fix: use docker ps labels to list services and fetch logs
Replace compose-file-path-dependent `docker compose -f <path>` calls
with label-based `docker ps` queries so the ops log viewer works on
both public cloud and private deployments regardless of compose file
location.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 23:43:39 +08:00
XuqmGroup
5e788fe26b feat(system): 添加服务日志查看功能及版本化数据库迁移机制
- SystemUpdateService: 引入 _schema_migrations 迁移表,启动时自动执行,替换
  原 docker exec 方式;新增 getRunningServices / getServiceLogs 供日志查看使用
- SystemUpdateController: 新增 GET /api/system/services、/logs/{service}、/version
- OpsController: 新增 GET /api/ops/system/services、/logs/{service}(ROLE_OPS)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 23:22:46 +08:00
XuqmGroup
0e5558116c feat(system): 添加系统版本查询和数据库迁移功能
- 移除 license-service 中 DeviceEntity 的 device_id 唯一约束注解
- 添加 /api/system/version 接口用于查询当前部署版本
- 实现数据库 schema 版本化迁移机制
- 添加自动执行数据库迁移的功能
- 在前端安全中心界面显示当前版本和迁移状态
- 优化配置文件修复逻辑和代码结构
2026-05-22 23:04:36 +08:00
XuqmGroup
c6ab1b9244 fix(update): 修复应用版本审核状态轮询逻辑
- 扩展查询条件以包含非当前发布和预存在标记的应用版本
- 更新轮询日志信息以反映新的状态检查范围
- 添加对已批准商店中陈旧非当前发布/预存在标记的清理逻辑
- 实现在线版本码比较来清除错误的状态标记
- 优化轮询流程以处理审核状态和陈旧标记的组合情况
2026-05-22 22:18:50 +08:00
XuqmGroup
362dbcc638 fix: clear stale nonCurrentRelease even when onlineVersionCode is blank
Enhance the universal cleanup in refreshStoreReviewStatus to also clear
stale nonCurrentRelease/preExisting marks when onlineVersionCode is blank
but currentSubmissionLive is false. This handles OPPO and other stores
that may not return a versionCode in their API response.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:55:49 +08:00
XuqmGroup
23390570ef feat: auto-generate license file on download if missing
Add AppService.ensureLicenseFile() that generates and persists a license
file when the app doesn't have one yet. Update AppController.downloadLicenseFile
to use it instead of throwing "License file not generated yet".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:47:53 +08:00
XuqmGroup
619e822d85 fix: clear stale nonCurrentRelease regardless of polled review state
Previous fix only cleared stale APPROVED+nonCurrentRelease states when
poll returned mappedState==APPROVED. If the store API returned UNDER_REVIEW
(for the newly-submitted version) while the DB still held a stale
APPROVED+nonCurrentRelease from the old online version, the stale state
was never cleared.

Add universal cleanup: before any mappedState branching, if onlineVersionCode
< submittedCode and the DB entry has nonCurrentRelease/preExisting flags,
immediately clear the store review state.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:44:53 +08:00
XuqmGroup
0c9fd338eb fix: clear stale APPROVED state when online version is older than submitted
- Add AppStoreService.clearStoreReview() to remove a store's review entry
  from storeReviewStatus JSON (used for false-positive cleanup)
- refreshStoreReviewStatus: when existing state is APPROVED but polled
  onlineVersionCode < submittedCode, clear the stale state instead of
  leaving the misleading nonCurrentRelease flag in place

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:20:48 +08:00
XuqmGroup
8f2f29170e feat: add tenant ownership check to license file parser
Require @AuthenticationPrincipal tenantId in parseLicenseFile endpoint
and verify the decrypted appKey belongs to the current tenant before
returning license contents. Returns 403 "权限不足无法展示" for
cross-tenant license files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:09:27 +08:00
XuqmGroup
94fda7ad6e fix: allow store submission when online version is older than submitted
- Add compareVersionCodes() helper to compare numeric versionCodes safely
- preflightStoreSubmission: block only when onlineVersionCode >= submittedCode;
  allow submit when online < submitted (normal new release)
- refreshStoreReviewStatus: only write preExisting=true when online >= submitted
- pollStoreReviewStatus: same guard for UNDER_REVIEW/REJECTED → ONLINE transitions
- All per-store query methods (Huawei, Xiaomi, OPPO, VIVO, Honor): only set
  nonCurrentRelease=true when onlineVersionCode > submittedCode
- Fix pre-existing compilation errors: replace findByAppKeyAndStoreType with
  findTopByAppKeyAndStoreTypeOrderByUpdatedAtDesc

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:09:20 +08:00
XuqmGroup
1a0ef7d886 support multi-app device registration per device
- Add composite unique constraint (app_key, device_id) on DeviceEntity
- Remove global unique constraint from device_id column
- Update DeviceRepository: findByAppKeyAndDeviceId returns Optional,
  findByDeviceId returns List for multi-app lookups
- Update DeviceService.register/verify to scope lookups by appKey
  so same physical device can register independently for each app
- Update LicenseInternalController.getDevice to return list

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 18:47:17 +08:00
XuqmGroup
843ed69f3c license: fix device re-register appKey update, add license file parser
- DeviceService.register(): update appKey when device switches to a different app
  and adjust registered device counters for old/new appKey
- LicenseAdminController: fix updateAppLicense parameter count mismatch
- AppController: add POST /api/apps/license/parse endpoint for license file decryption
- SecurityCenterView: add License file parser UI with upload and paste support
- appApi: add parseLicenseFile() method

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 18:37:46 +08:00
XuqmGroup
ccb976c605 tenant: auto-generate license file on app creation, decouple from license service
- AppEntity: add licenseFileContent field to store pre-generated encrypted license
- AppService: generate license file content on create/update with normalized baseUrl
- AppController: read license file content from entity instead of generating on-the-fly
- Web: remove license download v-if serviceEnabled check, always show download button

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 17:56:12 +08:00
XuqmGroup
8c9bfb6acd feat: license 文件作为通用凭证支持所有服务 SDK 初始化
- LicenseFileCrypto 移至 common 模块并新增 decrypt() 方法
- LicenseFileCrypto.LicensePayload 携带 appKey / packageName / iosBundleId / harmonyBundleName,matchesPackageName() 支持三端包名任一匹配
- tenant-service downloadLicenseFile:去掉"License 服务已开通"限制,app 创建即可下载;payload 新增 iosBundleId / harmonyBundleName
- im / push / update / license 四个服务 SDK 初始化端点均支持双模式:
  · licenseFile 模式:解密文件取 appKey,比对 packageName(无需调 tenant-service)
  · appKey 模式:调 tenant-service 取 platformInfo 比对 packageName(原有逻辑)
- appKey 参数由必填改为可选(与 licenseFile 二选一)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 16:47:30 +08:00
XuqmGroup
0a267c5f70 feat: 校验 SDK 初始化时 packageName 与平台配置的 appKey 是否匹配
- im/push/update 三个服务登录/检查更新接口新增必填参数 packageName
- 调用对应服务的 tenant-service 内部接口获取 platformInfo,与传入包名比对,不匹配返回 403
- update 服务按 platform 字段精确匹配(ANDROID/IOS/HARMONY 各用对应字段)
- im/push 服务对三端包名任一匹配即通过
- ImAppSecretClient / PushAppSecretClient 新增 getPlatformInfo 缓存方法
- 新增 UpdateTenantClient 用于 update-service 调用 tenant-service platformInfo 接口

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 16:41:17 +08:00
XuqmGroup
4c0db6e9b7 feat: validate packageName against appKey on SDK and license init
SdkConfigController: require packageName param; reject with 403 if it doesn't
match the platform-specific name registered for the app (skipped when app has
no name configured yet).

LicensePublicController: add required packageName to register/verify requests.
DeviceService: validatePackageName() checks against android/ios/harmony names
stored on AppLicenseEntity; rejects if any are configured and none match.
AppLicenseEntity: add android_package_name, ios_bundle_id, harmony_bundle_name
columns (auto-migrated via ddl-auto=update).
LicenseInternalController/AppLicenseService: accept and persist package names
via upsert endpoint.
LicenseServiceClient/FeatureServiceManager: pass app package names when syncing
license records to license-service.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 16:31:50 +08:00
XuqmGroup
138360b760 fix(update): rewrite file-service URL to internal address for private deployments
UpdateAssetService: add FILE_BASE_URL / FILE_SERVICE_INTERNAL_URL config; any URL
starting with FILE_BASE_URL is rewritten to the internal file-service address instead
of going through the external domain, fixing APK inspect timeout on private deployments.

SystemUpdateService: add patchDockerComposeUpdateService() to inject FILE_BASE_URL and
FILE_SERVICE_INTERNAL_URL into existing customers' docker-compose.yml on update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 16:03:09 +08:00
XuqmGroup
32aa3c0eef feat(tenant): split update/reset ops, remove bootstrap app auto-creation
- SystemUpdateService: split runUpdate() (pull+recreate) and runReset() (recreate only)
- SystemUpdateController: add POST /api/system/reset endpoint
- SdkAppProvisioningService: remove ensureBootstrapApp/ensureApp/ensureFeatureDefaults; resolveApp now throws 404 instead of auto-creating
- SdkAppInitializer: remove ensureBootstrapApp call; only runs one-time migration marking existing system apps as isDefault=true
- PrivateTenantBootstrapInitializer: remove bootstrap app creation; only ensures admin tenant account exists

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 15:33:20 +08:00
XuqmGroup
9728dbb002 fix: suppress duplicate-result errors and hide system apps from private deployment
update-service:
- AppPublishConfigRepository/AppStoreConfigRepository: change Optional-returning
  findBy methods to findTopBy...OrderByUpdatedAtDesc to tolerate duplicate rows in
  public DB and avoid IncorrectResultSizeDataAccessException
- Revert GlobalExceptionHandler to safe "服务器内部错误" (debug details removed)

tenant-service:
- SdkAppInitializer: skip Demo Chat creation on DEPLOYMENT_MODE=PRIVATE;
  migrate existing system apps (ak_demo_chat, IM platform app) to is_default=true
- SdkAppProvisioningService.ensureApp: mark all platform-provisioned apps as
  is_default=true, deletable=false so they don't appear in user's app list
- PrivateTenantBootstrapInitializer: migrate existing private bootstrap apps to
  is_default=true on upgrade
- AppService.listByTenant: filter out is_default=true system apps from the list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 14:24:33 +08:00
XuqmGroup
855b17ef0e fix(update): 修复版本列表排序并改进Android包上传功能
- 将版本查询排序从versionCode改为createdAt以正确显示最新版本
- 为Android包上传表单添加已上传文件显示区域
- 实现删除已上传文件的功能以便重新上传
- 添加上传组件引用以支持文件清除操作
- 增加Document和Delete图标导入用于文件管理界面
- 添加已上传文件信息的样式和布局支持
2026-05-21 18:20:06 +08:00
XuqmGroup
24e11794bc refactor(update): 移除版本重复检查并修改发布状态逻辑
- 移除了应用包名和版本号的重复上传检查逻辑
- 修改了发布立即生效时的状态变更机制,改为将其他已发布版本标记为废弃状态
- 新增了按应用键、平台和发布状态查询的方法
- 简化了版本上传时的验证流程,移除了APK文件MD5比较相关代码
2026-05-21 18:08:21 +08:00
XuqmGroup
e5d9e0da0c debug(update-service): 在错误响应中暴露异常信息(临时)
用于排查上传接口 500 错误的根本原因,确认后将恢复。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:47:51 +08:00
XuqmGroup
d49d0297cf fix(update-service): 非灰度版本对匿名用户可见
原逻辑在 allowAnonymousCheck=false 且 userId=null 时直接返回
needsUpdate=false,导致无登录流程的应用(如 clinical-android)
永远收不到更新提示。

修正为:只有灰度版本才需要 userId;非灰度已发布版本对所有调用
方可见,allowAnonymousCheck=false 仅在非灰度场景下补充拦截。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:22:59 +08:00
XuqmGroup
c9c50038bf fix(tenant-service): 自动修复 nginx 更新接口 60s 超时
patchNginxUpdateTimeout 为 /api/system/update 注入精确匹配 location,
proxy_read_timeout 设为 600s,避免 docker pull 静默期断连。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:19:55 +08:00