统一甲屿云命名体系
This commit is contained in:
@@ -8,17 +8,17 @@
|
||||
|
||||
纳入本次基线的运行入口:
|
||||
|
||||
- `FD-Core`:`pom.xml` 版本为 `0.0.1`。
|
||||
- `FD-Gateway`:`pom.xml` 版本为 `0.0.1`。
|
||||
- `FD-Frontend`:`package.json` 和 `package-lock.json` 版本为 `0.0.1`。
|
||||
- `FD-WeChat-Fronted`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 用户端小程序基线。
|
||||
- `FM-Wechat-Fronted`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 管理师小程序基线。
|
||||
- `scripts/sql/init/FingertipDesigner.sql`:作为 `0.0.1` 空库初始化 SQL 基线。
|
||||
- `JY-Core`:`pom.xml` 版本为 `0.0.1`。
|
||||
- `JY-Gateway`:`pom.xml` 版本为 `0.0.1`。
|
||||
- `JY-Artist-Frontend`:`package.json` 和 `package-lock.json` 版本为 `0.0.1`。
|
||||
- `JY-Artist-WeChat`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 用户端小程序基线。
|
||||
- `JY-Salon-WeChat`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 店务小程序基线。
|
||||
- `scripts/sql/init/JayuCloud.sql`:作为 `0.0.1` 空库初始化 SQL 基线。
|
||||
- `scripts/sql/migrations/`:作为 `0.0.1` 后续数据库版本变更脚本目录。
|
||||
|
||||
## 初始化 SQL 冻结规则
|
||||
|
||||
从 `0.0.1` 起,`scripts/sql/init/FingertipDesigner.sql` 只作为空库首次初始化基线,不再在后续需求、修复或配置变更中修改。
|
||||
从 `0.0.1` 起,`scripts/sql/init/JayuCloud.sql` 只作为空库首次初始化基线,不再在后续需求、修复或配置变更中修改。
|
||||
|
||||
后续涉及表结构、补列、索引、权限种子、系统参数、运行必需种子数据或数据修复时,必须新增版本变更 SQL,不得回写初始化 SQL。
|
||||
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
# FM-Front 移动端发布配置说明
|
||||
|
||||
更新时间:2026-06-29
|
||||
|
||||
## 访问路径
|
||||
|
||||
`FM-Front` 是管理师移动端 Web 模块,生产访问路径固定为:
|
||||
|
||||
```text
|
||||
https://yunail.art/fm-front/
|
||||
```
|
||||
|
||||
Vite `base` 固定为 `/fm-front/`,不能部署到域名根路径,否则静态资源路径会不匹配。
|
||||
|
||||
## 构建产物
|
||||
|
||||
`FM-Front` 独立执行:
|
||||
|
||||
```text
|
||||
npm ci
|
||||
npm run build
|
||||
```
|
||||
|
||||
构建产物目录为:
|
||||
|
||||
```text
|
||||
FM-Front/dist
|
||||
```
|
||||
|
||||
`scripts/package-release.ps1` 会先构建 `FD-Frontend`,再构建 `FM-Front`,发布包内包含:
|
||||
|
||||
```text
|
||||
frontend/dist
|
||||
frontend/dist/fm-front
|
||||
frontend/fm-front-dist
|
||||
```
|
||||
|
||||
其中 `frontend/dist/fm-front` 用于与现有 Web 前端一起部署,`frontend/fm-front-dist` 用于人工核查和独立备份。
|
||||
|
||||
## 生产部署目录
|
||||
|
||||
`scripts/deploy-fingertip-designer-production.ps1` 会把 `FD-Frontend/dist` 与 `FM-Front/dist` 合并为同一个 Web tar 包:
|
||||
|
||||
```text
|
||||
dist/
|
||||
dist/fm-front/
|
||||
```
|
||||
|
||||
远端 Web 发布目录沿用:
|
||||
|
||||
```text
|
||||
/opt/fingertip-designer-frontend
|
||||
```
|
||||
|
||||
脚本解压后仍使用现有软链:
|
||||
|
||||
```text
|
||||
/opt/fingertip-designer-frontend/current -> releases/{timestamp}/dist
|
||||
```
|
||||
|
||||
因此 `/fm-front/` 实际对应:
|
||||
|
||||
```text
|
||||
/opt/fingertip-designer-frontend/current/fm-front/
|
||||
```
|
||||
|
||||
## 接口与鉴权
|
||||
|
||||
移动端 Web 复用现有后端接口,不新增后端配置:
|
||||
|
||||
```text
|
||||
/admin/api
|
||||
/api
|
||||
```
|
||||
|
||||
请求签名、设备 ID、本地会话和鉴权刷新逻辑由 `FM-Front/src/api` 与 `FM-Front/src/utils/request-signature.ts` 维护。
|
||||
|
||||
## 回滚注意事项
|
||||
|
||||
回滚 Web 版本时,回滚单位是整个 Web `current` 软链;`FD-Frontend` 与 `FM-Front` 会一起回到上一个 Web 发布版本。
|
||||
|
||||
如只需临时下线移动端,可以在当前 Web 目录中移除 `fm-front` 子目录,但下一次发布会重新生成。
|
||||
|
||||
## 验证方式
|
||||
|
||||
发布前至少执行:
|
||||
|
||||
```text
|
||||
cd FM-Front
|
||||
npm ci
|
||||
npm run test:unit
|
||||
npm run build
|
||||
```
|
||||
|
||||
生产发布脚本的公开冒烟会检查:
|
||||
|
||||
```text
|
||||
GET https://yunail.art/health/check
|
||||
GET https://yunail.art/api/shop/list
|
||||
GET https://yunail.art/fm-front/
|
||||
```
|
||||
@@ -0,0 +1,102 @@
|
||||
# JY-Salon-Front 移动端发布配置说明
|
||||
|
||||
更新时间:2026-06-29
|
||||
|
||||
## 访问路径
|
||||
|
||||
`JY-Salon-Front` 是店务移动端 Web 模块,生产访问路径固定为:
|
||||
|
||||
```text
|
||||
https://yunail.art/jy-salon-front/
|
||||
```
|
||||
|
||||
Vite `base` 固定为 `/jy-salon-front/`,不能部署到域名根路径,否则静态资源路径会不匹配。
|
||||
|
||||
## 构建产物
|
||||
|
||||
`JY-Salon-Front` 独立执行:
|
||||
|
||||
```text
|
||||
npm ci
|
||||
npm run build
|
||||
```
|
||||
|
||||
构建产物目录为:
|
||||
|
||||
```text
|
||||
JY-Salon-Front/dist
|
||||
```
|
||||
|
||||
`scripts/package-release.ps1` 会先构建 `JY-Artist-Frontend`,再构建 `JY-Salon-Front`,发布包内包含:
|
||||
|
||||
```text
|
||||
frontend/dist
|
||||
frontend/jy-artist-dist
|
||||
frontend/dist/jy-salon-front
|
||||
frontend/jy-salon-front-dist
|
||||
```
|
||||
|
||||
其中 `frontend/dist/jy-salon-front` 用于与现有 Web 前端一起部署,`frontend/jy-artist-dist` 和 `frontend/jy-salon-front-dist` 用于人工核查和独立备份。
|
||||
|
||||
## 生产部署目录
|
||||
|
||||
`scripts/deploy-jayu-cloud-production.ps1` 会把 `JY-Artist-Frontend/dist` 与 `JY-Salon-Front/dist` 合并为同一个 Web tar 包:
|
||||
|
||||
```text
|
||||
dist/
|
||||
dist/jy-salon-front/
|
||||
```
|
||||
|
||||
远端 Web 发布目录沿用:
|
||||
|
||||
```text
|
||||
/opt/jy-artist-frontend
|
||||
```
|
||||
|
||||
脚本解压后仍使用现有软链:
|
||||
|
||||
```text
|
||||
/opt/jy-artist-frontend/current -> releases/{timestamp}/dist
|
||||
```
|
||||
|
||||
因此 `/jy-salon-front/` 实际对应:
|
||||
|
||||
```text
|
||||
/opt/jy-artist-frontend/current/jy-salon-front/
|
||||
```
|
||||
|
||||
## 接口与鉴权
|
||||
|
||||
移动端 Web 复用现有后端接口,不新增后端配置:
|
||||
|
||||
```text
|
||||
/admin/api
|
||||
/api
|
||||
```
|
||||
|
||||
请求签名、设备 ID、本地会话和鉴权刷新逻辑由 `JY-Salon-Front/src/api` 与 `JY-Salon-Front/src/utils/request-signature.ts` 维护。
|
||||
|
||||
## 回滚注意事项
|
||||
|
||||
回滚 Web 版本时,回滚单位是整个 Web `current` 软链;`JY-Artist-Frontend` 与 `JY-Salon-Front` 会一起回到上一个 Web 发布版本。
|
||||
|
||||
如只需临时下线移动端,可以在当前 Web 目录中移除 `jy-salon-front` 子目录,但下一次发布会重新生成。
|
||||
|
||||
## 验证方式
|
||||
|
||||
发布前至少执行:
|
||||
|
||||
```text
|
||||
cd JY-Salon-Front
|
||||
npm ci
|
||||
npm run test:unit
|
||||
npm run build
|
||||
```
|
||||
|
||||
生产发布脚本的公开冒烟会检查:
|
||||
|
||||
```text
|
||||
GET https://yunail.art/health/check
|
||||
GET https://yunail.art/api/shop/list
|
||||
GET https://yunail.art/jy-salon-front/
|
||||
```
|
||||
@@ -1,13 +1,13 @@
|
||||
# 指尖管理师上线配置说明
|
||||
# Jayu Salon上线配置说明
|
||||
|
||||
## 生产配置约定
|
||||
|
||||
- 生产域名:`https://yunail.art`。
|
||||
- 指尖管理师小程序管理端 API:`https://yunail.art/api/admin`。
|
||||
- Jayu Salon小程序管理端 API:`https://yunail.art/api/admin`。
|
||||
- 网关对外管理端入口:`/api/admin/**`。
|
||||
- Core 内部管理端入口:`/admin/**`。
|
||||
- 生产数据库名:`FingertipDesigner`,Linux MySQL 环境下必须保持大小写一致。
|
||||
- 生产 Nacos namespace:`FingertipDesigner`。
|
||||
- 生产数据库名:`jayu_cloud`,Linux MySQL 环境下必须保持大小写一致。
|
||||
- 生产 Nacos namespace:`jayu-cloud`。
|
||||
|
||||
## Nacos 必填配置
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
## 发布前确认项
|
||||
|
||||
- 微信后台已配置 `https://yunail.art` 为合法请求域名。
|
||||
- 指尖管理师小程序与用户端小程序是否共用 appid 已经过产品/发布负责人确认。
|
||||
- Jayu Salon小程序与用户端小程序是否共用 appid 已经过产品/发布负责人确认。
|
||||
- Core 与 Gateway 的生产端口和健康检查地址已与 systemd、Nginx、部署脚本保持一致。
|
||||
- 上传大小限制已确认:当前 Servlet 单文件限制为 5MB,单请求限制为 10MB。
|
||||
- 初始化 SQL 仅用于空库首次部署;已有生产库必须使用版本变更 SQL,不允许直接执行初始化 SQL 覆盖升级。
|
||||
+40
-40
@@ -10,19 +10,19 @@
|
||||
[switch]$SkipDatabaseInit,
|
||||
[string]$DatabaseTargetName = "mysql02",
|
||||
[int]$DatabasePort = 3306,
|
||||
[string]$DatabaseName = "FingertipDesigner",
|
||||
[string]$DatabaseName = "jayu_cloud",
|
||||
[string]$DatabaseUser = "",
|
||||
[string]$DatabasePassword = "",
|
||||
[string]$InitSqlPath = "",
|
||||
[string]$CorePattern = "^FD-Core",
|
||||
[string]$GatewayPattern = "^FD-Gateway",
|
||||
[string]$CorePattern = "^JY-Core",
|
||||
[string]$GatewayPattern = "^JY-Gateway",
|
||||
[string]$WebTargetName = "",
|
||||
[string]$WebTargetHost = "8.137.35.61",
|
||||
[string]$CoreRemoteAppDir = "/opt/fingertip-designer-core",
|
||||
[string]$GatewayRemoteAppDir = "/opt/fingertip-designer-gateway",
|
||||
[string]$WebRemoteDir = "/opt/fingertip-designer-frontend",
|
||||
[string]$CoreServiceName = "fingertip-designer-core",
|
||||
[string]$GatewayServiceName = "fingertip-designer-gateway",
|
||||
[string]$CoreRemoteAppDir = "/opt/jy-core",
|
||||
[string]$GatewayRemoteAppDir = "/opt/jy-gateway",
|
||||
[string]$WebRemoteDir = "/opt/jy-artist-frontend",
|
||||
[string]$CoreServiceName = "jy-core",
|
||||
[string]$GatewayServiceName = "jy-gateway",
|
||||
[int]$CoreHealthPort = 81,
|
||||
[int]$GatewayHealthPort = 80,
|
||||
[string]$HealthPath = "/health/check",
|
||||
@@ -41,7 +41,7 @@ $backendDir = Join-Path $releaseDir "backend"
|
||||
$frontendDir = Join-Path $releaseDir "frontend"
|
||||
$sqlDir = Join-Path $releaseDir "sql"
|
||||
$manifestPath = Join-Path $releaseDir "manifest.json"
|
||||
$defaultInitSqlPath = Join-Path $resolvedRepoRoot "scripts\sql\init\FingertipDesigner.sql"
|
||||
$defaultInitSqlPath = Join-Path $resolvedRepoRoot "scripts\sql\init\JayuCloud.sql"
|
||||
if (-not $InitSqlPath) {
|
||||
$InitSqlPath = $defaultInitSqlPath
|
||||
}
|
||||
@@ -458,11 +458,11 @@ function Assert-InitSqlSafe {
|
||||
}
|
||||
|
||||
$content = Get-Content -LiteralPath $Path -Raw
|
||||
if ($content -notmatch "CREATE DATABASE IF NOT EXISTS\s+FingertipDesigner") {
|
||||
throw "初始化 SQL 未声明目标库 FingertipDesigner:$Path"
|
||||
if ($content -notmatch "CREATE DATABASE IF NOT EXISTS\s+jayu_cloud") {
|
||||
throw "初始化 SQL 未声明目标库 jayu_cloud:$Path"
|
||||
}
|
||||
if ($content -notmatch "(?im)^\s*use\s+FingertipDesigner\s*;") {
|
||||
throw "初始化 SQL 未切换到目标库 FingertipDesigner:$Path"
|
||||
if ($content -notmatch "(?im)^\s*use\s+jayu_cloud\s*;") {
|
||||
throw "初始化 SQL 未切换到目标库 jayu_cloud:$Path"
|
||||
}
|
||||
|
||||
$dangerousMatch = [regex]::Match($content, "(?im)^\s*(drop\s+(database|schema|table)|truncate\s+table)\b")
|
||||
@@ -483,41 +483,41 @@ function Build-ReleasePackage {
|
||||
$mavenArgs += "-DskipTests"
|
||||
}
|
||||
|
||||
Write-Step "构建 FD-Core"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FD-Core")
|
||||
Write-Step "构建 JY-Core"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JY-Core")
|
||||
|
||||
Write-Step "构建 FD-Gateway"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FD-Gateway")
|
||||
Write-Step "构建 JY-Gateway"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JY-Gateway")
|
||||
|
||||
Write-Step "构建 FD-Frontend"
|
||||
$frontendRoot = Join-Path $resolvedRepoRoot "FD-Frontend"
|
||||
Write-Step "构建 JY-Artist-Frontend"
|
||||
$frontendRoot = Join-Path $resolvedRepoRoot "JY-Artist-Frontend"
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $frontendRoot "node_modules"))) {
|
||||
Invoke-Native "npm" @("ci") $frontendRoot
|
||||
}
|
||||
Invoke-Native "npm" @("run", "build") $frontendRoot
|
||||
|
||||
Write-Step "构建 FM-Front"
|
||||
$managerMobileRoot = Join-Path $resolvedRepoRoot "FM-Front"
|
||||
Write-Step "构建 JY-Salon-Front"
|
||||
$managerMobileRoot = Join-Path $resolvedRepoRoot "JY-Salon-Front"
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $managerMobileRoot "node_modules"))) {
|
||||
Invoke-Native "npm" @("ci") $managerMobileRoot
|
||||
}
|
||||
Invoke-Native "npm" @("run", "build") $managerMobileRoot
|
||||
}
|
||||
|
||||
$coreJar = Join-Path $resolvedRepoRoot "FD-Core\target\FingertipDesigner-Core.jar"
|
||||
$gatewayJar = Join-Path $resolvedRepoRoot "FD-Gateway\target\FingertipDesigner-Gateway.jar"
|
||||
$frontendDist = Join-Path $resolvedRepoRoot "FD-Frontend\dist"
|
||||
$managerMobileDist = Join-Path $resolvedRepoRoot "FM-Front\dist"
|
||||
$coreJar = Join-Path $resolvedRepoRoot "JY-Core\target\JY-Core.jar"
|
||||
$gatewayJar = Join-Path $resolvedRepoRoot "JY-Gateway\target\JY-Gateway.jar"
|
||||
$frontendDist = Join-Path $resolvedRepoRoot "JY-Artist-Frontend\dist"
|
||||
$managerMobileDist = Join-Path $resolvedRepoRoot "JY-Salon-Front\dist"
|
||||
foreach ($requiredPath in @($coreJar, $gatewayJar, $frontendDist, $managerMobileDist, $InitSqlPath)) {
|
||||
if (-not (Test-Path -LiteralPath $requiredPath)) {
|
||||
throw "缺少发布产物:$requiredPath"
|
||||
}
|
||||
}
|
||||
|
||||
$coreArtifact = Join-Path $backendDir "FingertipDesigner-Core.jar"
|
||||
$gatewayArtifact = Join-Path $backendDir "FingertipDesigner-Gateway.jar"
|
||||
$frontendArtifact = Join-Path $frontendDir "fingertip-designer-frontend-dist.tar.gz"
|
||||
$sqlArtifact = Join-Path $sqlDir "FingertipDesigner.sql"
|
||||
$coreArtifact = Join-Path $backendDir "JY-Core.jar"
|
||||
$gatewayArtifact = Join-Path $backendDir "JY-Gateway.jar"
|
||||
$frontendArtifact = Join-Path $frontendDir "jy-artist-frontend-dist.tar.gz"
|
||||
$sqlArtifact = Join-Path $sqlDir "JayuCloud.sql"
|
||||
Copy-Item -LiteralPath $coreJar -Destination $coreArtifact -Force
|
||||
Copy-Item -LiteralPath $gatewayJar -Destination $gatewayArtifact -Force
|
||||
Copy-Item -LiteralPath $InitSqlPath -Destination $sqlArtifact -Force
|
||||
@@ -531,7 +531,7 @@ function Build-ReleasePackage {
|
||||
}
|
||||
$frontendStagingRoot = Join-Path $frontendDir "web-dist"
|
||||
$frontendStagingDist = Join-Path $frontendStagingRoot "dist"
|
||||
$managerMobileStagingDist = Join-Path $frontendStagingDist "fm-front"
|
||||
$managerMobileStagingDist = Join-Path $frontendStagingDist "jy-salon-front"
|
||||
if (Test-Path -LiteralPath $frontendStagingRoot) {
|
||||
Remove-Item -LiteralPath $frontendStagingRoot -Recurse -Force
|
||||
}
|
||||
@@ -603,16 +603,16 @@ else
|
||||
echo `$! > "`$APP_DIR/app.pid"
|
||||
fi
|
||||
deadline=`$((`$(date +%s) + `$HEALTH_TIMEOUT))
|
||||
until curl -fsS "http://127.0.0.1:`$HEALTH_PORT`$HEALTH_PATH" >/tmp/fingertip-designer-health.out 2>/tmp/fingertip-designer-health.err; do
|
||||
until curl -fsS "http://127.0.0.1:`$HEALTH_PORT`$HEALTH_PATH" >/tmp/jayu-cloud-health.out 2>/tmp/jayu-cloud-health.err; do
|
||||
if [ "`$(date +%s)" -ge "`$deadline" ]; then
|
||||
echo "Health check failed for `$SERVICE on port `$HEALTH_PORT"
|
||||
cat /tmp/fingertip-designer-health.err || true
|
||||
cat /tmp/jayu-cloud-health.err || true
|
||||
if command -v systemctl >/dev/null 2>&1; then journalctl -u "`$SERVICE" -n 80 --no-pager || true; fi
|
||||
exit 43
|
||||
fi
|
||||
sleep 3
|
||||
done
|
||||
cat /tmp/fingertip-designer-health.out
|
||||
cat /tmp/jayu-cloud-health.out
|
||||
"@
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ echo "Web current -> `$TARGET"
|
||||
function Publish-Web {
|
||||
param([object]$Server, [string]$ArchivePath)
|
||||
|
||||
$archiveName = "fingertip-designer-frontend-dist-$releaseTimestamp.tar.gz"
|
||||
$archiveName = "jy-artist-frontend-dist-$releaseTimestamp.tar.gz"
|
||||
$quotedWebRemoteDir = ConvertTo-BashSingleQuoted $WebRemoteDir
|
||||
Write-Step "准备 Web 目标机器"
|
||||
Invoke-RemoteShell $Server "mkdir -p $quotedWebRemoteDir/releases"
|
||||
@@ -695,7 +695,7 @@ function Initialize-ProductionDatabase {
|
||||
throw "数据库用户名为空,请传入 -DatabaseUser 或在服务器清单中填写。"
|
||||
}
|
||||
|
||||
$remoteSqlPath = "/tmp/fingertip-designer-init-$releaseTimestamp.sql"
|
||||
$remoteSqlPath = "/tmp/jayu-cloud-init-$releaseTimestamp.sql"
|
||||
Write-Step "初始化生产空库"
|
||||
Write-Host "数据库目标:$($DatabaseServer.Name) $($DatabaseServer.Host):$DatabasePort/$DatabaseName"
|
||||
Invoke-RemoteShell $DatabaseServer "rm -f '$remoteSqlPath'"
|
||||
@@ -768,9 +768,9 @@ function Write-ReleaseManifest {
|
||||
gatewayRemoteAppDir = $GatewayRemoteAppDir
|
||||
webRemoteDir = $WebRemoteDir
|
||||
publicBaseUrl = $PublicBaseUrl
|
||||
managerMobileWeb = "$PublicBaseUrl/fm-front/"
|
||||
managerMobileWeb = "$PublicBaseUrl/jy-salon-front/"
|
||||
managerMiniProgramApi = "$PublicBaseUrl/api/admin"
|
||||
nacosNamespace = "FingertipDesigner"
|
||||
nacosNamespace = "jayu-cloud"
|
||||
dryRun = [bool]$DryRun
|
||||
deploy = [bool]$Deploy
|
||||
}
|
||||
@@ -784,12 +784,12 @@ function Invoke-PublicSmokeTests {
|
||||
Write-Host "DryRun public smoke tests:"
|
||||
Write-Host "GET $PublicBaseUrl/health/check"
|
||||
Write-Host "GET $PublicBaseUrl/api/shop/list"
|
||||
Write-Host "GET $PublicBaseUrl/fm-front/"
|
||||
Write-Host "GET $PublicBaseUrl/jy-salon-front/"
|
||||
return
|
||||
}
|
||||
|
||||
Write-Step "生产公开冒烟"
|
||||
foreach ($url in @("$PublicBaseUrl/health/check", "$PublicBaseUrl/api/shop/list", "$PublicBaseUrl/fm-front/")) {
|
||||
foreach ($url in @("$PublicBaseUrl/health/check", "$PublicBaseUrl/api/shop/list", "$PublicBaseUrl/jy-salon-front/")) {
|
||||
Write-Host "GET $url"
|
||||
$response = Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 20
|
||||
Write-Host "Status $($response.StatusCode) Length $($response.RawContentLength)"
|
||||
@@ -858,4 +858,4 @@ Publish-Web $webServers[0] $package.FrontendArchive
|
||||
Invoke-PublicSmokeTests
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "FingertipDesigner 生产发布流程完成。"
|
||||
Write-Host "JayuCloud 生产发布流程完成。"
|
||||
+32
-30
@@ -12,7 +12,7 @@ $releaseDir = Join-Path $releaseRoot $timestamp
|
||||
$backendDir = Join-Path $releaseDir "backend"
|
||||
$frontendDir = Join-Path $releaseDir "frontend"
|
||||
$miniProgramDir = Join-Path $releaseDir "miniprograms"
|
||||
$sqlPath = Join-Path $repoRoot "scripts\sql\init\FingertipDesigner.sql"
|
||||
$sqlPath = Join-Path $repoRoot "scripts\sql\init\JayuCloud.sql"
|
||||
|
||||
function Resolve-Maven {
|
||||
param([string]$PreferredPath)
|
||||
@@ -97,57 +97,59 @@ if ($SkipTests) {
|
||||
$mavenArgs += "-DskipTests"
|
||||
}
|
||||
|
||||
Write-Step "构建 FD-Core"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "FD-Core")
|
||||
Write-Step "构建 JY-Core"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "JY-Core")
|
||||
|
||||
Write-Step "构建 FD-Gateway"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "FD-Gateway")
|
||||
Write-Step "构建 JY-Gateway"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "JY-Gateway")
|
||||
|
||||
Write-Step "构建 FD-Frontend"
|
||||
$frontendRoot = Join-Path $repoRoot "FD-Frontend"
|
||||
Write-Step "构建 JY-Artist-Frontend"
|
||||
$frontendRoot = Join-Path $repoRoot "JY-Artist-Frontend"
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $frontendRoot "node_modules"))) {
|
||||
Invoke-Native "npm" @("ci") $frontendRoot
|
||||
}
|
||||
Invoke-Native "npm" @("run", "build") $frontendRoot
|
||||
|
||||
Write-Step "构建 FM-Front"
|
||||
$managerMobileRoot = Join-Path $repoRoot "FM-Front"
|
||||
Write-Step "构建 JY-Salon-Front"
|
||||
$managerMobileRoot = Join-Path $repoRoot "JY-Salon-Front"
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $managerMobileRoot "node_modules"))) {
|
||||
Invoke-Native "npm" @("ci") $managerMobileRoot
|
||||
}
|
||||
Invoke-Native "npm" @("run", "build") $managerMobileRoot
|
||||
|
||||
$coreJar = Join-Path $repoRoot "FD-Core\target\FingertipDesigner-Core.jar"
|
||||
$gatewayJar = Join-Path $repoRoot "FD-Gateway\target\FingertipDesigner-Gateway.jar"
|
||||
$coreJar = Join-Path $repoRoot "JY-Core\target\JY-Core.jar"
|
||||
$gatewayJar = Join-Path $repoRoot "JY-Gateway\target\JY-Gateway.jar"
|
||||
$frontendDist = Join-Path $frontendRoot "dist"
|
||||
$managerMobileDist = Join-Path $managerMobileRoot "dist"
|
||||
|
||||
Copy-RequiredFile $coreJar (Join-Path $backendDir "FingertipDesigner-Core.jar")
|
||||
Copy-RequiredFile $gatewayJar (Join-Path $backendDir "FingertipDesigner-Gateway.jar")
|
||||
Copy-RequiredFile $coreJar (Join-Path $backendDir "JY-Core.jar")
|
||||
Copy-RequiredFile $gatewayJar (Join-Path $backendDir "JY-Gateway.jar")
|
||||
Copy-Directory $frontendDist (Join-Path $frontendDir "dist")
|
||||
Copy-Directory $managerMobileDist (Join-Path $frontendDir "fm-front-dist")
|
||||
Copy-Directory $managerMobileDist (Join-Path $frontendDir "dist\fm-front")
|
||||
Copy-Directory (Join-Path $repoRoot "FD-WeChat-Fronted") (Join-Path $miniProgramDir "FD-WeChat-Fronted")
|
||||
Copy-Directory (Join-Path $repoRoot "FM-Wechat-Fronted") (Join-Path $miniProgramDir "FM-Wechat-Fronted")
|
||||
Copy-RequiredFile $sqlPath (Join-Path $releaseDir "FingertipDesigner.sql")
|
||||
Copy-Directory $frontendDist (Join-Path $frontendDir "jy-artist-dist")
|
||||
Copy-Directory $managerMobileDist (Join-Path $frontendDir "jy-salon-front-dist")
|
||||
Copy-Directory $managerMobileDist (Join-Path $frontendDir "dist\jy-salon-front")
|
||||
Copy-Directory (Join-Path $repoRoot "JY-Artist-WeChat") (Join-Path $miniProgramDir "JY-Artist-WeChat")
|
||||
Copy-Directory (Join-Path $repoRoot "JY-Salon-WeChat") (Join-Path $miniProgramDir "JY-Salon-WeChat")
|
||||
Copy-RequiredFile $sqlPath (Join-Path $releaseDir "JayuCloud.sql")
|
||||
|
||||
$manifest = @(
|
||||
"# FingertipDesigner Release $timestamp",
|
||||
"# JayuCloud Release $timestamp",
|
||||
"",
|
||||
"- backend/FingertipDesigner-Core.jar",
|
||||
"- backend/FingertipDesigner-Gateway.jar",
|
||||
"- backend/JY-Core.jar",
|
||||
"- backend/JY-Gateway.jar",
|
||||
"- frontend/dist",
|
||||
"- frontend/dist/fm-front",
|
||||
"- frontend/fm-front-dist",
|
||||
"- miniprograms/FD-WeChat-Fronted",
|
||||
"- miniprograms/FM-Wechat-Fronted",
|
||||
"- FingertipDesigner.sql",
|
||||
"- frontend/jy-artist-dist",
|
||||
"- frontend/dist/jy-salon-front",
|
||||
"- frontend/jy-salon-front-dist",
|
||||
"- miniprograms/JY-Artist-WeChat",
|
||||
"- miniprograms/JY-Salon-WeChat",
|
||||
"- JayuCloud.sql",
|
||||
"",
|
||||
"Nacos namespace: FingertipDesigner",
|
||||
"Database initialized by: scripts/sql/init/FingertipDesigner.sql",
|
||||
"Database name: FingertipDesigner",
|
||||
"Nacos namespace: jayu-cloud",
|
||||
"Database initialized by: scripts/sql/init/JayuCloud.sql",
|
||||
"Database name: jayu_cloud",
|
||||
"Manager mini program API: https://yunail.art/api/admin",
|
||||
"Manager mobile web: https://yunail.art/fm-front/"
|
||||
"Manager mobile web: https://yunail.art/jy-salon-front/"
|
||||
)
|
||||
$manifest | Set-Content -Encoding UTF8 (Join-Path $releaseDir "README.md")
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
-- FingertipDesigner 唯一初始化 SQL
|
||||
-- JayuCloud 唯一初始化 SQL
|
||||
-- 本文件用于开发、测试、上线空库初始化,后续环境基线均以本文件为准。
|
||||
-- 执行范围:建库、建表、索引、约束、平台管理员、基础权限、系统参数、协议、MessageHub 与 VIP 基础配置。
|
||||
-- 种子数据原则:只保留运行必需配置;不写入门店、商品、订单、客户、库存流水、测试消息等业务样例数据。
|
||||
-- 默认平台管理员账号:xiaowang,默认密码沿用当前 bcrypt 值。
|
||||
-- Linux MySQL 环境库名大小写敏感,数据源必须指向 FingertipDesigner。
|
||||
CREATE DATABASE IF NOT EXISTS FingertipDesigner DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
use FingertipDesigner;
|
||||
-- Linux MySQL 环境库名大小写敏感,数据源必须指向 jayu_cloud。
|
||||
CREATE DATABASE IF NOT EXISTS jayu_cloud DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
use jayu_cloud;
|
||||
|
||||
-- auto-generated definition
|
||||
create table t_balance
|
||||
@@ -484,7 +484,7 @@ create table t_product
|
||||
bookable_artists varchar(200) default '' null comment '可预约的美甲师ID集合,多个ID以逗号分隔',
|
||||
available_coupons text null comment '可用的优惠券ID集合,多个ID以逗号分隔',
|
||||
front_visible tinyint unsigned default 1 not null comment '前台是否展示:0-隐藏,1-展示',
|
||||
source_type varchar(64) default 'BACKEND' not null comment '来源类型:BACKEND-后台维护,MANAGER_APPOINTMENT-管理师端手动预约',
|
||||
source_type varchar(64) default 'BACKEND' not null comment '来源类型:BACKEND-后台维护,MANAGER_APPOINTMENT-店务端手动预约',
|
||||
create_time datetime default CURRENT_TIMESTAMP not null comment '商品创建时间',
|
||||
update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '商品信息最后更新时间',
|
||||
is_delete tinyint unsigned default 0 null comment '逻辑删除标识:0-未删除,1-已删除'
|
||||
@@ -1769,7 +1769,7 @@ CREATE TABLE IF NOT EXISTS `t_messagehub_push_config` (
|
||||
`platform` varchar(20) NOT NULL DEFAULT 'SMS' COMMENT 'MessageHub 平台类型:SMS/EMAIL/QQ',
|
||||
`msg_type` varchar(30) NOT NULL DEFAULT 'VERIFICATION' COMMENT 'MessageHub 消息类型',
|
||||
`queue_name` varchar(100) NOT NULL DEFAULT 'smsQueue' COMMENT '投递到 MessageHub 的队列名',
|
||||
`source_system` varchar(80) NOT NULL DEFAULT 'fingertipdesigner' COMMENT 'MessageHub 来源系统编码',
|
||||
`source_system` varchar(80) NOT NULL DEFAULT 'jayucloud' COMMENT 'MessageHub 来源系统编码',
|
||||
`template_code` varchar(100) NOT NULL COMMENT 'MessageHub 模板编码',
|
||||
`channel_id` bigint unsigned NULL COMMENT 'MessageHub 通道ID,不填则由 MessageHub 自动选择',
|
||||
`send_method` varchar(30) NULL COMMENT '兼容旧短信 DTO 的发送方式,如 SPUG/OTHER',
|
||||
@@ -1781,7 +1781,7 @@ CREATE TABLE IF NOT EXISTS `t_messagehub_push_config` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_messagehub_push_config_scene` (`scene_code`),
|
||||
KEY `idx_messagehub_push_config_enabled` (`enabled`, `is_delete`)
|
||||
) COMMENT='Fingertip Designer按业务场景投递MessageHub的配置';
|
||||
) COMMENT='Jayu Cloud按业务场景投递MessageHub的配置';
|
||||
|
||||
DROP PROCEDURE IF EXISTS sp_add_column_if_not_exists;
|
||||
DROP PROCEDURE IF EXISTS sp_add_index_if_not_exists;
|
||||
@@ -2102,12 +2102,12 @@ INSERT INTO t_messagehub_push_config (
|
||||
is_delete
|
||||
)
|
||||
VALUES
|
||||
(313931273555137001, 'USER_REGISTER_SMS_CODE', '用户注册验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'fingertipdesigner', 'SPUG0001', NULL, 'SPUG', 1, '注册功能发送验证码时使用', NOW(), NOW(), 0),
|
||||
(313931273555137002, 'USER_LOGIN_SMS_CODE', '手机号登录验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'fingertipdesigner', 'SPUG0001', NULL, 'SPUG', 1, '手机号验证码登录时使用', NOW(), NOW(), 0),
|
||||
(313931273555137003, 'USER_RESET_PASSWORD_SMS_CODE', '找回密码验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'fingertipdesigner', 'SPUG0001', NULL, 'SPUG', 1, '找回密码时使用', NOW(), NOW(), 0),
|
||||
(313931273555137004, 'USER_BIND_PHONE_SMS_CODE', '绑定手机号验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'fingertipdesigner', 'SPUG0001', NULL, 'SPUG', 1, '绑定手机号时使用', NOW(), NOW(), 0),
|
||||
(313931273555137005, 'USER_CHANGE_PHONE_SMS_CODE', '修改手机号验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'fingertipdesigner', 'SPUG0001', NULL, 'SPUG', 1, '修改手机号时使用', NOW(), NOW(), 0),
|
||||
(313931273555137006, 'USER_CHANGE_PASSWORD_SMS_CODE', '修改密码验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'fingertipdesigner', 'SPUG0001', NULL, 'SPUG', 1, '修改密码时使用', NOW(), NOW(), 0)
|
||||
(313931273555137001, 'USER_REGISTER_SMS_CODE', '用户注册验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'jayucloud', 'SPUG0001', NULL, 'SPUG', 1, '注册功能发送验证码时使用', NOW(), NOW(), 0),
|
||||
(313931273555137002, 'USER_LOGIN_SMS_CODE', '手机号登录验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'jayucloud', 'SPUG0001', NULL, 'SPUG', 1, '手机号验证码登录时使用', NOW(), NOW(), 0),
|
||||
(313931273555137003, 'USER_RESET_PASSWORD_SMS_CODE', '找回密码验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'jayucloud', 'SPUG0001', NULL, 'SPUG', 1, '找回密码时使用', NOW(), NOW(), 0),
|
||||
(313931273555137004, 'USER_BIND_PHONE_SMS_CODE', '绑定手机号验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'jayucloud', 'SPUG0001', NULL, 'SPUG', 1, '绑定手机号时使用', NOW(), NOW(), 0),
|
||||
(313931273555137005, 'USER_CHANGE_PHONE_SMS_CODE', '修改手机号验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'jayucloud', 'SPUG0001', NULL, 'SPUG', 1, '修改手机号时使用', NOW(), NOW(), 0),
|
||||
(313931273555137006, 'USER_CHANGE_PASSWORD_SMS_CODE', '修改密码验证码', 'SMS', 'VERIFICATION', 'smsQueue', 'jayucloud', 'SPUG0001', NULL, 'SPUG', 1, '修改密码时使用', NOW(), NOW(), 0)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
scene_name = VALUES(scene_name),
|
||||
platform = VALUES(platform),
|
||||
@@ -2222,8 +2222,8 @@ DEALLOCATE PREPARE stmt_system_parameter_enabled;
|
||||
|
||||
INSERT INTO t_legal_agreement (id, agreement_type, title, version, content, status, effective_time, create_time, update_time, is_delete)
|
||||
VALUES
|
||||
(313931273555138001, 'USER_TERMS', '用户协议', '2026.05.18', '欢迎使用 Fingertip Designer 指尖设计师。请在使用账号、预约、订单、会员、消息等功能前仔细阅读本协议。继续登录或注册即表示你已理解并同意平台基础服务规则、账号安全要求、订单预约规则和依法合规使用要求。', 1, NOW(), NOW(), NOW(), 0),
|
||||
(313931273555138002, 'PRIVACY_POLICY', '隐私政策', '2026.05.18', 'Fingertip Designer 指尖设计师会在提供登录注册、预约下单、会员余额、消息通知和客户服务时处理必要的手机号、昵称、门店归属、订单与设备信息。我们仅在业务需要和法律允许范围内使用这些信息,并采取访问控制、脱敏展示和审计记录等措施保护数据安全。', 1, NOW(), NOW(), NOW(), 0)
|
||||
(313931273555138001, 'USER_TERMS', '用户协议', '2026.05.18', '欢迎使用 Jayu Cloud 甲屿云。请在使用账号、预约、订单、会员、消息等功能前仔细阅读本协议。继续登录或注册即表示你已理解并同意平台基础服务规则、账号安全要求、订单预约规则和依法合规使用要求。', 1, NOW(), NOW(), NOW(), 0),
|
||||
(313931273555138002, 'PRIVACY_POLICY', '隐私政策', '2026.05.18', 'Jayu Cloud 甲屿云会在提供登录注册、预约下单、会员余额、消息通知和客户服务时处理必要的手机号、昵称、门店归属、订单与设备信息。我们仅在业务需要和法律允许范围内使用这些信息,并采取访问控制、脱敏展示和审计记录等措施保护数据安全。', 1, NOW(), NOW(), NOW(), 0)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
title = VALUES(title),
|
||||
content = VALUES(content),
|
||||
@@ -2250,7 +2250,7 @@ VALUES
|
||||
(313931273555139001, 'MAP', 'TENCENT_MAP_KEY', '腾讯 Web Key', '', 0, '用于后台腾讯地图选点和 Web 展示;请在后台参数管理中填入真实 Key 后启用', NOW(), NOW(), 0),
|
||||
(313931273555139002, 'MAP', 'AMAP_WEB_KEY', '高德 Web Key', '', 0, '用于后台高德地图选点和 Web 展示;Web 端 Key 与小程序 Key 分开维护', NOW(), NOW(), 0),
|
||||
(313931273555139003, 'MAP', 'AMAP_MINI_KEY', '高德小程序 Key', '', 0, '用于后续小程序端高德 SDK/API 调用;不要与 Web Key 混用', NOW(), NOW(), 0),
|
||||
(313931273555139004, 'USER', 'DEFAULT_PASSWORD', '后台新增用户默认密码', 'Fingertip@123', 1, '后台新增用户不填写密码时使用;需满足 8-32 位且至少包含数字、小写字母、大写字母、特殊符号中的 3 类', NOW(), NOW(), 0)
|
||||
(313931273555139004, 'USER', 'DEFAULT_PASSWORD', '后台新增用户默认密码', 'JayuCloud@123', 1, '后台新增用户不填写密码时使用;需满足 8-32 位且至少包含数字、小写字母、大写字母、特殊符号中的 3 类', NOW(), NOW(), 0)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
config_name = VALUES(config_name),
|
||||
remark = VALUES(remark),
|
||||
@@ -1,5 +1,5 @@
|
||||
-- 员工排班规则和例外,保留 t_artist_schedule 作为预约校验使用的具体日期排班表。
|
||||
use fingertipdesigner;
|
||||
use jayucloud;
|
||||
DROP PROCEDURE IF EXISTS sp_fd_add_index_if_not_exists;
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE sp_fd_add_index_if_not_exists(
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 管理师小程序本地接口地址配置说明
|
||||
# 店务小程序本地接口地址配置说明
|
||||
|
||||
管理师小程序的接口域名由 `FM-Wechat-Fronted/utils/config.js` 统一生成。
|
||||
店务小程序的接口域名由 `JY-Salon-WeChat/utils/config.js` 统一生成。
|
||||
|
||||
- 微信开发者工具运行时,`develop` 环境默认使用 `local`,接口地址为 `http://127.0.0.1:80/api`,管理端接口地址为 `http://127.0.0.1:80/api/admin`。
|
||||
- 真机开发版默认使用 `http://wcy111.top:18888`,避免真机把 `127.0.0.1` 识别为手机本机地址。
|
||||
- 体验版和正式版默认使用 `https://yunail.art`。
|
||||
- 如需本地临时切换到 tunnel 或远程开发地址,可复制 `FM-Wechat-Fronted/utils/config.local.example.js` 为 `FM-Wechat-Fronted/utils/config.local.js`,再调整 `developTarget` 或 `domains`。
|
||||
- 如需本地临时切换到 tunnel 或远程开发地址,可复制 `JY-Salon-WeChat/utils/config.local.example.js` 为 `JY-Salon-WeChat/utils/config.local.js`,再调整 `developTarget` 或 `domains`。
|
||||
- 已登录的非安全请求默认启用请求签名,`config.local.js` 可通过 `enableRequestSigning: false` 临时关闭本地覆盖,但不要提交关闭签名的配置。
|
||||
- `config.local.js` 属于个人本地覆盖配置,已加入 `.gitignore`,不要提交到仓库。
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
## 当前配置
|
||||
|
||||
- `FD-Core/src/main/resources/bootstrap.yaml` 和 `FD-Gateway/src/main/resources/bootstrap.yaml` 保留 `NACOS_SERVER_ADDR`、`NACOS_NAMESPACE`、`NACOS_GROUP`、`NACOS_USERNAME`、`NACOS_PASSWORD` 环境变量覆盖方式。
|
||||
- `JY-Core/src/main/resources/bootstrap.yaml` 和 `JY-Gateway/src/main/resources/bootstrap.yaml` 保留 `NACOS_SERVER_ADDR`、`NACOS_NAMESPACE`、`NACOS_GROUP`、`NACOS_USERNAME`、`NACOS_PASSWORD` 环境变量覆盖方式。
|
||||
- 未设置环境变量时,默认连接开发环境 Nacos:`192.168.5.103:8848`。
|
||||
- 未设置环境变量时,默认命名空间为开发环境:`FingertipDesigner-Dev`。
|
||||
- 未设置环境变量时,默认命名空间为开发环境:`jayu-cloud-dev`。
|
||||
- 默认分组为:`DEFAULT_GROUP`。
|
||||
|
||||
## 服务器信息依据
|
||||
@@ -15,5 +15,5 @@
|
||||
## 部署要求
|
||||
|
||||
- 开发环境可以直接使用默认值。
|
||||
- 生产环境必须显式设置 `NACOS_SERVER_ADDR` 为生产三节点集群地址,并设置 `NACOS_NAMESPACE=FingertipDesigner`。
|
||||
- 生产环境必须显式设置 `NACOS_SERVER_ADDR` 为生产三节点集群地址,并设置 `NACOS_NAMESPACE=jayu-cloud`。
|
||||
- 生产环境必须通过运行环境注入 Nacos 账号和密码,不依赖开发默认值。
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
- `192.168.5.15` 的 `9090`、`80`、`443` 端口未作为 MinIO 服务端口开放。
|
||||
- 开发 Nacos 地址按服务器信息表确认为:`192.168.5.103:8848`。
|
||||
- 本地 `bootstrap.yaml` 只保留开发 Nacos 地址与命名空间默认值,不再保留 Nacos 用户名和密码默认值;启动时必须通过环境变量注入。
|
||||
- 已使用有写权限的 Nacos 账号在开发 Nacos 创建 `FingertipDesigner-Dev` 命名空间,并发布 `core.yaml`、`gateway.yaml`、`infra.yaml`、`secret.yaml`、`logging.yaml` 五个配置。
|
||||
- 已只读核对 `FingertipDesigner-Dev`:`core.yaml` 包含三 Provider 顺序,`infra.yaml` 包含 `http://192.168.5.15:9000` 和 `fingertipdesigner` bucket,`secret.yaml` 未保留旧 `nailart` bucket、旧 MinIO endpoint 或 camelCase MinIO key。
|
||||
- 已使用有写权限的 Nacos 账号在开发 Nacos 创建 `jayu-cloud-dev` 命名空间,并发布 `core.yaml`、`gateway.yaml`、`infra.yaml`、`secret.yaml`、`logging.yaml` 五个配置。
|
||||
- 已只读核对 `jayu-cloud-dev`:`core.yaml` 包含三 Provider 顺序,`infra.yaml` 包含 `http://192.168.5.15:9000` 和 `jayucloud` bucket,`secret.yaml` 未保留旧 `nailart` bucket、旧 MinIO endpoint 或 camelCase MinIO key。
|
||||
|
||||
## 代码配置约定
|
||||
|
||||
@@ -51,9 +51,9 @@ object-storage:
|
||||
primary-provider: MINIO
|
||||
backup-provider: QINIU_KODO,ALIYUN_OSS
|
||||
signed-url-expire-minutes: 60
|
||||
backup-queue-name: fingertip-designer.file.object-storage.backup.queue
|
||||
backup-exchange-name: fingertip-designer.file.object-storage.backup.exchange
|
||||
backup-routing-key: fingertip-designer.file.object-storage.backup
|
||||
backup-queue-name: jayu-cloud.file.object-storage.backup.queue
|
||||
backup-exchange-name: jayu-cloud.file.object-storage.backup.exchange
|
||||
backup-routing-key: jayu-cloud.file.object-storage.backup
|
||||
backup-retry-batch-limit: 500
|
||||
backup-retry-cron: "0 0 2 * * ?"
|
||||
```
|
||||
@@ -64,13 +64,13 @@ object-storage:
|
||||
minio:
|
||||
enabled: true
|
||||
endpoint: http://192.168.5.15:9000
|
||||
bucket-name: fingertipdesigner
|
||||
bucket-name: jayucloud
|
||||
private-bucket: true
|
||||
signed-url-expire-minutes: 60
|
||||
|
||||
qiniu:
|
||||
kodo:
|
||||
bucket-name: fingertipdesigner
|
||||
bucket-name: jayucloud
|
||||
domain: 需要按实际七牛域名填写
|
||||
zone: z2
|
||||
private-bucket: true
|
||||
@@ -81,7 +81,7 @@ aliyun:
|
||||
enabled: true
|
||||
endpoint: 需要按实际 OSS endpoint 填写
|
||||
region: 需要按实际 region 填写
|
||||
bucket-name: fingertipdesigner
|
||||
bucket-name: jayucloud
|
||||
signed-url-expire-minutes: 60
|
||||
```
|
||||
|
||||
@@ -107,17 +107,17 @@ aliyun:
|
||||
|
||||
## 开发环境 Nacos 手工动作
|
||||
|
||||
1. 在 `192.168.5.103:8848` 创建命名空间 `FingertipDesigner-Dev`。
|
||||
2. 从现有 `FingertipDesigner` 命名空间复制 `core.yaml`、`gateway.yaml`、`infra.yaml`、`secret.yaml`、`logging.yaml`。
|
||||
1. 在 `192.168.5.103:8848` 创建命名空间 `jayu-cloud-dev`。
|
||||
2. 从现有 `jayu-cloud` 命名空间复制 `core.yaml`、`gateway.yaml`、`infra.yaml`、`secret.yaml`、`logging.yaml`。
|
||||
3. 将开发环境 MySQL、Redis、RabbitMQ 保持为开发内网地址。
|
||||
4. 将 MinIO endpoint 改为 `http://192.168.5.15:9000`。
|
||||
5. 将 MinIO bucket 改为 `fingertipdesigner`,不要复用旧 bucket。
|
||||
6. 发布后启动 Core/Gateway 验证服务注册到 `FingertipDesigner-Dev`。
|
||||
7. 启动 Core/Gateway 并完成上传冒烟验证后,再停止使用或删除开发 Nacos 上旧的 `FingertipDesigner` 命名空间配置。
|
||||
5. 将 MinIO bucket 改为 `jayucloud`,不要复用旧 bucket。
|
||||
6. 发布后启动 Core/Gateway 验证服务注册到 `jayu-cloud-dev`。
|
||||
7. 启动 Core/Gateway 并完成上传冒烟验证后,再停止使用或删除开发 Nacos 上旧的 `jayu-cloud` 命名空间配置。
|
||||
|
||||
## MinIO bucket 要求
|
||||
|
||||
- bucket 名称:`fingertipdesigner`
|
||||
- bucket 名称:`jayucloud`
|
||||
- bucket 权限:建议私有。
|
||||
- 必须确认 Core 服务使用的 MinIO access key 对该 bucket 具备上传、下载、删除和签名 URL 所需权限。
|
||||
- 本次不迁移旧 bucket 中的历史对象;历史文件会优先按已有七牛或阿里云副本读取,并由副本补偿任务尝试补齐 MinIO。
|
||||
@@ -126,7 +126,7 @@ aliyun:
|
||||
|
||||
必须执行版本变更 SQL:
|
||||
|
||||
MinIO 三副本对象存储所需表结构已经并入 `scripts/sql/init/FingertipDesigner.sql`。开发、测试和上线空库只执行该初始化 SQL。
|
||||
MinIO 三副本对象存储所需表结构已经并入 `scripts/sql/init/JayuCloud.sql`。开发、测试和上线空库只执行该初始化 SQL。
|
||||
|
||||
该脚本会新增 `t_object_storage_file_replica`,并为历史文件生成 `MINIO`、`QINIU_KODO`、`ALIYUN_OSS` 三类副本记录。已有成功副本不会被覆盖,缺失副本会进入待上传状态,由重试任务补齐。
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# 甲屿云命名迁移配置说明
|
||||
|
||||
## 命名范围
|
||||
|
||||
本次将系统总品牌统一为甲屿云 / Jayu Cloud,技术主名统一为 JayuCloud、jayu-cloud、jayu_cloud。
|
||||
|
||||
工程目录同步迁移:
|
||||
|
||||
- JY-Core:核心业务微服务。
|
||||
- JY-Gateway:网关服务。
|
||||
- JY-Artist-Frontend:设计师端 Web 前端。
|
||||
- JY-Salon-Front:店务移动端 Web 前端。
|
||||
- JY-Artist-WeChat:设计师端微信小程序。
|
||||
- JY-Salon-WeChat:店务端微信小程序。
|
||||
|
||||
## 数据库与 Nacos
|
||||
|
||||
数据库名统一为 `jayu_cloud`。Linux MySQL 环境区分大小写,Nacos 或本地 `spring.datasource.url` 必须指向 `jdbc:mysql://<host>:<port>/jayu_cloud`。
|
||||
|
||||
Nacos 命名空间默认值:
|
||||
|
||||
- 开发环境:`jayu-cloud-dev`
|
||||
- 生产环境:`jayu-cloud`
|
||||
|
||||
Core 与 Gateway 的服务名分别为 `jy-core`、`jy-gateway`。Gateway 路由中的 `lb://` 目标也同步指向这些服务名。
|
||||
|
||||
## 初始化 SQL 例外
|
||||
|
||||
仓库 0.0.1 基线规则要求初始化 SQL 冻结;本次用户明确要求库名、数据库脚本和 Nacos 配置全部纳入命名迁移,因此 `scripts/sql/init/JayuCloud.sql` 作为新的甲屿云空库初始化入口。
|
||||
|
||||
已部署环境不应直接重放初始化 SQL 覆盖旧库。生产库如需从旧库名迁移到 `jayu_cloud`,必须先完成备份,再按运维窗口执行库级迁移和应用配置切换。
|
||||
|
||||
## 发布与回滚
|
||||
|
||||
发布脚本改为 `scripts/deploy-jayu-cloud-production.ps1`。release 打包脚本会输出:
|
||||
|
||||
- `backend/JY-Core.jar`
|
||||
- `backend/JY-Gateway.jar`
|
||||
- `frontend/jy-artist-dist`
|
||||
- `frontend/dist/jy-salon-front`
|
||||
- `frontend/jy-salon-front-dist`
|
||||
- `miniprograms/JY-Artist-WeChat`
|
||||
- `miniprograms/JY-Salon-WeChat`
|
||||
- `JayuCloud.sql`
|
||||
|
||||
JY-Salon-Front 生产访问路径为 `/jy-salon-front/`。回滚 Web 版本时仍以 Web current 软链为单位,JY-Artist-Frontend 与 JY-Salon-Front 会一起回到上一个 Web 发布版本。
|
||||
@@ -1,9 +1,9 @@
|
||||
# FingertipDesigner 配置整理说明
|
||||
# 甲屿云配置整理说明
|
||||
|
||||
## 命名空间
|
||||
|
||||
- `FingertipDesigner-Dev`:开发环境配置。
|
||||
- `FingertipDesigner`:正式环境配置。
|
||||
- `jayu-cloud-dev`:开发环境配置。
|
||||
- `jayu-cloud`:正式环境配置。
|
||||
|
||||
## 配置文件
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
## 本地启动配置
|
||||
|
||||
`FD-Core` 和 `FD-Gateway` 默认读取开发环境命名空间:
|
||||
`JY-Core` 和 `JY-Gateway` 默认读取开发环境命名空间:
|
||||
|
||||
```powershell
|
||||
$env:NACOS_SERVER_ADDR='192.168.5.103:8848'
|
||||
$env:NACOS_NAMESPACE='FingertipDesigner-Dev'
|
||||
$env:NACOS_NAMESPACE='jayu-cloud-dev'
|
||||
$env:NACOS_USERNAME='xiaowang'
|
||||
$env:NACOS_PASSWORD='122503wcy....'
|
||||
```
|
||||
@@ -28,7 +28,7 @@ $env:NACOS_PASSWORD='122503wcy....'
|
||||
|
||||
```powershell
|
||||
$env:NACOS_SERVER_ADDR='192.168.5.101:8848,192.168.5.102:8848,192.168.10.145:8848'
|
||||
$env:NACOS_NAMESPACE='FingertipDesigner'
|
||||
$env:NACOS_NAMESPACE='jayu-cloud'
|
||||
```
|
||||
|
||||
如 Nacos 地址、账号、密码发生变化,通过以下环境变量覆盖:
|
||||
@@ -1,19 +0,0 @@
|
||||
# 统一数据库名为 FingertipDesigner 配置说明
|
||||
|
||||
## 变更内容
|
||||
|
||||
- 后端默认 JDBC 地址统一指向 `FingertipDesigner`。
|
||||
- 初始化 SQL 的数据库创建语句和 `USE` 语句统一使用 `FingertipDesigner`。
|
||||
- 测试说明文档中的数据库名前缀同步为 `FingertipDesigner`。
|
||||
|
||||
## 配置要求
|
||||
|
||||
- Nacos 或本地 `spring.datasource.url` 必须指向 `jdbc:mysql://<host>:<port>/FingertipDesigner`。
|
||||
- Core 与 Gateway 默认 Nacos 命名空间为 `FingertipDesigner`,如需连接其他环境必须显式设置 `NACOS_NAMESPACE`。
|
||||
- MySQL 中必须存在 `FingertipDesigner` 数据库;首次部署可执行 `scripts/sql/init/FingertipDesigner.sql`。
|
||||
- 开发、测试和上线空库只执行 `scripts/sql/init/FingertipDesigner.sql`;已部署生产库如需调整库名,需要单独制定生产迁移方案。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 本次变更不迁移旧库数据。
|
||||
- 如旧环境存在历史数据库,需先确认数据不再使用后再手工清理。
|
||||
@@ -0,0 +1,19 @@
|
||||
# 统一数据库名为甲屿云配置说明
|
||||
|
||||
## 变更内容
|
||||
|
||||
- 后端默认 JDBC 地址统一指向 `jayu_cloud`。
|
||||
- 初始化 SQL 的数据库创建语句和 `USE` 语句统一使用 `jayu_cloud`。
|
||||
- 测试说明文档中的数据库名前缀同步为 `jayu_cloud`。
|
||||
|
||||
## 配置要求
|
||||
|
||||
- Nacos 或本地 `spring.datasource.url` 必须指向 `jdbc:mysql://<host>:<port>/jayu_cloud`。
|
||||
- Core 与 Gateway 默认 Nacos 命名空间为 `jayu-cloud`,如需连接其他环境必须显式设置 `NACOS_NAMESPACE`。
|
||||
- MySQL 中必须存在 `jayu_cloud` 数据库;首次部署可执行 `scripts/sql/init/JayuCloud.sql`。
|
||||
- 开发、测试和上线空库只执行 `scripts/sql/init/JayuCloud.sql`;已部署生产库如需调整库名,需要单独制定生产迁移方案。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 本次变更不迁移旧库数据。
|
||||
- 如旧环境存在历史数据库,需先确认数据不再使用后再手工清理。
|
||||
Reference in New Issue
Block a user