完成JC-ArtList与JC-Salon端侧清理和统一命名

This commit is contained in:
2026-08-25 16:21:05 +08:00
parent aa93695704
commit abce4a2787
1839 changed files with 653 additions and 50415 deletions
@@ -8,11 +8,11 @@
纳入本次基线的运行入口:
- `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` 管理师小程序基线。
- `JC-ArtList-Core`:`pom.xml` 版本为 `0.0.1`。
- `JC-ArtList-Gateway`:`pom.xml` 版本为 `0.0.1`。
- `JC-ArtList-Frontend`:`package.json` 和 `package-lock.json` 版本为 `0.0.1`。
- `JC-ArtList-WeChat`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 用户端小程序基线。
- `JC-Salon-WeChat`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 管理师小程序基线。
- `scripts/sql/init/FingertipDesigner.sql`:作为 `0.0.1` 空库初始化 SQL 基线。
- `scripts/sql/migrations/`:作为 `0.0.1` 后续数据库版本变更脚本目录。
@@ -15,7 +15,7 @@
## 本地启动配置
`FD-Core` 和 `FD-Gateway` 默认读取开发环境命名空间:
`JC-ArtList-Core` 和 `JC-ArtList-Gateway` 默认读取开发环境命名空间:
```powershell
$env:NACOS_SERVER_ADDR='192.168.5.103:8848'
@@ -1,4 +1,4 @@
param(
param(
[string]$RepoRoot = (Split-Path -Parent $PSScriptRoot),
[string]$ServerInfoPath = "",
[switch]$DryRun,
@@ -14,15 +14,15 @@
[string]$DatabaseUser = "",
[string]$DatabasePassword = "",
[string]$InitSqlPath = "",
[string]$CorePattern = "^FD-Core",
[string]$GatewayPattern = "^FD-Gateway",
[string]$CorePattern = "^JC-ArtList-Core",
[string]$GatewayPattern = "^JC-ArtList-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/jc-artlist-core",
[string]$GatewayRemoteAppDir = "/opt/jc-artlist-gateway",
[string]$WebRemoteDir = "/opt/jc-artlist-frontend",
[string]$CoreServiceName = "jc-artlist-core",
[string]$GatewayServiceName = "jc-artlist-gateway",
[int]$CoreHealthPort = 81,
[int]$GatewayHealthPort = 80,
[string]$HealthPath = "/health/check",
@@ -483,32 +483,32 @@ function Build-ReleasePackage {
$mavenArgs += "-DskipTests"
}
Write-Step "构建 FD-Core"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FD-Core")
Write-Step "构建 JC-ArtList-Core"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JC-ArtList-Core")
Write-Step "构建 FD-Gateway"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FD-Gateway")
Write-Step "构建 JC-ArtList-Gateway"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JC-ArtList-Gateway")
Write-Step "构建 FD-Frontend"
$frontendRoot = Join-Path $resolvedRepoRoot "FD-Frontend"
Write-Step "构建 JC-ArtList-Frontend"
$frontendRoot = Join-Path $resolvedRepoRoot "JC-ArtList-Frontend"
if (-not (Test-Path -LiteralPath (Join-Path $frontendRoot "node_modules"))) {
Invoke-Native "npm" @("ci") $frontendRoot
}
Invoke-Native "npm" @("run", "build") $frontendRoot
}
$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"
$coreJar = Join-Path $resolvedRepoRoot "JC-ArtList-Core\target\JC-ArtList-Core.jar"
$gatewayJar = Join-Path $resolvedRepoRoot "JC-ArtList-Gateway\target\JC-ArtList-Gateway.jar"
$frontendDist = Join-Path $resolvedRepoRoot "JC-ArtList-Frontend\dist"
foreach ($requiredPath in @($coreJar, $gatewayJar, $frontendDist, $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"
$coreArtifact = Join-Path $backendDir "JC-ArtList-Core.jar"
$gatewayArtifact = Join-Path $backendDir "JC-ArtList-Gateway.jar"
$frontendArtifact = Join-Path $frontendDir "jc-artlist-frontend-dist.tar.gz"
$sqlArtifact = Join-Path $sqlDir "FingertipDesigner.sql"
Copy-Item -LiteralPath $coreJar -Destination $coreArtifact -Force
Copy-Item -LiteralPath $gatewayJar -Destination $gatewayArtifact -Force
@@ -521,7 +521,7 @@ function Build-ReleasePackage {
if (Test-Path -LiteralPath $frontendArtifact) {
Remove-Item -LiteralPath $frontendArtifact -Force
}
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "FD-Frontend"), "dist")
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "JC-ArtList-Frontend"), "dist")
$hashes = foreach ($artifact in @($coreArtifact, $gatewayArtifact, $frontendArtifact, $sqlArtifact)) {
$hash = Get-FileHash -LiteralPath $artifact -Algorithm SHA256
@@ -656,7 +656,7 @@ echo "Web current -> `$TARGET"
function Publish-Web {
param([object]$Server, [string]$ArchivePath)
$archiveName = "fingertip-designer-frontend-dist-$releaseTimestamp.tar.gz"
$archiveName = "jc-artlist-frontend-dist-$releaseTimestamp.tar.gz"
$quotedWebRemoteDir = ConvertTo-BashSingleQuoted $WebRemoteDir
Write-Step "准备 Web 目标机器"
Invoke-RemoteShell $Server "mkdir -p $quotedWebRemoteDir/releases"
+21 -21
View File
@@ -14,15 +14,15 @@ param(
[string]$DatabaseUser = "",
[string]$DatabasePassword = "",
[string]$InitSqlPath = "",
[string]$CorePattern = "^FM-Core",
[string]$GatewayPattern = "^FM-Gateway",
[string]$CorePattern = "^JC-Salon-Core",
[string]$GatewayPattern = "^JC-Salon-Gateway",
[string]$WebTargetName = "",
[string]$WebTargetHost = "8.137.35.61",
[string]$CoreRemoteAppDir = "/opt/jayucloud-salon-core",
[string]$GatewayRemoteAppDir = "/opt/jayucloud-salon-gateway",
[string]$WebRemoteDir = "/opt/jayucloud-salon-frontend",
[string]$CoreServiceName = "jayucloud-salon-core",
[string]$GatewayServiceName = "jayucloud-salon-gateway",
[string]$CoreRemoteAppDir = "/opt/jc-salon-core",
[string]$GatewayRemoteAppDir = "/opt/jc-salon-gateway",
[string]$WebRemoteDir = "/opt/jc-salon-frontend",
[string]$CoreServiceName = "jc-salon-core",
[string]$GatewayServiceName = "jc-salon-gateway",
[int]$CoreHealthPort = 81,
[int]$GatewayHealthPort = 80,
[string]$HealthPath = "/health/check",
@@ -483,32 +483,32 @@ function Build-ReleasePackage {
$mavenArgs += "-DskipTests"
}
Write-Step "构建 FM-Core"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FM-Core")
Write-Step "构建 JC-Salon-Core"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JC-Salon-Core")
Write-Step "构建 FM-Gateway"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FM-Gateway")
Write-Step "构建 JC-Salon-Gateway"
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JC-Salon-Gateway")
Write-Step "构建 FM-Frontend"
$frontendRoot = Join-Path $resolvedRepoRoot "FM-Frontend"
Write-Step "构建 JC-Salon-Frontend"
$frontendRoot = Join-Path $resolvedRepoRoot "JC-Salon-Frontend"
if (-not (Test-Path -LiteralPath (Join-Path $frontendRoot "node_modules"))) {
Invoke-Native "npm" @("ci") $frontendRoot
}
Invoke-Native "npm" @("run", "build") $frontendRoot
}
$coreJar = Join-Path $resolvedRepoRoot "FM-Core\target\JayuCloud-Salon-Core.jar"
$gatewayJar = Join-Path $resolvedRepoRoot "FM-Gateway\target\JayuCloud-Salon-Gateway.jar"
$frontendDist = Join-Path $resolvedRepoRoot "FM-Frontend\dist"
$coreJar = Join-Path $resolvedRepoRoot "JC-Salon-Core\target\JC-Salon-Core.jar"
$gatewayJar = Join-Path $resolvedRepoRoot "JC-Salon-Gateway\target\JC-Salon-Gateway.jar"
$frontendDist = Join-Path $resolvedRepoRoot "JC-Salon-Frontend\dist"
foreach ($requiredPath in @($coreJar, $gatewayJar, $frontendDist, $InitSqlPath)) {
if (-not (Test-Path -LiteralPath $requiredPath)) {
throw "缺少发布产物:$requiredPath"
}
}
$coreArtifact = Join-Path $backendDir "JayuCloud-Salon-Core.jar"
$gatewayArtifact = Join-Path $backendDir "JayuCloud-Salon-Gateway.jar"
$frontendArtifact = Join-Path $frontendDir "jayucloud-salon-frontend-dist.tar.gz"
$coreArtifact = Join-Path $backendDir "JC-Salon-Core.jar"
$gatewayArtifact = Join-Path $backendDir "JC-Salon-Gateway.jar"
$frontendArtifact = Join-Path $frontendDir "jc-salon-frontend-dist.tar.gz"
$sqlArtifact = Join-Path $sqlDir "店务独立数据库_20260825.sql"
Copy-Item -LiteralPath $coreJar -Destination $coreArtifact -Force
Copy-Item -LiteralPath $gatewayJar -Destination $gatewayArtifact -Force
@@ -521,7 +521,7 @@ function Build-ReleasePackage {
if (Test-Path -LiteralPath $frontendArtifact) {
Remove-Item -LiteralPath $frontendArtifact -Force
}
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "FM-Frontend"), "dist")
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "JC-Salon-Frontend"), "dist")
$hashes = foreach ($artifact in @($coreArtifact, $gatewayArtifact, $frontendArtifact, $sqlArtifact)) {
$hash = Get-FileHash -LiteralPath $artifact -Algorithm SHA256
@@ -656,7 +656,7 @@ echo "Web current -> `$TARGET"
function Publish-Web {
param([object]$Server, [string]$ArchivePath)
$archiveName = "jayucloud-salon-frontend-dist-$releaseTimestamp.tar.gz"
$archiveName = "jc-salon-frontend-dist-$releaseTimestamp.tar.gz"
$quotedWebRemoteDir = ConvertTo-BashSingleQuoted $WebRemoteDir
Write-Step "准备 Web 目标机器"
Invoke-RemoteShell $Server "mkdir -p $quotedWebRemoteDir/releases"
+17 -17
View File
@@ -1,4 +1,4 @@
param(
param(
[switch]$SkipTests,
[string]$MavenPath = ""
)
@@ -97,38 +97,38 @@ if ($SkipTests) {
$mavenArgs += "-DskipTests"
}
Write-Step "构建 FD-Core"
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "FD-Core")
Write-Step "构建 JC-ArtList-Core"
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "JC-ArtList-Core")
Write-Step "构建 FD-Gateway"
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "FD-Gateway")
Write-Step "构建 JC-ArtList-Gateway"
Invoke-Native $maven $mavenArgs (Join-Path $repoRoot "JC-ArtList-Gateway")
Write-Step "构建 FD-Frontend"
$frontendRoot = Join-Path $repoRoot "FD-Frontend"
Write-Step "构建 JC-ArtList-Frontend"
$frontendRoot = Join-Path $repoRoot "JC-ArtList-Frontend"
if (-not (Test-Path -LiteralPath (Join-Path $frontendRoot "node_modules"))) {
Invoke-Native "npm" @("ci") $frontendRoot
}
Invoke-Native "npm" @("run", "build") $frontendRoot
$coreJar = Join-Path $repoRoot "FD-Core\target\FingertipDesigner-Core.jar"
$gatewayJar = Join-Path $repoRoot "FD-Gateway\target\FingertipDesigner-Gateway.jar"
$coreJar = Join-Path $repoRoot "JC-ArtList-Core\target\JC-ArtList-Core.jar"
$gatewayJar = Join-Path $repoRoot "JC-ArtList-Gateway\target\JC-ArtList-Gateway.jar"
$frontendDist = Join-Path $frontendRoot "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 "JC-ArtList-Core.jar")
Copy-RequiredFile $gatewayJar (Join-Path $backendDir "JC-ArtList-Gateway.jar")
Copy-Directory $frontendDist (Join-Path $frontendDir "dist")
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-Directory (Join-Path $repoRoot "JC-ArtList-WeChat") (Join-Path $miniProgramDir "JC-ArtList-WeChat")
Copy-Directory (Join-Path $repoRoot "JC-Salon-WeChat") (Join-Path $miniProgramDir "JC-Salon-WeChat")
Copy-RequiredFile $sqlPath (Join-Path $releaseDir "FingertipDesigner.sql")
$manifest = @(
"# FingertipDesigner Release $timestamp",
"",
"- backend/FingertipDesigner-Core.jar",
"- backend/FingertipDesigner-Gateway.jar",
"- backend/JC-ArtList-Core.jar",
"- backend/JC-ArtList-Gateway.jar",
"- frontend/dist",
"- miniprograms/FD-WeChat-Fronted",
"- miniprograms/FM-Wechat-Fronted",
"- miniprograms/JC-ArtList-WeChat",
"- miniprograms/JC-Salon-WeChat",
"- FingertipDesigner.sql",
"",
"Nacos namespace: FingertipDesigner",
@@ -0,0 +1,14 @@
-- 店务端职责裁剪:移除设计师用户侧购物车、收藏、会员和商品互动结构。
-- 执行前必须完成 jayucloud_salon 数据库备份,并在维护窗口执行。
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS t_wishlist;
DROP TABLE IF EXISTS t_wishlist_group;
DROP TABLE IF EXISTS t_product_like;
DROP TABLE IF EXISTS t_cart;
DROP TABLE IF EXISTS t_vip_info;
DROP TABLE IF EXISTS t_vip_benefit;
DROP TABLE IF EXISTS t_user_growth_record;
DROP TABLE IF EXISTS t_user_coupon;
DROP TABLE IF EXISTS t_coupon_tag;
DROP TABLE IF EXISTS t_coupon;
SET FOREIGN_KEY_CHECKS = 1;
@@ -0,0 +1,13 @@
-- 设计师端职责裁剪:移除仅店务管理使用的库存、营销活动和权限审计结构。
-- 执行前必须完成 jayucloud_artlist 数据库备份,并在维护窗口执行。
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS t_inventory_record;
DROP TABLE IF EXISTS t_inventory_item;
DROP TABLE IF EXISTS t_campaign;
DROP TABLE IF EXISTS t_security_audit_log;
DROP TABLE IF EXISTS t_user_shop_role;
DROP TABLE IF EXISTS t_shop_role_permission;
DROP TABLE IF EXISTS t_shop_role;
DROP TABLE IF EXISTS t_user_permission;
DROP TABLE IF EXISTS t_permission;
SET FOREIGN_KEY_CHECKS = 1;
@@ -8,10 +8,10 @@
| 端侧 | 后端目录 | 前端目录 | Nacos namespace | 数据库 |
| --- | --- | --- | --- | --- |
| 设计师端 | `FD-Core`、`FD-Gateway` | `FD-Frontend`、`FD-WeChat-Fronted` | `jayucloud-artlist` | `jayucloud_artlist` |
| 店务端 | `FM-Core`、`FM-Gateway` | `FM-Frontend`、`FM-Wechat-Fronted` | `jayucloud-salon` | `jayucloud_salon` |
| 设计师端 | `JC-ArtList-Core`、`JC-ArtList-Gateway` | `JC-ArtList-Frontend`、`JC-ArtList-WeChat` | `jayucloud-artlist` | `jayucloud_artlist` |
| 店务端 | `JC-Salon-Core`、`JC-Salon-Gateway` | `JC-Salon-Frontend`、`JC-Salon-WeChat` | `jayucloud-salon` | `jayucloud_salon` |
店务端可只启动 `FM-Core` 和 `FM-Gateway`,不依赖设计师端进程或数据库。
店务端可只启动 `JC-Salon-Core` 和 `JC-Salon-Gateway`,不依赖设计师端进程或数据库。
## Nacos 配置源
@@ -37,8 +37,8 @@
## 发布前验证
1. 分别构建 `FD-Core/FD-Gateway/FD-Frontend` 和 `FM-Core/FM-Gateway/FM-Frontend`。
2. 只启动店务 Core/Gateway,确认服务注册为 `jayucloud-salon-core` 和 `jayucloud-salon-gateway`。
1. 分别构建 `JC-ArtList-Core/JC-ArtList-Gateway/JC-ArtList-Frontend` 和 `JC-Salon-Core/JC-Salon-Gateway/JC-Salon-Frontend`。
2. 只启动店务 Core/Gateway,确认服务注册为 `jc-salon-core` 和 `jc-salon-gateway`。
3. 确认店务 datasource 指向 `jayucloud_salon`,设计师 datasource 指向 `jayucloud_artlist`。
4. 发布 Nacos 配置后,从两个节点读取相同 Data ID 并校验摘要一致。
5. 完成店务 Web、小程序登录、员工、客户、排班、规划、预约、订单和设置冒烟验证后,再进行后端裁剪。
@@ -2,7 +2,7 @@
## 当前配置
- `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` 环境变量覆盖方式。
- `JC-ArtList-Core/src/main/resources/bootstrap.yaml` 和 `JC-ArtList-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`。
- 默认分组为:`DEFAULT_GROUP`。
@@ -1,10 +1,10 @@
# 管理师小程序本地接口地址配置说明
管理师小程序的接口域名由 `FM-Wechat-Fronted/utils/config.js` 统一生成。
管理师小程序的接口域名由 `JC-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 或远程开发地址,可复制 `JC-Salon-WeChat/utils/config.local.example.js` 为 `JC-Salon-WeChat/utils/config.local.js`,再调整 `developTarget` 或 `domains`。
- 已登录的非安全请求默认启用请求签名,`config.local.js` 可通过 `enableRequestSigning: false` 临时关闭本地覆盖,但不要提交关闭签名的配置。
- `config.local.js` 属于个人本地覆盖配置,已加入 `.gitignore`,不要提交到仓库。