diff --git a/docs/测试验收与上线记录.md b/docs/测试验收与上线记录.md index e557d9a3..bef0d323 100644 --- a/docs/测试验收与上线记录.md +++ b/docs/测试验收与上线记录.md @@ -609,3 +609,11 @@ - Nginx 验证:`nginx -t` 成功,`nginx.service` 为 `active`;根域名、店务独立域名、HTTP 到 HTTPS 跳转、`/api/`、`/admin/api/` 和 `/health/check` 路由配置均与生产规划一致。 - 公网验证:`https://yunail.art/` 和 `https://www.yunail.art/` 返回设计师端入口;`https://yunail.art/jy-salon-front/` 和 `https://salon.yunail.art/` 返回店务端入口;`https://yunail.art/health/check` 与 `https://salon.yunail.art/health/check` 均返回 Gateway JSON;`http://salon.yunail.art/` 返回 301 到 HTTPS。 - 证书验证:公网 HTTPS 正常校验通过,证书未过期,有效期至 2026-10-07 06:14:28 UTC。 + +## 2026-07-14 生产数据库初始化重置验收 + +- 执行目标:生产 Nacos namespace `jayu-cloud`、`mysql02` 的 `jayu_cloud`、3 个 Core 节点和 3 个 Gateway 节点。 +- 前置校验:`datasource.yaml` 与 `infra.yaml` 均指向 `192.168.5.110:3306/jayu_cloud`;MySQL 预检确认 3306 可连接、目标 schema 存在、临时写入检查通过、`mysqldump` 检查通过。 +- 执行结果:按 Gateway、Core 顺序停服后完成备份与初始化导入;备份文件为 `/tmp/jayu_cloud_backup_20260714153759.sql`;初始化后表数量为 58,默认管理员 `xiaowang` 数量为 1,管理员权限绑定数量为 77,`t_order`、`t_shop`、`t_product` 均为 0。 +- 服务恢复:按 Core、Gateway 顺序启动后,6 个 systemd 服务均为 `active`;Nacos 中 `jy-core` 和 `jy-gateway` 均为 3/3 healthy。 +- 公网验证:`https://yunail.art/`、`https://www.yunail.art/`、`https://yunail.art/health/check`、`https://salon.yunail.art/health/check` 均返回 200;后台默认管理员登录验证成功,登录密码不写入仓库文档。 diff --git a/docs/项目变更记录.md b/docs/项目变更记录.md index fe22b757..d95c34b8 100644 --- a/docs/项目变更记录.md +++ b/docs/项目变更记录.md @@ -149,3 +149,10 @@ - 处理方式:通过 Nacos API 确认 `JayuCloud-Dev / DEFAULT_GROUP` 当前实际存在 `core.yaml`、`gateway.yaml`、`infra.yaml`、`secret.yaml`、`logging.yaml` 5 个 dataId;为每条配置行补齐中文注释后发布回 dev Nacos。`datasource.yaml` 定向读取为 404,本次未新增该 dataId。 - 影响范围:仅影响开发环境 Nacos 配置中心中的注释文本;不修改业务代码、不修改数据库、不修改配置值、不修改初始化 SQL。敏感配置原值只保留在 Nacos,未写入仓库或文档。 - 验证方式:本地生成注释版后先校验“去除注释后的配置内容与原配置完全一致”,发布后回读 5 个 dataId 并逐项比对为 `sameContent=true`;配置行与注释行数量分别为 `core.yaml 97/97`、`gateway.yaml 155/155`、`infra.yaml 87/87`、`secret.yaml 75/75`、`logging.yaml 6/6`。 + +## 2026-07-14 生产数据库重置为初始化状态 + +- 变更原因:按上线前确认要求,将生产 `jayu_cloud` 数据库回到当前 `scripts/sql/init/JayuCloud.sql` 对应的初始化状态,并复核默认管理员登录。 +- 执行方式:先通过生产 Nacos `jayu-cloud / DEFAULT_GROUP / datasource.yaml` 和 `infra.yaml` 校验目标均为 `192.168.5.110:3306/jayu_cloud`;数据库连接账号以 Nacos datasource 为准,凭据不写入仓库;预检通过后按 Gateway、Core 顺序停服,备份现库,再导入初始化 SQL,最后按 Core、Gateway 顺序启动。 +- 数据库结果:已在 `mysql02` 生成备份 `/tmp/jayu_cloud_backup_20260714153759.sql`;初始化后 `jayu_cloud` 表数量为 58,默认管理员 `xiaowang` 存在,管理员权限绑定数量为 77,`t_order`、`t_shop`、`t_product` 均为空。 +- 验证方式:`jy-core` 与 `jy-gateway` 在 Nacos 均恢复为 3/3 healthy;`https://yunail.art/health/check` 与 `https://salon.yunail.art/health/check` 均返回 200;后台默认管理员登录已验证成功,管理员密码不写入仓库文档。