Sit #18
@@ -1,6 +1,10 @@
|
||||
name: 发布 Nacos 配置
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- sit
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
@@ -28,7 +32,7 @@ jobs:
|
||||
node-version: 20
|
||||
- name: 发布并校验配置
|
||||
env:
|
||||
NACOS_ENVIRONMENT: ${{ inputs.environment }}
|
||||
NACOS_ENVIRONMENT: ${{ inputs.environment || github.ref_name }}
|
||||
NACOS_PROD_URLS: ${{ secrets.NACOS_PROD_URLS }}
|
||||
NACOS_PROD_USERNAME: ${{ secrets.NACOS_PROD_USERNAME }}
|
||||
NACOS_PROD_PASSWORD: ${{ secrets.NACOS_PROD_PASSWORD }}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
name: Salon 生产发布
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
prepare_run_id:
|
||||
description: 自动准备工作流的运行 ID
|
||||
required: true
|
||||
type: string
|
||||
release_sha:
|
||||
description: prod 合并提交 SHA
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: jayucloud
|
||||
env:
|
||||
WEB_TARGET_HOST: ${{ secrets.SALON_PROD_WEB_HOST }}
|
||||
WEB_TARGET_PORT: ${{ secrets.SALON_PROD_WEB_PORT }}
|
||||
WEB_TARGET_USER: ${{ secrets.SALON_PROD_WEB_USER }}
|
||||
WEB_REMOTE_DIR: ${{ secrets.SALON_PROD_WEB_DIR }}
|
||||
steps:
|
||||
- name: 检出发布脚本
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.release_sha }}
|
||||
- name: 准备 Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
- name: 发布并校验 Salon 生产 Nacos
|
||||
shell: bash
|
||||
env:
|
||||
NACOS_ENVIRONMENT: prod-both
|
||||
NACOS_PROD_URLS: ${{ secrets.NACOS_PROD_URLS }}
|
||||
NACOS_PROD_USERNAME: ${{ secrets.NACOS_PROD_USERNAME }}
|
||||
NACOS_PROD_PASSWORD: ${{ secrets.NACOS_PROD_PASSWORD }}
|
||||
NACOS_DR_URLS: ${{ secrets.NACOS_DR_URLS }}
|
||||
NACOS_DR_USERNAME: ${{ secrets.NACOS_DR_USERNAME }}
|
||||
NACOS_DR_PASSWORD: ${{ secrets.NACOS_DR_PASSWORD }}
|
||||
run: node .gitea/scripts/publish-nacos.mjs
|
||||
- name: 下载已审核发布包
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: salon-prod-${{ inputs.release_sha }}
|
||||
path: artifacts/release
|
||||
repository: ${{ github.repository }}
|
||||
run-id: ${{ inputs.prepare_run_id }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: 写入临时 SSH 配置和目标清单
|
||||
shell: bash
|
||||
env:
|
||||
SALON_PROD_SSH_PRIVATE_KEY: ${{ secrets.SALON_PROD_SSH_PRIVATE_KEY }}
|
||||
SALON_PROD_KNOWN_HOSTS: ${{ secrets.SALON_PROD_KNOWN_HOSTS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$SALON_PROD_SSH_PRIVATE_KEY"
|
||||
test -n "$SALON_PROD_KNOWN_HOSTS"
|
||||
test -n "$WEB_TARGET_HOST"
|
||||
test -n "$WEB_TARGET_PORT"
|
||||
test -n "$WEB_TARGET_USER"
|
||||
test -n "$WEB_REMOTE_DIR"
|
||||
mkdir -p "$RUNNER_TEMP/salon-prod"
|
||||
printf '%s\n' "$SALON_PROD_SSH_PRIVATE_KEY" > "$RUNNER_TEMP/salon-prod/id_ed25519"
|
||||
printf '%s\n' "$SALON_PROD_KNOWN_HOSTS" > "$RUNNER_TEMP/salon-prod/known_hosts"
|
||||
chmod 600 "$RUNNER_TEMP/salon-prod/id_ed25519" "$RUNNER_TEMP/salon-prod/known_hosts"
|
||||
cat > "$RUNNER_TEMP/salon-prod/servers.json" <<JSON
|
||||
[
|
||||
{"Name":"core01-01","Host":"192.168.10.24","Port":22,"User":"root","Purpose":"Salon Core","Environment":"prod"},
|
||||
{"Name":"core01-02","Host":"192.168.10.25","Port":22,"User":"root","Purpose":"Salon Core","Environment":"prod"},
|
||||
{"Name":"core01-03","Host":"192.168.20.16","Port":22,"User":"root","Purpose":"Salon Core","Environment":"prod"},
|
||||
{"Name":"gateway01-01","Host":"192.168.10.26","Port":22,"User":"root","Purpose":"Salon Gateway","Environment":"prod"},
|
||||
{"Name":"gateway01-02","Host":"192.168.10.27","Port":22,"User":"root","Purpose":"Salon Gateway","Environment":"prod"},
|
||||
{"Name":"gateway01-03","Host":"192.168.20.18","Port":22,"User":"root","Purpose":"Salon Gateway","Environment":"prod"},
|
||||
{"Name":"salon-web","Host":"${WEB_TARGET_HOST}","Port":${WEB_TARGET_PORT},"User":"${WEB_TARGET_USER}","Purpose":"Salon NGINX","Environment":"prod"}
|
||||
]
|
||||
JSON
|
||||
- name: 人工确认后执行生产发布
|
||||
shell: pwsh
|
||||
env:
|
||||
SSH_KEY_PATH: ${{ runner.temp }}/salon-prod/id_ed25519
|
||||
KNOWN_HOSTS_PATH: ${{ runner.temp }}/salon-prod/known_hosts
|
||||
SERVER_INFO_JSON: ${{ runner.temp }}/salon-prod/servers.json
|
||||
run: >-
|
||||
./docs/scripts/deploy-jayucloud-salon-production.ps1
|
||||
-Deploy
|
||||
-SkipDatabaseInit
|
||||
-RequireSystemd
|
||||
-PackageDirectory "artifacts/release"
|
||||
-ServerInfoJsonPath "$env:SERVER_INFO_JSON"
|
||||
-SshKeyPath "$env:SSH_KEY_PATH"
|
||||
-KnownHostsPath "$env:KNOWN_HOSTS_PATH"
|
||||
-WebTargetName salon-web
|
||||
-WebRemoteDir "$env:WEB_REMOTE_DIR"
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Salon 生产发布准备
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
if: >-
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.base.ref == 'prod' &&
|
||||
github.event.pull_request.head.ref == 'sit'
|
||||
runs-on: jayucloud
|
||||
steps:
|
||||
- name: 检出合并提交
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
||||
fetch-depth: 0
|
||||
- name: 准备 Java 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
cache: maven
|
||||
- name: 准备 Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: npm
|
||||
cache-dependency-path: JC-Salon-Frontend/package-lock.json
|
||||
- name: 构建 Salon 发布包
|
||||
shell: pwsh
|
||||
run: >-
|
||||
./docs/scripts/deploy-jayucloud-salon-production.ps1
|
||||
-PackageOnly
|
||||
-SkipDatabaseInit
|
||||
- name: 上传发布包
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: salon-prod-${{ github.event.pull_request.merge_commit_sha }}
|
||||
path: artifacts/release/*
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- gitnexus:start -->
|
||||
# GitNexus — Code Intelligence
|
||||
|
||||
This project is indexed by GitNexus as **FingertipDesigner** (15270 symbols, 32958 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
|
||||
This project is indexed by GitNexus as **JayuCloud** (22596 symbols, 47343 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
|
||||
|
||||
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
|
||||
|
||||
@@ -24,10 +24,10 @@ This project is indexed by GitNexus as **FingertipDesigner** (15270 symbols, 329
|
||||
|
||||
| Resource | Use for |
|
||||
|----------|---------|
|
||||
| `gitnexus://repo/FingertipDesigner/context` | Codebase overview, check index freshness |
|
||||
| `gitnexus://repo/FingertipDesigner/clusters` | All functional areas |
|
||||
| `gitnexus://repo/FingertipDesigner/processes` | All execution flows |
|
||||
| `gitnexus://repo/FingertipDesigner/process/{name}` | Step-by-step execution trace |
|
||||
| `gitnexus://repo/JayuCloud/context` | Codebase overview, check index freshness |
|
||||
| `gitnexus://repo/JayuCloud/clusters` | All functional areas |
|
||||
| `gitnexus://repo/JayuCloud/processes` | All execution flows |
|
||||
| `gitnexus://repo/JayuCloud/process/{name}` | Step-by-step execution trace |
|
||||
|
||||
## CLI
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- gitnexus:start -->
|
||||
# GitNexus — Code Intelligence
|
||||
|
||||
This project is indexed by GitNexus as **FingertipDesigner** (15270 symbols, 32958 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
|
||||
This project is indexed by GitNexus as **JayuCloud** (22596 symbols, 47343 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
|
||||
|
||||
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
|
||||
|
||||
@@ -24,10 +24,10 @@ This project is indexed by GitNexus as **FingertipDesigner** (15270 symbols, 329
|
||||
|
||||
| Resource | Use for |
|
||||
|----------|---------|
|
||||
| `gitnexus://repo/FingertipDesigner/context` | Codebase overview, check index freshness |
|
||||
| `gitnexus://repo/FingertipDesigner/clusters` | All functional areas |
|
||||
| `gitnexus://repo/FingertipDesigner/processes` | All execution flows |
|
||||
| `gitnexus://repo/FingertipDesigner/process/{name}` | Step-by-step execution trace |
|
||||
| `gitnexus://repo/JayuCloud/context` | Codebase overview, check index freshness |
|
||||
| `gitnexus://repo/JayuCloud/clusters` | All functional areas |
|
||||
| `gitnexus://repo/JayuCloud/processes` | All execution flows |
|
||||
| `gitnexus://repo/JayuCloud/process/{name}` | Step-by-step execution trace |
|
||||
|
||||
## CLI
|
||||
|
||||
|
||||
+16
-16
@@ -20,22 +20,22 @@ import org.springframework.context.annotation.Configuration;
|
||||
*/
|
||||
@Configuration
|
||||
@MapperScan({
|
||||
"com.xiaowang.fingertipdesigner.core.modules.artist.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.auth.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.content.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.file.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.integration.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.inventory.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.marketing.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.message.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.order.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.payment.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.planning.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.product.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.security.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.shop.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.system.mapper",
|
||||
"com.xiaowang.fingertipdesigner.core.modules.user.mapper"
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.artist.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.auth.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.content.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.file.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.integration.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.inventory.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.marketing.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.message.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.order.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.payment.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.planning.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.product.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.security.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.shop.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.system.mapper",
|
||||
"com.xiaowang.jacyucloudsalon.core.modules.user.mapper"
|
||||
})
|
||||
public class MyBatisPlusConfig {
|
||||
|
||||
|
||||
-17
@@ -3,23 +3,6 @@ package com.xiaowang.jacyucloudsalon.core.modules.user.controller.front;
|
||||
import com.xiaowang.jacyucloudsalon.core.annotation.RequirePermission;
|
||||
import com.xiaowang.jacyucloudsalon.core.annotation.OperationGuard;
|
||||
import com.xiaowang.jacyucloudsalon.core.common.Result;
|
||||
import com.xiaowang.fingertipdesigner.core.common.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.artist.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.auth.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.content.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.file.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.integration.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.inventory.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.marketing.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.message.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.order.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.payment.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.planning.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.product.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.security.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.shop.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.system.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.user.dto.*;
|
||||
import com.xiaowang.jacyucloudsalon.core.modules.user.entity.UserDO;
|
||||
import com.xiaowang.jacyucloudsalon.core.modules.user.mapper.UserMapper;
|
||||
import com.xiaowang.jacyucloudsalon.core.modules.file.service.ChunkUploadService;
|
||||
|
||||
-17
@@ -6,23 +6,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xiaowang.jacyucloudsalon.core.config.BrandProperties;
|
||||
import com.xiaowang.fingertipdesigner.core.common.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.artist.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.auth.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.content.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.file.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.integration.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.inventory.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.marketing.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.message.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.order.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.payment.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.planning.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.product.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.security.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.shop.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.system.dto.*;
|
||||
import com.xiaowang.fingertipdesigner.core.modules.user.dto.*;
|
||||
import com.xiaowang.jacyucloudsalon.core.modules.artist.dto.NailArtistInfoDTO;
|
||||
import com.xiaowang.jacyucloudsalon.core.modules.user.entity.UserDO;
|
||||
import com.xiaowang.jacyucloudsalon.core.modules.security.entity.UserPermissionDO;
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/jayucloud_salon?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 5MB
|
||||
max-request-size: 10MB
|
||||
jackson:
|
||||
time-zone: Asia/Shanghai
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
|
||||
logging:
|
||||
pattern:
|
||||
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
||||
|
||||
server:
|
||||
servlet:
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
force: true
|
||||
enabled: true
|
||||
timezone: Asia/Shanghai
|
||||
|
||||
mybatis:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
|
||||
fingertip-designer:
|
||||
brand:
|
||||
message-template-name: ${PLATFORM_MESSAGE_TEMPLATE_NAME:FingertipDesigner}
|
||||
manager-register-shop-description: ${PLATFORM_MANAGER_REGISTER_SHOP_DESCRIPTION:甲屿店务注册店铺}
|
||||
security:
|
||||
jwt:
|
||||
issuer: fingertip-designer
|
||||
access-token-expiration-seconds: 7200
|
||||
remember-me-access-token-expiration-seconds: 604800
|
||||
refresh-token-expiration-seconds: 604800
|
||||
clock-skew-seconds: 30
|
||||
signature:
|
||||
enabled: true
|
||||
window-seconds: 300
|
||||
nonce-retention-seconds: 600
|
||||
rate-limit:
|
||||
login:
|
||||
limit: 10
|
||||
window-seconds: 60
|
||||
send-code:
|
||||
limit: 5
|
||||
window-seconds: 60
|
||||
reset-password:
|
||||
limit: 5
|
||||
window-seconds: 600
|
||||
authenticated-write:
|
||||
limit: 80
|
||||
window-seconds: 60
|
||||
order-create:
|
||||
limit: 10
|
||||
window-seconds: 60
|
||||
cache:
|
||||
local-max-size: 2048
|
||||
product-detail:
|
||||
local-ttl-seconds: 120
|
||||
redis-ttl-seconds: 900
|
||||
product-list:
|
||||
local-ttl-seconds: 60
|
||||
redis-ttl-seconds: 300
|
||||
product-search:
|
||||
local-ttl-seconds: 60
|
||||
redis-ttl-seconds: 300
|
||||
shop:
|
||||
local-ttl-seconds: 180
|
||||
redis-ttl-seconds: 900
|
||||
tag:
|
||||
local-ttl-seconds: 300
|
||||
redis-ttl-seconds: 1200
|
||||
object-storage-file:
|
||||
local-ttl-seconds: 300
|
||||
redis-ttl-seconds: 1800
|
||||
dashboard:
|
||||
local-ttl-seconds: 30
|
||||
redis-ttl-seconds: 90
|
||||
slow-request:
|
||||
enabled: true
|
||||
threshold-ms: 300
|
||||
log-response-header-request-id: true
|
||||
http-client:
|
||||
connect-timeout-ms: 3000
|
||||
read-timeout-ms: 5000
|
||||
connection-request-timeout-ms: 1000
|
||||
max-total-connections: 200
|
||||
max-connections-per-route: 50
|
||||
|
||||
object-storage:
|
||||
provider-order:
|
||||
- MINIO
|
||||
- QINIU_KODO
|
||||
- ALIYUN_OSS
|
||||
replica-required-providers:
|
||||
- MINIO
|
||||
- QINIU_KODO
|
||||
- ALIYUN_OSS
|
||||
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-retry-batch-limit: 500
|
||||
backup-retry-cron: "0 0 2 * * ?"
|
||||
|
||||
qiniu:
|
||||
kodo:
|
||||
access-key: ${QINIU_KODO_ACCESS_KEY:}
|
||||
secret-key: ${QINIU_KODO_SECRET_KEY:}
|
||||
bucket-name: ${QINIU_KODO_BUCKET_NAME:}
|
||||
domain: ${QINIU_KODO_DOMAIN:}
|
||||
zone: ${QINIU_KODO_ZONE:z2}
|
||||
private-bucket: ${QINIU_KODO_PRIVATE_BUCKET:true}
|
||||
signed-url-expire-minutes: ${QINIU_KODO_SIGNED_URL_EXPIRE_MINUTES:60}
|
||||
|
||||
minio:
|
||||
enabled: ${MINIO_ENABLED:false}
|
||||
endpoint: ${MINIO_ENDPOINT:}
|
||||
bucket-name: ${MINIO_BUCKET_NAME:}
|
||||
access-key: ${MINIO_ACCESS_KEY:}
|
||||
secret-key: ${MINIO_SECRET_KEY:}
|
||||
private-bucket: ${MINIO_PRIVATE_BUCKET:true}
|
||||
signed-url-expire-minutes: ${MINIO_SIGNED_URL_EXPIRE_MINUTES:60}
|
||||
|
||||
aliyun:
|
||||
oss:
|
||||
enabled: ${ALIYUN_OSS_ENABLED:false}
|
||||
endpoint: ${ALIYUN_OSS_ENDPOINT:}
|
||||
region: ${ALIYUN_OSS_REGION:}
|
||||
bucket-name: ${ALIYUN_OSS_BUCKET_NAME:}
|
||||
access-key-id: ${ALIYUN_OSS_ACCESS_KEY_ID:}
|
||||
access-key-secret: ${ALIYUN_OSS_ACCESS_KEY_SECRET:}
|
||||
signed-url-expire-minutes: ${ALIYUN_OSS_SIGNED_URL_EXPIRE_MINUTES:60}
|
||||
@@ -1,8 +1,8 @@
|
||||
VITE_API_BASE_URL=/api
|
||||
VITE_ADMIN_API_BASE_URL=/admin/api
|
||||
VITE_DEV_PROXY_TARGET=http://127.0.0.1:80
|
||||
VITE_APP_NAME=指尖设计师
|
||||
VITE_APP_NAME_EN=Fingertip Designer
|
||||
VITE_APP_TITLE=Fingertip Designer 指尖设计师
|
||||
VITE_ADMIN_APP_NAME=指尖设计师管理台
|
||||
VITE_APP_SHORT_NAME=YN
|
||||
VITE_APP_NAME=甲屿店务
|
||||
VITE_APP_NAME_EN=Jiayu Salon
|
||||
VITE_APP_TITLE=Jiayu Salon 甲屿店务
|
||||
VITE_ADMIN_APP_NAME=甲屿店务管理台
|
||||
VITE_APP_SHORT_NAME=JS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
VITE_API_BASE_URL=https://yunail.art/api
|
||||
VITE_ADMIN_API_BASE_URL=https://yunail.art/admin/api
|
||||
VITE_APP_NAME=指尖设计师
|
||||
VITE_APP_NAME_EN=Fingertip Designer
|
||||
VITE_APP_TITLE=Fingertip Designer 指尖设计师
|
||||
VITE_ADMIN_APP_NAME=指尖设计师管理台
|
||||
VITE_APP_SHORT_NAME=YN
|
||||
VITE_APP_NAME=甲屿店务
|
||||
VITE_APP_NAME_EN=Jiayu Salon
|
||||
VITE_APP_TITLE=Jiayu Salon 甲屿店务
|
||||
VITE_ADMIN_APP_NAME=甲屿店务管理台
|
||||
VITE_APP_SHORT_NAME=JS
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/png" href="/jiayu-designer-icon.png" />
|
||||
<link rel="icon" type="image/svg+xml" href="/salon-admin-icon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>%VITE_APP_TITLE%</title>
|
||||
<title>SalonAdmin</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="SalonAdmin">
|
||||
<rect width="64" height="64" rx="14" fill="#8c5b4d" />
|
||||
<path d="M17 20h30v7H17zM17 31h30v7H17zM17 42h19v7H17z" fill="#fff8f2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 236 B |
@@ -4,7 +4,8 @@ import { adminNavigationItems, adminPermissionRouteMap, findAdminNavigationItemB
|
||||
describe('admin-navigation', () => {
|
||||
it('keeps dashboard landing and permission routes aligned', () => {
|
||||
expect(ADMIN_DASHBOARD_PATH).toBe('/admin/dashboard')
|
||||
expect(findAdminNavigationItemByPath('/admin/products')?.label).toBe('作品管理')
|
||||
expect(findAdminNavigationItemByPath('/admin/shops')?.label).toBe('店铺管理')
|
||||
expect(findAdminNavigationItemByPath('/admin/products')).toBeUndefined()
|
||||
expect(adminPermissionRouteMap.some(item => item.code === 'shop:view' && item.path === '/admin/shops')).toBe(true)
|
||||
expect(adminNavigationItems[0]?.path).toBe('/admin')
|
||||
})
|
||||
|
||||
@@ -26,23 +26,8 @@ export const adminNavigationItems: AdminNavigationItem[] = [
|
||||
{ path: ADMIN_HOME_PATH, iconKey: 'home', label: '首页', permissionCode: '' },
|
||||
{ path: ADMIN_DASHBOARD_PATH, iconKey: 'dashboard', label: '仪表盘', permissionCode: 'dashboard:view' },
|
||||
{ path: '/admin/users', iconKey: 'user', label: '用户管理', permissionCode: 'user:view' },
|
||||
{ path: '/admin/products', iconKey: 'shop', label: '作品管理', permissionCode: 'product:view' },
|
||||
{ path: '/admin/coupons', iconKey: 'gift', label: '优惠券管理', permissionCode: 'coupon:view' },
|
||||
{ path: '/admin/comments', iconKey: 'message', label: '评论管理', permissionCode: 'comment:view' },
|
||||
{ path: '/admin/shops', iconKey: 'home', label: '店铺管理', permissionCode: 'shop:view' },
|
||||
{ path: '/admin/permissions', iconKey: 'security', label: '权限管理', permissionCode: 'permission:view' },
|
||||
{ path: '/admin/tags', iconKey: 'tag', label: '标签管理', permissionCode: 'tag:view' },
|
||||
{ path: '/admin/orders', iconKey: 'shopping', label: '订单管理', permissionCode: 'order:view' },
|
||||
{ path: '/admin/schedules', iconKey: 'calendar', label: '排班管理', permissionCode: 'schedule:view' },
|
||||
{ path: '/admin/after-sales', iconKey: 'message', label: '售后处理', permissionCode: 'after_sale:view' },
|
||||
{ path: '/admin/inventory', iconKey: 'tool', label: '库存管理', permissionCode: 'inventory:view' },
|
||||
{ path: '/admin/campaigns', iconKey: 'gift', label: '活动管理', permissionCode: 'campaign:view' },
|
||||
{ path: '/admin/nail-artists', iconKey: 'team', label: '美甲师管理', permissionCode: 'nail_artist:view' },
|
||||
{ path: '/admin/messages', iconKey: 'message', label: '消息发布', permissionCode: 'message:view' },
|
||||
{ path: '/admin/announcements', iconKey: 'message', label: '公告管理', permissionCode: 'announcement:view' },
|
||||
{ path: '/admin/vip-recharge-plans', iconKey: 'gift', label: 'VIP充值配置', permissionCode: 'user:vip:manage' },
|
||||
{ path: '/admin/messagehub-push-configs', iconKey: 'message', label: '参数管理', permissionCode: 'messagehub:config:manage' },
|
||||
{ path: '/admin/legal-agreements', iconKey: 'security', label: '协议管理', permissionCode: 'legal_agreement:manage' }
|
||||
{ path: '/admin/profile', iconKey: 'user', label: '个人设置', permissionCode: '' }
|
||||
]
|
||||
|
||||
export const adminPermissionRouteMap = adminNavigationItems
|
||||
|
||||
@@ -4,9 +4,9 @@ function normalizeBrandValue(value: string | undefined, fallbackValue: string):
|
||||
}
|
||||
|
||||
export const BRAND_CONFIG = {
|
||||
appName: normalizeBrandValue(import.meta.env.VITE_APP_NAME, '甲屿设计师'),
|
||||
appNameEn: normalizeBrandValue(import.meta.env.VITE_APP_NAME_EN, 'Jiayu Designer'),
|
||||
appTitle: normalizeBrandValue(import.meta.env.VITE_APP_TITLE, '甲屿设计师'),
|
||||
adminAppName: normalizeBrandValue(import.meta.env.VITE_ADMIN_APP_NAME, '甲屿设计师管理台'),
|
||||
appShortName: normalizeBrandValue(import.meta.env.VITE_APP_SHORT_NAME, 'YN')
|
||||
appName: normalizeBrandValue(import.meta.env.VITE_APP_NAME, '甲屿店务'),
|
||||
appNameEn: normalizeBrandValue(import.meta.env.VITE_APP_NAME_EN, 'Jiayu Salon'),
|
||||
appTitle: normalizeBrandValue(import.meta.env.VITE_APP_TITLE, '甲屿店务'),
|
||||
adminAppName: normalizeBrandValue(import.meta.env.VITE_ADMIN_APP_NAME, '甲屿店务管理台'),
|
||||
appShortName: normalizeBrandValue(import.meta.env.VITE_APP_SHORT_NAME, 'JS')
|
||||
}
|
||||
|
||||
@@ -9,17 +9,8 @@ import {
|
||||
|
||||
const pageNames = [
|
||||
['', 'HomeView', 'admin', undefined], ['dashboard', 'DashboardView', 'admin-dashboard', 'dashboard:view'],
|
||||
['users', 'UsersView', 'admin-users', 'user:view'], ['products', 'ProductsView', 'admin-products', 'product:view'],
|
||||
['coupons', 'CouponsView', 'admin-coupons', 'coupon:view'], ['comments', 'CommentsView', 'admin-comments', 'comment:view'],
|
||||
['shops', 'ShopsView', 'admin-shops', 'shop:view'], ['permissions', 'PermissionsView', 'admin-permissions', 'permission:view'],
|
||||
['orders', 'OrdersView', 'admin-orders', 'order:view'], ['schedules', 'SchedulesView', 'admin-schedules', 'schedule:view'],
|
||||
['after-sales', 'AfterSalesView', 'admin-after-sales', 'after_sale:view'], ['inventory', 'InventoryView', 'admin-inventory', 'inventory:view'],
|
||||
['campaigns', 'CampaignsView', 'admin-campaigns', 'campaign:view'], ['manage', 'ManageView', 'admin-manage', undefined],
|
||||
['profile', 'ProfileView', 'admin-profile', undefined], ['tags', 'TagsView', 'admin-tags', 'tag:view'],
|
||||
['nail-artists', 'NailArtistsView', 'admin-nail-artists', 'nail_artist:view'], ['messages', 'SystemMessagesView', 'admin-messages', 'message:view'],
|
||||
['announcements', 'AnnouncementsView', 'admin-announcements', 'announcement:view'], ['vip-recharge-plans', 'VipRechargePlansView', 'admin-vip-recharge-plans', 'user:vip:manage'],
|
||||
['messagehub-push-configs', 'MessageHubPushConfigsView', 'admin-messagehub-push-configs', 'messagehub:config:manage'],
|
||||
['legal-agreements', 'LegalAgreementsView', 'admin-legal-agreements', 'legal_agreement:manage']
|
||||
['users', 'UsersView', 'admin-users', 'user:view'], ['shops', 'ShopsView', 'admin-shops', 'shop:view'],
|
||||
['profile', 'ProfileView', 'admin-profile', undefined]
|
||||
] as const
|
||||
|
||||
const routes = [
|
||||
@@ -42,6 +33,10 @@ router.beforeEach(async to => {
|
||||
if (!snapshot.token || !snapshot.userInfo) return true
|
||||
return (await ensureAdminAuthBootstrap()) === 'ready' ? resolveAdminLandingPath() : true
|
||||
}
|
||||
if (!snapshot.isPlatformAdmin) {
|
||||
clearAdminBootstrapSession()
|
||||
return '/admin/login'
|
||||
}
|
||||
if (!snapshot.token || !snapshot.userInfo) {
|
||||
clearAdminBootstrapSession()
|
||||
return '/admin/login'
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
type="info"
|
||||
show-icon
|
||||
message="当前处于平台总览模式"
|
||||
description="可以查看总览、店铺列表和权限入口;用户、作品、订单、优惠券等店铺业务默认仅可查看,编辑操作已关闭。"
|
||||
description="当前后台仅面向平台管理员,负责维护店铺、用户账号、角色归属和平台运行状态。"
|
||||
/>
|
||||
|
||||
<a-alert
|
||||
@@ -57,9 +57,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-permissions" v-else>
|
||||
暂无权限信息
|
||||
</div>
|
||||
<div class="no-permissions" v-else>暂无权限信息</div>
|
||||
</a-card>
|
||||
|
||||
<a-card class="quick-actions">
|
||||
@@ -157,16 +155,8 @@ import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {
|
||||
DashboardOutlined,
|
||||
FileProtectOutlined,
|
||||
GiftOutlined,
|
||||
HomeOutlined,
|
||||
MessageOutlined,
|
||||
SafetyCertificateOutlined,
|
||||
SettingOutlined,
|
||||
ShopOutlined,
|
||||
ShoppingOutlined,
|
||||
TagOutlined,
|
||||
TeamOutlined,
|
||||
UserOutlined
|
||||
} from '@ant-design/icons-vue'
|
||||
/**
|
||||
@@ -255,89 +245,12 @@ const quickActions = computed(() => {
|
||||
icon: UserOutlined,
|
||||
permissionCode: 'user:view'
|
||||
},
|
||||
{
|
||||
key: 'products',
|
||||
title: '作品管理',
|
||||
path: '/admin/products',
|
||||
icon: ShopOutlined,
|
||||
permissionCode: 'product:view'
|
||||
},
|
||||
{
|
||||
key: 'coupons',
|
||||
title: '优惠券',
|
||||
path: '/admin/coupons',
|
||||
icon: GiftOutlined,
|
||||
permissionCode: 'coupon:view'
|
||||
},
|
||||
{
|
||||
key: 'orders',
|
||||
title: '订单管理',
|
||||
path: '/admin/orders',
|
||||
icon: ShoppingOutlined,
|
||||
permissionCode: 'order:view'
|
||||
},
|
||||
{
|
||||
key: 'tags',
|
||||
title: '标签管理',
|
||||
path: '/admin/tags',
|
||||
icon: TagOutlined,
|
||||
permissionCode: 'tag:view'
|
||||
},
|
||||
{
|
||||
key: 'artists',
|
||||
title: '美甲师管理',
|
||||
path: '/admin/nail-artists',
|
||||
icon: TeamOutlined,
|
||||
permissionCode: 'nail_artist:view'
|
||||
},
|
||||
{
|
||||
key: 'shops',
|
||||
title: '店铺管理',
|
||||
path: '/admin/shops',
|
||||
icon: HomeOutlined,
|
||||
permissionCode: 'shop:view'
|
||||
},
|
||||
{
|
||||
key: 'permissions',
|
||||
title: '权限管理',
|
||||
path: '/admin/permissions',
|
||||
icon: SafetyCertificateOutlined,
|
||||
permissionCode: 'permission:view'
|
||||
},
|
||||
{
|
||||
key: 'messages',
|
||||
title: '消息发布',
|
||||
path: '/admin/messages',
|
||||
icon: MessageOutlined,
|
||||
permissionCode: 'message:view'
|
||||
},
|
||||
{
|
||||
key: 'announcements',
|
||||
title: '公告管理',
|
||||
path: '/admin/announcements',
|
||||
icon: MessageOutlined,
|
||||
permissionCode: 'announcement:view'
|
||||
},
|
||||
{
|
||||
key: 'vip-plans',
|
||||
title: 'VIP充值配置',
|
||||
path: '/admin/vip-recharge-plans',
|
||||
icon: GiftOutlined,
|
||||
permissionCode: 'user:vip:manage'
|
||||
},
|
||||
{
|
||||
key: 'parameters',
|
||||
title: '参数管理',
|
||||
path: '/admin/messagehub-push-configs',
|
||||
icon: SettingOutlined,
|
||||
permissionCode: 'messagehub:config:manage'
|
||||
},
|
||||
{
|
||||
key: 'agreements',
|
||||
title: '协议管理',
|
||||
path: '/admin/legal-agreements',
|
||||
icon: FileProtectOutlined,
|
||||
permissionCode: 'legal_agreement:manage'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ public class JayuCloudSalonGatewayApplication {
|
||||
SpringApplication.run(JayuCloudSalonGatewayApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ spring:
|
||||
fingertip-designer:
|
||||
security:
|
||||
jwt:
|
||||
issuer: fingertip-designer
|
||||
issuer: jayucloud-salon
|
||||
clock-skew-seconds: 30
|
||||
gateway:
|
||||
whitelist:
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
"simulatorPluginLibVersion": {},
|
||||
"editorSetting": {},
|
||||
"testRoot": "minitest/"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
|
||||
## 关键规则
|
||||
|
||||
- `docs/scripts/sql/init/FingertipDesigner.sql` 是 `0.0.1` 空库初始化基线,后续不得回写。
|
||||
- 新增表、字段、索引、权限种子或数据修复时,必须在 `docs/scripts/sql/migrations/` 新增带功能和日期的中文版本 SQL。
|
||||
- `docs/scripts/sql/init/jayucloud-salon.sql` 与 `docs/scripts/sql/init/jayucloud-artlist.sql` 分别是店务端和设计师端的空库初始化入口。
|
||||
- 两份初始化脚本包含各端当前运行所需的完整结构和种子数据;后续数据库变更必须以版本化 SQL 管理。
|
||||
- 配置或部署流程变更必须在 `docs/scripts/` 增加说明文档,并同步更新相关运维记录。
|
||||
- 生产 SQL、Nacos 发布和实际部署执行前,必须先核对目标环境、备份状态和凭据注入方式。
|
||||
|
||||
|
||||
@@ -68,6 +68,6 @@ vNext 经营能力在数据库层补齐独立运行时表,并与订单、权
|
||||
|
||||
## 数据库脚本
|
||||
|
||||
初始化 SQL 只放在 `docs/scripts/sql/init/FingertipDesigner.sql`,这是当前唯一的数据库初始化入口。
|
||||
初始化 SQL 只放在 `docs/scripts/sql/init/`:店务端使用 `jayucloud-salon.sql`,设计师端使用 `jayucloud-artlist.sql`。
|
||||
|
||||
vNext 经营表结构、索引、权限种子和雪花 ID 主键口径已经并入唯一初始化 SQL。空库初始化只执行 `docs/scripts/sql/init/FingertipDesigner.sql`。
|
||||
经营表结构、索引、权限种子和雪花 ID 主键口径已经并入对应端侧初始化 SQL。空库初始化只执行目标端对应脚本。
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
## SQL 基线
|
||||
|
||||
- `0.0.1` 空库初始化 SQL 基线:`docs/scripts/sql/init/FingertipDesigner.sql`
|
||||
- 空库初始化 SQL 基线:`docs/scripts/sql/init/jayucloud-salon.sql` 与 `docs/scripts/sql/init/jayucloud-artlist.sql`
|
||||
- 开发、测试、上线空库初始化只执行该文件。
|
||||
- 旧项目命名、MinIO 三副本对象存储、预约手动项目展示控制等变更已经合并进初始化 SQL。
|
||||
- 该初始化 SQL 只保留一名平台管理员 `xiaowang`、完整权限、管理员授权、协议、系统参数、MessageHub 和 VIP 基础配置,不写入门店、商品、订单、客户等业务样例数据。
|
||||
- 从 `0.0.1` 起不再修改初始化 SQL;后续 SQL 变更必须新增 `docs/scripts/sql/migrations/` 下的版本变更 SQL。
|
||||
- 不修改端侧初始化 SQL;后续 SQL 变更必须新增独立版本变更 SQL。
|
||||
- 生产已部署库的历史数据升级不在初始化 SQL 范围内,如需升级已有库必须单独制定迁移方案。
|
||||
- 脚本、配置、SQL 的后续迭代规则见 `docs/scripts/0.0.1版本基线与后续迭代规则_20260628.md`。
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
- 新业务优先放入现有 `modules.<module>`。
|
||||
- Gateway 不承载业务写逻辑。
|
||||
- 数据库空库基线以 `docs/scripts/sql/init/FingertipDesigner.sql` 的 `0.0.1` 冻结版本为准,后续数据库变更走 `docs/scripts/sql/migrations/`。
|
||||
- 数据库空库基线以 `docs/scripts/sql/init/jayucloud-salon.sql` 和 `docs/scripts/sql/init/jayucloud-artlist.sql` 为准,后续数据库变更使用独立版本化 SQL。
|
||||
|
||||
## JC-ArtList-Gateway
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
|
||||
关键入口:
|
||||
|
||||
- `docs/scripts/sql/init/FingertipDesigner.sql`
|
||||
- `docs/scripts/sql/migrations/`
|
||||
- `docs/scripts/sql/init/jayucloud-salon.sql`
|
||||
- `docs/scripts/sql/init/jayucloud-artlist.sql`
|
||||
- `docs/scripts/0.0.1版本基线与后续迭代规则_20260628.md`
|
||||
- `docs/scripts/deploy-fingertip-designer-production.ps1`
|
||||
- `docs/scripts/package-release.ps1`
|
||||
|
||||
边界:
|
||||
|
||||
- `docs/scripts/sql/init/FingertipDesigner.sql` 是 `0.0.1` 空库初始化 SQL 基线,后续不再修改。
|
||||
- 两份端侧初始化 SQL 是空库初始化基线,后续不再修改。
|
||||
- `docs/scripts/sql/migrations` 是 `0.0.1` 后的数据库版本变更 SQL 目录。
|
||||
- 生产已部署库升级不直接复用初始化 SQL,必须单独制定迁移方案。
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
检查点:
|
||||
|
||||
- 当前 `0.0.1` 空库初始化 SQL 基线是 `docs/scripts/sql/init/FingertipDesigner.sql`。
|
||||
- 当前空库初始化 SQL 基线是 `docs/scripts/sql/init/jayucloud-salon.sql` 与 `docs/scripts/sql/init/jayucloud-artlist.sql`。
|
||||
- 开发、测试、上线空库只执行该文件。
|
||||
- `0.0.1` 之后不得继续修改初始化 SQL。
|
||||
- 新增表、字段、索引、权限种子、系统参数、运行必需种子数据或数据修复时,必须新增 `docs/scripts/sql/migrations/` 下的版本变更 SQL。
|
||||
- 新增表、字段、索引、权限种子、系统参数、运行必需种子数据或数据修复时,必须新增独立版本变更 SQL。
|
||||
- 版本变更 SQL 文件名必须使用中文,体现功能和日期,内容必须完整可执行。
|
||||
- 生产已部署库升级不直接复用初始化 SQL,必须单独制定迁移方案。
|
||||
- 真实 DDL 优先用 MySQL 执行验证;不能执行时要记录阻塞原因。
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
|
||||
步骤:
|
||||
|
||||
1. 不修改 `docs/scripts/sql/init/FingertipDesigner.sql`。
|
||||
2. 在 `docs/scripts/sql/migrations/` 新增中文命名的版本变更 SQL,体现功能和日期。
|
||||
1. 不修改 `docs/scripts/sql/init/jayucloud-salon.sql` 和 `docs/scripts/sql/init/jayucloud-artlist.sql`。
|
||||
2. 新增中文命名的独立版本变更 SQL,体现功能和日期。
|
||||
3. SQL 内容必须完整可执行,并包含必要的幂等判断、过程清理和明确失败条件。
|
||||
4. 对比 Java `@TableName` 实体表与本次版本变更 SQL,确认新增表、字段、索引和种子数据边界。
|
||||
5. 用临时库或目标环境执行 SQL;不能执行时记录阻塞原因。
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
更新时间:2026-05-24
|
||||
|
||||
本文记录已经并入唯一初始化 SQL 的 vNext 经营能力。当前空库初始化只执行 `docs/scripts/sql/init/FingertipDesigner.sql`,不再额外执行历史增量脚本。
|
||||
本文记录已经并入端侧初始化 SQL 的 vNext 经营能力。店务端执行 `docs/scripts/sql/init/jayucloud-salon.sql`,设计师端执行 `docs/scripts/sql/init/jayucloud-artlist.sql`,不再额外执行历史增量脚本。
|
||||
|
||||
## 覆盖范围
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
## 唯一入口
|
||||
|
||||
`docs/scripts/sql/init/FingertipDesigner.sql` 是 `0.0.1` 空库初始化 SQL 基线。
|
||||
当前空库初始化入口为 `docs/scripts/sql/init/jayucloud-salon.sql`(店务端)和 `docs/scripts/sql/init/jayucloud-artlist.sql`(设计师端)。
|
||||
|
||||
开发、测试、上线空库初始化都只执行该文件。本轮已把旧项目命名、MinIO 三副本对象存储、预约手动项目展示控制等变更合并回 `0.0.1` 初始化基线。
|
||||
|
||||
从 `0.0.1` 起,该初始化 SQL 冻结为仅空库首次初始化使用。后续涉及表结构、补列、索引、权限种子、系统参数、运行必需种子数据或数据修复时,必须在 `docs/scripts/sql/migrations/` 下新增版本变更 SQL,不得继续修改初始化 SQL。
|
||||
两份初始化 SQL 仅用于各自端侧的空库首次初始化;后续数据库变更必须使用独立版本化 SQL,不得回写初始化脚本。
|
||||
|
||||
## 初始化内容
|
||||
|
||||
|
||||
@@ -13,19 +13,18 @@
|
||||
- `JC-ArtList-Frontend`:`package.json` 和 `package-lock.json` 版本为 `0.0.1`。
|
||||
- `JC-ArtList-WeChat`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 用户端小程序基线。
|
||||
- `JC-Salon-WeChat`:以当前微信小程序项目配置、页面和脚本作为 `0.0.1` 管理师小程序基线。
|
||||
- `docs/scripts/sql/init/FingertipDesigner.sql`:作为 `0.0.1` 空库初始化 SQL 基线。
|
||||
- `docs/scripts/sql/migrations/`:作为 `0.0.1` 后续数据库版本变更脚本目录。
|
||||
- `docs/scripts/sql/init/jayucloud-salon.sql`:作为店务端空库初始化 SQL 基线。
|
||||
- `docs/scripts/sql/init/jayucloud-artlist.sql`:作为设计师端空库初始化 SQL 基线。
|
||||
|
||||
## 初始化 SQL 冻结规则
|
||||
|
||||
从 `0.0.1` 起,`docs/scripts/sql/init/FingertipDesigner.sql` 只作为空库首次初始化基线,不再在后续需求、修复或配置变更中修改。
|
||||
从当前双端基线起,`docs/scripts/sql/init/jayucloud-salon.sql` 与 `docs/scripts/sql/init/jayucloud-artlist.sql` 只作为各自空库首次初始化入口。
|
||||
|
||||
后续涉及表结构、补列、索引、权限种子、系统参数、运行必需种子数据或数据修复时,必须新增版本变更 SQL,不得回写初始化 SQL。
|
||||
|
||||
## 后续迭代文件规则
|
||||
|
||||
- SQL 变更脚本放在 `docs/scripts/sql/migrations/`。
|
||||
- SQL 文件名必须使用中文,体现功能和日期,例如 `员工排班规则和例外_20260626.sql`。
|
||||
- 后续 SQL 变更必须创建独立的版本化脚本,文件名使用中文并体现功能和日期,例如 `员工排班规则和例外_20260626.sql`。
|
||||
- SQL 内容必须是完整可执行脚本,包含必要的幂等判断、过程清理和明确失败条件。
|
||||
- 配置变更必须新增说明文档,放在 `docs/scripts/` 目录。
|
||||
- 配置说明文档文件名必须使用中文,体现功能和日期。
|
||||
@@ -35,4 +34,4 @@
|
||||
|
||||
- 问题:旧记忆和交接文档仍记录“新增表字段后同步更新初始化 SQL”。
|
||||
- 原因:`0.0.1` 前的上线基线阶段曾把历史 SQL 合并回唯一初始化脚本。
|
||||
- 处理:本次将规则改为 `0.0.1` 初始化 SQL 冻结,后续变更全部通过 `docs/scripts/sql/migrations/` 和 `docs/scripts/` 中的版本化说明文件迭代。
|
||||
- 处理:初始化入口按端侧拆分;后续变更通过版本化 SQL 与 `docs/scripts/` 中的说明文件迭代。
|
||||
|
||||
@@ -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 "docs\scripts\sql\init\FingertipDesigner.sql"
|
||||
$defaultInitSqlPath = Join-Path $resolvedRepoRoot "docs\scripts\sql\init\jayucloud-artlist.sql"
|
||||
if (-not $InitSqlPath) {
|
||||
$InitSqlPath = $defaultInitSqlPath
|
||||
}
|
||||
@@ -509,7 +509,7 @@ function Build-ReleasePackage {
|
||||
$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"
|
||||
$sqlArtifact = Join-Path $sqlDir "jayucloud-artlist.sql"
|
||||
Copy-Item -LiteralPath $coreJar -Destination $coreArtifact -Force
|
||||
Copy-Item -LiteralPath $gatewayJar -Destination $gatewayArtifact -Force
|
||||
Copy-Item -LiteralPath $InitSqlPath -Destination $sqlArtifact -Force
|
||||
|
||||
@@ -8,6 +8,12 @@ param(
|
||||
[switch]$SkipTests,
|
||||
[switch]$AllowDirtyWorkingTree,
|
||||
[switch]$SkipDatabaseInit,
|
||||
[switch]$PackageOnly,
|
||||
[switch]$RequireSystemd,
|
||||
[string]$PackageDirectory = "",
|
||||
[string]$ServerInfoJsonPath = "",
|
||||
[string]$SshKeyPath = "",
|
||||
[string]$KnownHostsPath = "",
|
||||
[string]$DatabaseTargetName = "mysql02",
|
||||
[int]$DatabasePort = 3306,
|
||||
[string]$DatabaseName = "jayucloud_salon",
|
||||
@@ -41,7 +47,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 "docs\scripts\sql\migrations\20260825-双端独立数据库\店务独立数据库_20260825.sql"
|
||||
$defaultInitSqlPath = Join-Path $resolvedRepoRoot "docs\scripts\sql\init\jayucloud-salon.sql"
|
||||
if (-not $InitSqlPath) {
|
||||
$InitSqlPath = $defaultInitSqlPath
|
||||
}
|
||||
@@ -324,6 +330,31 @@ function Get-ServersFromWorkbook {
|
||||
}
|
||||
}
|
||||
|
||||
function Get-ServersFromJson {
|
||||
param([string]$Path)
|
||||
|
||||
if (-not (Test-Path -LiteralPath $Path)) {
|
||||
throw "服务器 JSON 清单不存在:$Path"
|
||||
}
|
||||
|
||||
$items = @(Get-Content -LiteralPath $Path -Raw -Encoding UTF8 | ConvertFrom-Json)
|
||||
foreach ($item in $items) {
|
||||
if (-not $item.Name -or -not $item.Host) {
|
||||
throw "服务器 JSON 清单缺少 Name 或 Host:$Path"
|
||||
}
|
||||
[pscustomobject]@{
|
||||
Name = [string]$item.Name
|
||||
Host = [string]$item.Host
|
||||
Port = if ($item.Port) { [int]$item.Port } else { 22 }
|
||||
User = if ($item.User) { [string]$item.User } else { "root" }
|
||||
Password = ""
|
||||
Purpose = if ($item.Purpose) { [string]$item.Purpose } else { "" }
|
||||
Note = if ($item.Note) { [string]$item.Note } else { "" }
|
||||
Environment = if ($item.Environment) { [string]$item.Environment } else { "prod" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Resolve-ServerInfoPath {
|
||||
param([string]$ExplicitPath)
|
||||
|
||||
@@ -374,7 +405,15 @@ function Invoke-RemoteShell {
|
||||
[switch]$Sensitive
|
||||
)
|
||||
|
||||
if ($UsePuttyPassword) {
|
||||
if ($SshKeyPath) {
|
||||
$sshArgs = @("-o", "BatchMode=yes", "-o", "StrictHostKeyChecking=yes", "-i", $SshKeyPath)
|
||||
if ($KnownHostsPath) {
|
||||
$sshArgs += @("-o", "UserKnownHostsFile=$KnownHostsPath")
|
||||
}
|
||||
$sshArgs += @("-p", [string]$Server.Port, (Get-SshTarget $Server), $Command)
|
||||
Invoke-Native "ssh" $sshArgs -Sensitive:$Sensitive -RemoteMutation
|
||||
}
|
||||
elseif ($UsePuttyPassword) {
|
||||
$plink = Get-Command plink -ErrorAction SilentlyContinue
|
||||
if ((-not $DryRun) -and (-not $plink)) {
|
||||
throw "找不到 PuTTY plink,请安装 PuTTY 工具或改用 SSH key。"
|
||||
@@ -399,7 +438,15 @@ function Copy-FileToRemote {
|
||||
throw "本地上传文件不存在:$LocalPath"
|
||||
}
|
||||
|
||||
if ($UsePuttyPassword) {
|
||||
if ($SshKeyPath) {
|
||||
$scpArgs = @("-o", "BatchMode=yes", "-o", "StrictHostKeyChecking=yes", "-i", $SshKeyPath)
|
||||
if ($KnownHostsPath) {
|
||||
$scpArgs += @("-o", "UserKnownHostsFile=$KnownHostsPath")
|
||||
}
|
||||
$scpArgs += @("-P", [string]$Server.Port, $LocalPath, "$(Get-SshTarget $Server):$RemotePath")
|
||||
Invoke-Native "scp" $scpArgs -Sensitive:$Sensitive -RemoteMutation
|
||||
}
|
||||
elseif ($UsePuttyPassword) {
|
||||
$pscp = Get-Command pscp -ErrorAction SilentlyContinue
|
||||
if ((-not $DryRun) -and (-not $pscp)) {
|
||||
throw "找不到 PuTTY pscp,请安装 PuTTY 工具或改用 SSH key。"
|
||||
@@ -509,7 +556,7 @@ function Build-ReleasePackage {
|
||||
$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"
|
||||
$sqlArtifact = Join-Path $sqlDir "jayucloud-salon.sql"
|
||||
Copy-Item -LiteralPath $coreJar -Destination $coreArtifact -Force
|
||||
Copy-Item -LiteralPath $gatewayJar -Destination $gatewayArtifact -Force
|
||||
Copy-Item -LiteralPath $InitSqlPath -Destination $sqlArtifact -Force
|
||||
@@ -569,6 +616,10 @@ RELEASE="`$APP_DIR/releases/`$RELEASE_NAME"
|
||||
BACKUP_NAME="app-$releaseTimestamp.jar"
|
||||
mkdir -p "`$APP_DIR/releases" "`$APP_DIR/backups" "`$APP_DIR/logs"
|
||||
test -f "`$RELEASE"
|
||||
if [ "`$RequireSystemd" = "True" ] && ! systemctl list-unit-files | grep -q "^`$SERVICE.service"; then
|
||||
echo "Required systemd unit missing: `$SERVICE"
|
||||
exit 44
|
||||
fi
|
||||
if command -v systemctl >/dev/null 2>&1 && systemctl list-unit-files | grep -q "^`$SERVICE.service"; then
|
||||
systemctl stop "`$SERVICE" || true
|
||||
fi
|
||||
@@ -776,9 +827,66 @@ function Invoke-PublicSmokeTests {
|
||||
}
|
||||
}
|
||||
|
||||
if ($PackageOnly) {
|
||||
Write-Step "检查工作区"
|
||||
$gitState = Test-GitState
|
||||
Write-Step "构建发布包"
|
||||
$package = Build-ReleasePackage $gitState
|
||||
$packageManifest = [pscustomobject]@{
|
||||
releaseTimestamp = $releaseTimestamp
|
||||
git = $package.Git
|
||||
artifacts = $package.Hashes
|
||||
parameters = [pscustomobject]@{
|
||||
databaseName = $DatabaseName
|
||||
webRemoteDir = $WebRemoteDir
|
||||
publicBaseUrl = $PublicBaseUrl
|
||||
nacosNamespace = "jayucloud-salon"
|
||||
packageOnly = $true
|
||||
}
|
||||
}
|
||||
$packageManifest | ConvertTo-Json -Depth 8 | Set-Content -LiteralPath $manifestPath -Encoding UTF8
|
||||
Write-Host "发布包已生成:$($package.Directory)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function Get-ExistingReleasePackage {
|
||||
param([string]$Path)
|
||||
|
||||
if (-not (Test-Path -LiteralPath $Path)) {
|
||||
throw "已下载发布包目录不存在:$Path"
|
||||
}
|
||||
$manifestFile = Get-ChildItem -LiteralPath $Path -Filter "manifest.json" -File -Recurse | Select-Object -First 1
|
||||
if (-not $manifestFile) {
|
||||
throw "发布包目录中缺少 manifest.json:$Path"
|
||||
}
|
||||
$releaseDir = $manifestFile.Directory.FullName
|
||||
$coreArtifact = Join-Path $releaseDir "backend\JC-Salon-Core.jar"
|
||||
$gatewayArtifact = Join-Path $releaseDir "backend\JC-Salon-Gateway.jar"
|
||||
$frontendArtifact = Join-Path $releaseDir "frontend\jc-salon-frontend-dist.tar.gz"
|
||||
$sqlArtifact = Join-Path $releaseDir "sql\jayucloud-salon.sql"
|
||||
foreach ($requiredPath in @($coreArtifact, $gatewayArtifact, $frontendArtifact, $sqlArtifact)) {
|
||||
if (-not (Test-Path -LiteralPath $requiredPath)) {
|
||||
throw "发布包缺少文件:$requiredPath"
|
||||
}
|
||||
}
|
||||
$hashes = foreach ($artifact in @($coreArtifact, $gatewayArtifact, $frontendArtifact, $sqlArtifact)) {
|
||||
$hash = Get-FileHash -LiteralPath $artifact -Algorithm SHA256
|
||||
[pscustomobject]@{ Path = $artifact.Replace($releaseDir, "").TrimStart("\", "/"); Sha256 = $hash.Hash }
|
||||
}
|
||||
[pscustomobject]@{
|
||||
Directory = $releaseDir
|
||||
CoreJar = $coreArtifact
|
||||
GatewayJar = $gatewayArtifact
|
||||
FrontendArchive = $frontendArtifact
|
||||
InitSql = $sqlArtifact
|
||||
Hashes = @($hashes)
|
||||
Git = $null
|
||||
}
|
||||
}
|
||||
|
||||
Write-Step "读取服务器清单"
|
||||
$resolvedServerInfoPath = Resolve-ServerInfoPath $ServerInfoPath
|
||||
$servers = @(Get-ServersFromWorkbook $resolvedServerInfoPath)
|
||||
$resolvedServerInfoPath = if ($ServerInfoJsonPath) { (Resolve-Path -LiteralPath $ServerInfoJsonPath).Path } else { Resolve-ServerInfoPath $ServerInfoPath }
|
||||
$servers = if ($ServerInfoJsonPath) { @(Get-ServersFromJson $resolvedServerInfoPath) } else { @(Get-ServersFromWorkbook $resolvedServerInfoPath) }
|
||||
$coreServers = @($servers | Where-Object { $_.Name -match $CorePattern })
|
||||
$gatewayServers = @($servers | Where-Object { $_.Name -match $GatewayPattern })
|
||||
$webServers = @(if ($WebTargetName) {
|
||||
@@ -816,8 +924,8 @@ if ($databaseServer) {
|
||||
Write-Step "检查工作区"
|
||||
$gitState = Test-GitState
|
||||
|
||||
Write-Step "构建发布包"
|
||||
$package = Build-ReleasePackage $gitState
|
||||
Write-Step "准备发布包"
|
||||
$package = if ($PackageDirectory) { Get-ExistingReleasePackage $PackageDirectory } else { Build-ReleasePackage $gitState }
|
||||
Write-ReleaseManifest $package $coreServers $gatewayServers $webServers[0] $databaseServer $resolvedServerInfoPath
|
||||
|
||||
if (-not $Deploy) {
|
||||
|
||||
@@ -12,7 +12,8 @@ $releaseDir = Join-Path $releaseRoot $timestamp
|
||||
$backendDir = Join-Path $releaseDir "backend"
|
||||
$frontendDir = Join-Path $releaseDir "frontend"
|
||||
$miniProgramDir = Join-Path $releaseDir "miniprograms"
|
||||
$sqlPath = Join-Path $repoRoot "docs\scripts\sql\init\FingertipDesigner.sql"
|
||||
$artlistSqlPath = Join-Path $repoRoot "docs\scripts\sql\init\jayucloud-artlist.sql"
|
||||
$salonSqlPath = Join-Path $repoRoot "docs\scripts\sql\init\jayucloud-salon.sql"
|
||||
|
||||
function Resolve-Maven {
|
||||
param([string]$PreferredPath)
|
||||
@@ -119,7 +120,8 @@ Copy-RequiredFile $gatewayJar (Join-Path $backendDir "JC-ArtList-Gateway.jar")
|
||||
Copy-Directory $frontendDist (Join-Path $frontendDir "dist")
|
||||
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")
|
||||
Copy-RequiredFile $artlistSqlPath (Join-Path $releaseDir "jayucloud-artlist.sql")
|
||||
Copy-RequiredFile $salonSqlPath (Join-Path $releaseDir "jayucloud-salon.sql")
|
||||
|
||||
$manifest = @(
|
||||
"# FingertipDesigner Release $timestamp",
|
||||
@@ -129,11 +131,11 @@ $manifest = @(
|
||||
"- frontend/dist",
|
||||
"- miniprograms/JC-ArtList-WeChat",
|
||||
"- miniprograms/JC-Salon-WeChat",
|
||||
"- FingertipDesigner.sql",
|
||||
"- jayucloud-artlist.sql",
|
||||
"- jayucloud-salon.sql",
|
||||
"",
|
||||
"Nacos namespace: FingertipDesigner",
|
||||
"Database initialized by: docs/scripts/sql/init/FingertipDesigner.sql",
|
||||
"Database name: FingertipDesigner",
|
||||
"Database initialization: docs/scripts/sql/init/jayucloud-artlist.sql and docs/scripts/sql/init/jayucloud-salon.sql",
|
||||
"Database names: jayucloud_artlist and jayucloud_salon",
|
||||
"Manager mini program API: https://yunail.art/api/admin"
|
||||
)
|
||||
$manifest | Set-Content -Encoding UTF8 (Join-Path $releaseDir "README.md")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+13
-1
@@ -1732,6 +1732,7 @@ ON DUPLICATE KEY UPDATE
|
||||
is_delete = 0,
|
||||
update_time = NOW();
|
||||
|
||||
|
||||
CALL sp_add_column_if_not_exists('t_order', 'customer_remark', 'varchar(500) NULL COMMENT ''用户询价预约备注''');
|
||||
CALL sp_add_column_if_not_exists('t_order', 'quote_status', 'varchar(32) NULL COMMENT ''报价状态:CONFIRMING/CONFIRMED/EXPIRED''');
|
||||
CALL sp_add_column_if_not_exists('t_order', 'quote_user_confirmed', 'tinyint unsigned NOT NULL DEFAULT 0 COMMENT ''用户是否确认当前报价''');
|
||||
@@ -1910,7 +1911,7 @@ SELECT
|
||||
'xiaowang',
|
||||
0,
|
||||
0,
|
||||
'$2a$10$I3mV64NhISqMmm7soSki1.Y36ve.TOINGOrVt0U0kxjO7GtxavE16',
|
||||
'$2a$10$3ZC5HHVK6EYIfkjcU9IHZulGXwNZhy.6LU85HRJC9A.3LHm0IEdMO',
|
||||
'',
|
||||
'管理员',
|
||||
4,
|
||||
@@ -2311,3 +2312,14 @@ ON DUPLICATE KEY UPDATE
|
||||
is_delete = 0,
|
||||
update_by = VALUES(update_by),
|
||||
update_time = NOW();
|
||||
|
||||
-- 排班规则与例外
|
||||
CREATE TABLE IF NOT EXISTS t_artist_schedule_rule (
|
||||
id bigint unsigned NOT NULL COMMENT '排班规则ID', shop_id bigint unsigned NOT NULL COMMENT '店铺ID', artist_id bigint unsigned NOT NULL COMMENT '美甲师用户ID', preset_type varchar(32) NOT NULL COMMENT '预设类型', work_days varchar(32) NOT NULL COMMENT '工作星期,1-7逗号分隔', start_time time NOT NULL COMMENT '常规开始时间', end_time time NOT NULL COMMENT '常规结束时间', slot_minutes int NOT NULL DEFAULT 60 COMMENT '预约间隔分钟', capacity int NOT NULL DEFAULT 1 COMMENT '同一时间段容量', status tinyint NOT NULL DEFAULT 1 COMMENT '状态:1启用,0停用', remark varchar(255) NULL COMMENT '备注', create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', is_delete tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除', PRIMARY KEY (id), UNIQUE KEY uk_artist_schedule_rule_artist (shop_id, artist_id, is_delete), KEY idx_artist_schedule_rule_shop_status (shop_id, status, is_delete)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='美甲师常规排班规则表';
|
||||
CREATE TABLE IF NOT EXISTS t_artist_schedule_exception (
|
||||
id bigint unsigned NOT NULL COMMENT '排班例外ID', shop_id bigint unsigned NOT NULL COMMENT '店铺ID', artist_id bigint unsigned NOT NULL COMMENT '美甲师用户ID', work_date date NOT NULL COMMENT '例外日期', exception_type varchar(32) NOT NULL COMMENT '例外类型:REST/EXTRA_WORK/CHANGE_SHIFT', start_time time NULL COMMENT '例外开始时间', end_time time NULL COMMENT '例外结束时间', slot_minutes int NOT NULL DEFAULT 60 COMMENT '预约间隔分钟', capacity int NOT NULL DEFAULT 1 COMMENT '同一时间段容量', remark varchar(255) NULL COMMENT '备注', create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', is_delete tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除', PRIMARY KEY (id), UNIQUE KEY uk_artist_schedule_exception_date (shop_id, artist_id, work_date, is_delete), KEY idx_artist_schedule_exception_artist_date (artist_id, work_date, is_delete)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='美甲师排班例外表';
|
||||
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;
|
||||
+16
-5
@@ -107,7 +107,7 @@ create index idx_shop_id
|
||||
|
||||
create index idx_user_id
|
||||
on t_comment (user_id)
|
||||
comment '按用户查询评论的索引';s
|
||||
comment '按用户查询评论的索引';
|
||||
|
||||
-- auto-generated definition
|
||||
create table t_coupon
|
||||
@@ -1732,6 +1732,7 @@ ON DUPLICATE KEY UPDATE
|
||||
is_delete = 0,
|
||||
update_time = NOW();
|
||||
|
||||
|
||||
CALL sp_add_column_if_not_exists('t_order', 'customer_remark', 'varchar(500) NULL COMMENT ''用户询价预约备注''');
|
||||
CALL sp_add_column_if_not_exists('t_order', 'quote_status', 'varchar(32) NULL COMMENT ''报价状态:CONFIRMING/CONFIRMED/EXPIRED''');
|
||||
CALL sp_add_column_if_not_exists('t_order', 'quote_user_confirmed', 'tinyint unsigned NOT NULL DEFAULT 0 COMMENT ''用户是否确认当前报价''');
|
||||
@@ -1781,7 +1782,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='甲屿店务按业务场景投递MessageHub的配置';
|
||||
|
||||
DROP PROCEDURE IF EXISTS sp_add_column_if_not_exists;
|
||||
DROP PROCEDURE IF EXISTS sp_add_index_if_not_exists;
|
||||
@@ -1910,7 +1911,7 @@ SELECT
|
||||
'xiaowang',
|
||||
0,
|
||||
0,
|
||||
'$2a$10$I3mV64NhISqMmm7soSki1.Y36ve.TOINGOrVt0U0kxjO7GtxavE16',
|
||||
'$2a$10$3ZC5HHVK6EYIfkjcU9IHZulGXwNZhy.6LU85HRJC9A.3LHm0IEdMO',
|
||||
'',
|
||||
'管理员',
|
||||
4,
|
||||
@@ -2222,8 +2223,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', '欢迎使用 Jiayu Salon 甲屿店务。请在使用账号、预约、订单、会员、消息等功能前仔细阅读本协议。继续登录或注册即表示你已理解并同意平台基础服务规则、账号安全要求、订单预约规则和依法合规使用要求。', 1, NOW(), NOW(), NOW(), 0),
|
||||
(313931273555138002, 'PRIVACY_POLICY', '隐私政策', '2026.05.18', 'Jiayu Salon 甲屿店务会在提供登录注册、预约下单、会员余额、消息通知和客户服务时处理必要的手机号、昵称、门店归属、订单与设备信息。我们仅在业务需要和法律允许范围内使用这些信息,并采取访问控制、脱敏展示和审计记录等措施保护数据安全。', 1, NOW(), NOW(), NOW(), 0)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
title = VALUES(title),
|
||||
content = VALUES(content),
|
||||
@@ -2311,3 +2312,13 @@ ON DUPLICATE KEY UPDATE
|
||||
is_delete = 0,
|
||||
update_by = VALUES(update_by),
|
||||
update_time = NOW();
|
||||
|
||||
-- 排班规则与例外
|
||||
CREATE TABLE IF NOT EXISTS t_artist_schedule_rule (
|
||||
id bigint unsigned NOT NULL COMMENT '排班规则ID', shop_id bigint unsigned NOT NULL COMMENT '店铺ID', artist_id bigint unsigned NOT NULL COMMENT '美甲师用户ID', preset_type varchar(32) NOT NULL COMMENT '预设类型', work_days varchar(32) NOT NULL COMMENT '工作星期,1-7逗号分隔', start_time time NOT NULL COMMENT '常规开始时间', end_time time NOT NULL COMMENT '常规结束时间', slot_minutes int NOT NULL DEFAULT 60 COMMENT '预约间隔分钟', capacity int NOT NULL DEFAULT 1 COMMENT '同一时间段容量', status tinyint NOT NULL DEFAULT 1 COMMENT '状态:1启用,0停用', remark varchar(255) NULL COMMENT '备注', create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', is_delete tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除', PRIMARY KEY (id), UNIQUE KEY uk_artist_schedule_rule_artist (shop_id, artist_id, is_delete), KEY idx_artist_schedule_rule_shop_status (shop_id, status, is_delete)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='美甲师常规排班规则表';
|
||||
CREATE TABLE IF NOT EXISTS t_artist_schedule_exception (
|
||||
id bigint unsigned NOT NULL COMMENT '排班例外ID', shop_id bigint unsigned NOT NULL COMMENT '店铺ID', artist_id bigint unsigned NOT NULL COMMENT '美甲师用户ID', work_date date NOT NULL COMMENT '例外日期', exception_type varchar(32) NOT NULL COMMENT '例外类型:REST/EXTRA_WORK/CHANGE_SHIFT', start_time time NULL COMMENT '例外开始时间', end_time time NULL COMMENT '例外结束时间', slot_minutes int NOT NULL DEFAULT 60 COMMENT '预约间隔分钟', capacity int NOT NULL DEFAULT 1 COMMENT '同一时间段容量', remark varchar(255) NULL COMMENT '备注', create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', is_delete tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除', PRIMARY KEY (id), UNIQUE KEY uk_artist_schedule_exception_date (shop_id, artist_id, work_date, is_delete), KEY idx_artist_schedule_exception_artist_date (artist_id, work_date, is_delete)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='美甲师排班例外表';
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -1,14 +0,0 @@
|
||||
-- 店务端职责裁剪:移除设计师用户侧购物车、收藏、会员和商品互动结构。
|
||||
-- 执行前必须完成 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;
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 设计师端职责裁剪:移除仅店务管理使用的库存、营销活动和权限审计结构。
|
||||
-- 执行前必须完成 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;
|
||||
@@ -1,92 +0,0 @@
|
||||
-- 员工排班规则和例外,保留 t_artist_schedule 作为预约校验使用的具体日期排班表。
|
||||
use fingertipdesigner;
|
||||
DROP PROCEDURE IF EXISTS sp_fd_add_index_if_not_exists;
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE sp_fd_add_index_if_not_exists(
|
||||
IN p_table_name varchar(128),
|
||||
IN p_index_name varchar(128),
|
||||
IN p_index_sql varchar(1000)
|
||||
)
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.statistics
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = p_table_name
|
||||
AND index_name = p_index_name
|
||||
) THEN
|
||||
SET @fd_sql = CONCAT('ALTER TABLE ', p_table_name, ' ADD INDEX ', p_index_name, ' ', p_index_sql);
|
||||
PREPARE fd_stmt FROM @fd_sql;
|
||||
EXECUTE fd_stmt;
|
||||
DEALLOCATE PREPARE fd_stmt;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
||||
DROP PROCEDURE IF EXISTS sp_fd_add_unique_index_if_not_exists;
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE sp_fd_add_unique_index_if_not_exists(
|
||||
IN p_table_name varchar(128),
|
||||
IN p_index_name varchar(128),
|
||||
IN p_index_sql varchar(1000)
|
||||
)
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.statistics
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = p_table_name
|
||||
AND index_name = p_index_name
|
||||
) THEN
|
||||
SET @fd_sql = CONCAT('ALTER TABLE ', p_table_name, ' ADD UNIQUE INDEX ', p_index_name, ' ', p_index_sql);
|
||||
PREPARE fd_stmt FROM @fd_sql;
|
||||
EXECUTE fd_stmt;
|
||||
DEALLOCATE PREPARE fd_stmt;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS t_artist_schedule_rule
|
||||
(
|
||||
id bigint unsigned NOT NULL COMMENT '排班规则ID',
|
||||
shop_id bigint unsigned NOT NULL COMMENT '店铺ID',
|
||||
artist_id bigint unsigned NOT NULL COMMENT '美甲师用户ID',
|
||||
preset_type varchar(32) NOT NULL COMMENT '预设类型',
|
||||
work_days varchar(32) NOT NULL COMMENT '工作星期,1-7逗号分隔',
|
||||
start_time time NOT NULL COMMENT '常规开始时间',
|
||||
end_time time NOT NULL COMMENT '常规结束时间',
|
||||
slot_minutes int NOT NULL DEFAULT 60 COMMENT '预约间隔分钟',
|
||||
capacity int NOT NULL DEFAULT 1 COMMENT '同一时间段容量',
|
||||
status tinyint NOT NULL DEFAULT 1 COMMENT '状态:1启用,0停用',
|
||||
remark varchar(255) NULL COMMENT '备注',
|
||||
create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
is_delete tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='美甲师常规排班规则表';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS t_artist_schedule_exception
|
||||
(
|
||||
id bigint unsigned NOT NULL COMMENT '排班例外ID',
|
||||
shop_id bigint unsigned NOT NULL COMMENT '店铺ID',
|
||||
artist_id bigint unsigned NOT NULL COMMENT '美甲师用户ID',
|
||||
work_date date NOT NULL COMMENT '例外日期',
|
||||
exception_type varchar(32) NOT NULL COMMENT '例外类型:REST/EXTRA_WORK/CHANGE_SHIFT',
|
||||
start_time time NULL COMMENT '例外开始时间',
|
||||
end_time time NULL COMMENT '例外结束时间',
|
||||
slot_minutes int NOT NULL DEFAULT 60 COMMENT '预约间隔分钟',
|
||||
capacity int NOT NULL DEFAULT 1 COMMENT '同一时间段容量',
|
||||
remark varchar(255) NULL COMMENT '备注',
|
||||
create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
is_delete tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='美甲师排班例外表';
|
||||
|
||||
CALL sp_fd_add_unique_index_if_not_exists('t_artist_schedule_rule', 'uk_artist_schedule_rule_artist', '(`shop_id`, `artist_id`, `is_delete`)');
|
||||
CALL sp_fd_add_index_if_not_exists('t_artist_schedule_rule', 'idx_artist_schedule_rule_shop_status', '(`shop_id`, `status`, `is_delete`)');
|
||||
CALL sp_fd_add_unique_index_if_not_exists('t_artist_schedule_exception', 'uk_artist_schedule_exception_date', '(`shop_id`, `artist_id`, `work_date`, `is_delete`)');
|
||||
CALL sp_fd_add_index_if_not_exists('t_artist_schedule_exception', 'idx_artist_schedule_exception_artist_date', '(`artist_id`, `work_date`, `is_delete`)');
|
||||
|
||||
DROP PROCEDURE IF EXISTS sp_fd_add_index_if_not_exists;
|
||||
DROP PROCEDURE IF EXISTS sp_fd_add_unique_index_if_not_exists;
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
## 数据库脚本
|
||||
|
||||
- `docs/scripts/sql/migrations/20260825-双端独立数据库/设计师独立数据库_20260825.sql`
|
||||
- `docs/scripts/sql/migrations/20260825-双端独立数据库/店务独立数据库_20260825.sql`
|
||||
- `docs/scripts/sql/init/jayucloud-artlist.sql`
|
||||
- `docs/scripts/sql/init/jayucloud-salon.sql`
|
||||
|
||||
两份脚本均为完整可执行空库初始化脚本,不修改冻结的 `docs/scripts/sql/init/FingertipDesigner.sql`,本次不迁移既有生产数据。
|
||||
两份脚本均为完整可执行空库初始化脚本,分别包含端侧职责裁剪与排班规则;新建库仅执行目标端对应脚本。
|
||||
|
||||
## 发布前验证
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ aliyun:
|
||||
|
||||
必须执行版本变更 SQL:
|
||||
|
||||
MinIO 三副本对象存储所需表结构已经并入 `docs/scripts/sql/init/FingertipDesigner.sql`。开发、测试和上线空库只执行该初始化 SQL。
|
||||
MinIO 三副本对象存储所需表结构已经并入端侧初始化 SQL。店务端执行 `docs/scripts/sql/init/jayucloud-salon.sql`,设计师端执行 `docs/scripts/sql/init/jayucloud-artlist.sql`。
|
||||
|
||||
该脚本会新增 `t_object_storage_file_replica`,并为历史文件生成 `MINIO`、`QINIU_KODO`、`ALIYUN_OSS` 三类副本记录。已有成功副本不会被覆盖,缺失副本会进入待上传状态,由重试任务补齐。
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Salon 生产 Gitea 流水线配置说明
|
||||
|
||||
## 工作流
|
||||
|
||||
- `.gitea/workflows/salon-prod-prepare.yml`:仅在 `sit` 来源的 PR 合并到 `prod` 后自动运行,构建后端、前端和 SQL 归档并上传 Artifact,不修改生产环境。
|
||||
- `.gitea/workflows/salon-prod-deploy.yml`:仅支持手工运行,填写准备工作流运行 ID 和合并提交 SHA 后,下载对应 Artifact 并执行生产发布。
|
||||
|
||||
## prod 分支保护
|
||||
|
||||
在 Gitea 仓库的 Branches/Protected branches 中为 `prod` 配置:
|
||||
|
||||
- 禁止直接 push;
|
||||
- 仅允许 Pull Request 合并;
|
||||
- 合并来源分支限制为 `sit`;
|
||||
- 至少一名审批人,并要求状态检查 `Salon 生产发布准备 / prepare` 成功。
|
||||
|
||||
## Runner
|
||||
|
||||
Runner 标签为 `jayucloud`,需要预装或可用:Node.js 20、JDK 17、Maven、npm、tar、PowerShell 7、OpenSSH client。人工发布阶段还必须能访问生产 Nacos、6 台 Salon 后端服务器和阿里云 NGINX 主机。
|
||||
|
||||
## Secrets
|
||||
|
||||
仓库 Actions Secrets 需要配置:
|
||||
|
||||
- `SALON_PROD_SSH_PRIVATE_KEY`:仅用于生产发布的 SSH 私钥;
|
||||
- `SALON_PROD_KNOWN_HOSTS`:6 台后端和阿里云 NGINX 的固定主机指纹;
|
||||
- `SALON_PROD_WEB_HOST`、`SALON_PROD_WEB_PORT`、`SALON_PROD_WEB_USER`、`SALON_PROD_WEB_DIR`:阿里云 NGINX 实际目标信息;
|
||||
- `GITHUB_TOKEN`:用于下载准备工作流 Artifact(由 Gitea 自动提供)。
|
||||
|
||||
SSH 私钥必须对应后端节点和 Web 节点上的部署公钥,禁止把 root 密码写入工作流或 Secrets。生产 Nacos 认证和应用启动所需运行时变量应通过受控的服务环境文件或 Gitea Secrets 注入,不能写入仓库。
|
||||
|
||||
## 发布边界
|
||||
|
||||
自动准备阶段不连接生产 SSH、不发布 Nacos、不重启服务、不执行 SQL。人工发布阶段跳过数据库初始化;SQL 仅作为 Artifact 附件,由 DBA 按版本化迁移规则人工执行并记录。
|
||||
|
||||
首次人工发布前,需在 6 台后端完成 `jc-salon-core`、`jc-salon-gateway` 服务单元及运行时环境文件初始化;人工发布工作流使用 `-RequireSystemd`,缺少服务单元会直接失败,不会退回后台进程模式。还需确认阿里云 NGINX 已使用 `/opt/jc-salon-frontend/current` 或等价目录作为 Salon 站点根目录。
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
- Nacos 或本地 `spring.datasource.url` 必须指向 `jdbc:mysql://<host>:<port>/FingertipDesigner`。
|
||||
- Core 与 Gateway 默认 Nacos 命名空间为 `FingertipDesigner`,如需连接其他环境必须显式设置 `NACOS_NAMESPACE`。
|
||||
- MySQL 中必须存在 `FingertipDesigner` 数据库;首次部署可执行 `docs/scripts/sql/init/FingertipDesigner.sql`。
|
||||
- 开发、测试和上线空库只执行 `docs/scripts/sql/init/FingertipDesigner.sql`;已部署生产库如需调整库名,需要单独制定生产迁移方案。
|
||||
- MySQL 中必须存在目标端数据库:店务端为 `jayucloud_salon`,设计师端为 `jayucloud_artlist`;首次部署执行对应端侧初始化 SQL。
|
||||
- 开发、测试和上线空库分别执行 `docs/scripts/sql/init/jayucloud-salon.sql` 或 `docs/scripts/sql/init/jayucloud-artlist.sql`;已部署生产库如需调整库名,需要单独制定生产迁移方案。
|
||||
|
||||
## 注意事项
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Dev 与 SIT Nacos 自动发布设计
|
||||
|
||||
## 目标
|
||||
|
||||
推送到 `dev` 或 `sit` 分支后自动发布对应环境的 Nacos 配置;生产发布继续保持手工控制,避免普通开发提交影响生产环境。
|
||||
|
||||
## 方案
|
||||
|
||||
在现有 `.gitea/workflows/publish-nacos.yml` 中增加 `push` 触发器,仅监听 `dev`、`sit` 两个分支。发布步骤通过事件输入或当前分支名确定 `NACOS_ENVIRONMENT`:手工触发优先使用 `workflow_dispatch` 的环境输入,推送触发使用 `github.ref_name`。
|
||||
|
||||
现有发布脚本、Nacos Secrets、配置目录扫描、发布后回读校验均保持不变。`workflow_dispatch` 继续提供 `dev`、`sit`、`prod-center1`、`prod-center2`、`prod-both` 选项,因此生产只能手工发布。
|
||||
|
||||
## 验证
|
||||
|
||||
检查工作流 YAML 结构和触发分支,确认环境表达式在两类事件下均有值;检查文档与工作流行为一致;提交前运行 GitNexus `detect_changes()` 确认仅影响发布工作流及运维说明。
|
||||
@@ -0,0 +1,55 @@
|
||||
# Salon 生产分支自动准备与人工发布设计
|
||||
|
||||
## 目标
|
||||
|
||||
实现 `sit` 合并到 `prod` 后自动准备 Salon 全量发布包,并保留最终生产发布的人工作业确认。发布范围包括 Core、Gateway、Nacos 配置和阿里云 NGINX 上的 Salon 前端;数据库 SQL 只归档和提示,不由流水线执行。
|
||||
|
||||
## 分支与触发
|
||||
|
||||
- Gitea `prod` 分支启用保护,禁止直接 push,仅允许 Pull Request 合并。
|
||||
- Pull Request 的源分支必须是 `sit`;工作流在事件上下文和提交历史上再次校验源分支,校验失败立即停止。
|
||||
- `prod-prepare.yml` 监听 `push` 到 `prod`,自动准备发布包。
|
||||
- `prod-deploy.yml` 只允许 `workflow_dispatch`,人工输入要发布的提交号或选择对应 Artifact。
|
||||
|
||||
## 自动准备工作流
|
||||
|
||||
准备工作流运行在具备 Node.js、JDK、Maven 和 PowerShell 的 Gitea Runner 上,步骤为:
|
||||
|
||||
1. 检出合并后的 `prod` 提交并校验来源为 `sit`。
|
||||
2. 构建 `JC-Salon-Core`、`JC-Salon-Gateway` 和 `JC-Salon-Frontend`。
|
||||
3. 扫描并校验 `jayucloud-salon` 生产 Nacos 配置,不打印敏感值。
|
||||
4. 生成 Core/Gateway JAR、前端静态资源归档、manifest 和校验摘要。
|
||||
5. 生成 SQL 归档供人工执行,但不连接生产数据库。
|
||||
6. 将发布包上传为带提交号的 Actions Artifact,并输出人工发布工作流入口。
|
||||
|
||||
准备阶段不连接生产 SSH、不修改 Nacos、不写入 NGINX、不重启服务。
|
||||
|
||||
## 人工发布工作流
|
||||
|
||||
人工工作流下载指定提交的 Artifact,并按固定顺序执行:
|
||||
|
||||
1. 发布并回读校验 `jayucloud-salon` 生产 Nacos 配置。
|
||||
2. Core 三节点逐台备份当前 JAR、上传新 JAR、重启 `jc-salon-core` 并检查 `/health/check`。
|
||||
3. Gateway 三节点逐台备份当前 JAR、上传新 JAR、重启 `jc-salon-gateway` 并检查 `/health/check`。
|
||||
4. 上传前端归档到阿里云 NGINX 目标机,切换发布目录,运行 `nginx -t` 后 reload。
|
||||
5. 检查 Salon 公网健康接口和业务接口。
|
||||
|
||||
每个阶段失败立即停止后续节点;远端保留按提交号命名的 release、backup 和日志目录。回滚通过重新选择上一成功 Artifact 执行同一人工发布工作流。
|
||||
|
||||
## 凭据与网络
|
||||
|
||||
- Gitea Secrets 只保存 Nacos 账号、SSH 私钥、SSH known_hosts、阿里云 NGINX 连接信息和必要的发布参数。
|
||||
- 不在工作流、仓库文件、Artifact 或日志中保存 root 密码、Nacos 密码、AccessKey 或私钥明文。
|
||||
- Runner 必须能访问生产 Nacos、6 台后端服务器和阿里云 NGINX 主机;网络检查作为发布前置步骤。
|
||||
- 后端 systemd 服务单元 `jc-salon-core`、`jc-salon-gateway` 需在首次发布前完成一次性初始化。
|
||||
- 阿里云 NGINX 的实际 IP、SSH 端口和部署目录必须以资产清单确认,不能沿用脚本默认地址。
|
||||
|
||||
## 数据库边界
|
||||
|
||||
生产 SQL 仅作为 Artifact 附件和人工执行提示,不在任何自动或人工应用发布步骤中调用 MySQL。数据库变更必须使用独立版本化 SQL,并记录目标库、执行人、时间和校验结果。
|
||||
|
||||
## 验证
|
||||
|
||||
- 对准备工作流验证:分支来源校验、三端构建、Artifact 文件清单、SHA-256 和敏感信息不回显。
|
||||
- 对发布工作流验证:先在非生产或 DryRun 模式检查 SSH、Nacos、systemd、NGINX 目标;再逐节点验证服务状态、JAR SHA-256、健康接口和公网接口。
|
||||
- 发布前运行 GitNexus `detect_changes`,确认工作流、脚本和文档变更范围符合预期。
|
||||
@@ -1,53 +0,0 @@
|
||||
# 指尖管理师上线检查清单(2026-06-24 更新)
|
||||
|
||||
## 总体结论
|
||||
|
||||
- [ ] 当前可上线
|
||||
- [x] 当前仍需完成部署前验证
|
||||
- [ ] 高风险修复后可灰度
|
||||
- [ ] 中低风险可带风险上线
|
||||
|
||||
## 初始化 SQL
|
||||
|
||||
- [x] 唯一初始化脚本入口:`docs/scripts/sql/init/FingertipDesigner.sql`
|
||||
- [x] 已明确开发、测试、上线空库只执行该 SQL
|
||||
- [x] 已删除旧迁移 SQL,历史变更已合并进初始化基线
|
||||
- [x] 已保留一名平台管理员 `xiaowang`
|
||||
- [x] 已保留完整权限字典和管理员全量授权
|
||||
- [x] 已保留协议、系统参数、MessageHub、VIP 基础配置
|
||||
- [x] 已合并 `t_object_storage_file_replica`
|
||||
- [x] 已合并 `t_product.front_visible`
|
||||
- [x] 已合并 `t_product.source_type`
|
||||
- [x] 已确认 `t_messagehub_push_config.source_system` 使用 `fingertipdesigner`
|
||||
- [ ] 需在可直连 MySQL 的环境创建临时库并全量执行 `FingertipDesigner.sql`
|
||||
- [ ] 需记录 fresh install 执行耗时、warning、失败语句和最终表结构
|
||||
- [ ] 需确认生产 MySQL `lower_case_table_names` 与库名大小写策略
|
||||
|
||||
## 后端 FD-Core
|
||||
|
||||
- [x] manager 边界目标测试通过:`AdminManagerControllerTest`
|
||||
- [ ] 需跑全量 `rtk mvn -f FD-Core/pom.xml test`
|
||||
- [ ] 需确认全量测试失败是否与本轮 SQL/manager 改动相关
|
||||
- [ ] 需用生产或预发配置启动 Core 并验证 MySQL、Redis、RabbitMQ、对象存储连接
|
||||
|
||||
## 后端 FD-Gateway
|
||||
|
||||
- [x] manager 路由测试通过:`AuthGlobalFilterWhitelistTest`
|
||||
- [ ] 需跑全量 `rtk mvn -f FD-Gateway/pom.xml test`
|
||||
- [ ] 需启动 Gateway 验证 `/api/admin/manager/**` 可正确转发到 Core
|
||||
|
||||
## 指尖管理师小程序
|
||||
|
||||
- [x] 核心 API 已迁移到 `/manager/**` 方向
|
||||
- [x] JS 静态语法检查通过
|
||||
- [ ] 需用微信开发者工具跑登录、规划、客户、员工、排班、店铺设置冒烟
|
||||
- [ ] 需确认 `project.config.json` appid 改动是否属于当前发布配置
|
||||
|
||||
## 上线门槛
|
||||
|
||||
- [ ] 初始化 SQL 临时库执行成功
|
||||
- [ ] Core/Gateway 全量测试完成
|
||||
- [ ] 小程序核心链路冒烟完成
|
||||
- [ ] Nacos、MySQL、Redis、RabbitMQ、对象存储生产配置核对完成
|
||||
- [ ] GitNexus `detect_changes(scope="all")` 完成;若 MCP 不可用,需记录原因
|
||||
- [ ] 回滚方案和数据库备份方案确认
|
||||
@@ -1,297 +0,0 @@
|
||||
# 指尖管理师上线部署审计报告(2026-06-22)
|
||||
|
||||
## 审计结论
|
||||
|
||||
结论:**阻断上线**。
|
||||
|
||||
后端 `FD-Core`、`FD-Gateway` 当前可以通过测试和打包,初始化 SQL 与后端实体的主体覆盖关系较完整;但指尖管理师小程序 `FM-Wechat-Fronted` 仍存在生产域名硬编码为本机地址、与 Gateway 路由契约不一致、多个核心页面在接口失败时静默展示 mock/static 数据、门店设置/导出/客户详情等功能未接入真实后端的问题。这些问题会导致真实部署后登录注册、规划、客户、员工、商品、门店设置、导出等核心链路不可用或展示假数据,因此不建议上线。
|
||||
|
||||
## 审计范围
|
||||
|
||||
- 初始化脚本:`docs/scripts/sql/init/FingertipDesigner.sql`
|
||||
- 后端服务:`FD-Core`、`FD-Gateway`
|
||||
- 指尖管理师小程序:`FM-Wechat-Fronted`
|
||||
- GitNexus:索引时间为 2026-06-16,仅用于辅助导航;结论以当前文件系统源码和本轮命令输出为准。
|
||||
|
||||
## 2026-06-24 SQL 基线修订
|
||||
|
||||
- `docs/scripts/sql/init/FingertipDesigner.sql` 已调整为唯一初始化 SQL,开发、测试、上线空库初始化均以该文件为准。
|
||||
- 旧项目命名、MinIO 三副本对象存储、预约手动项目展示控制等历史变更已合并进初始化基线。
|
||||
- `docs/scripts/sql/migrations` 当前不再保留历史迁移 SQL;本轮开发环境测试不再要求额外执行迁移脚本。
|
||||
- 已部署生产库不能直接执行初始化 SQL;如果需要升级已有库,必须单独制定迁移方案并人工确认。
|
||||
- 原报告中的增量脚本补齐建议已被本次基线策略取代。
|
||||
|
||||
## 执行摘要
|
||||
|
||||
| 类别 | 结论 | 证据 |
|
||||
| --- | --- | --- |
|
||||
| SQL 完整度 | 主体完整,但存在部署方式风险 | 当前 MySQL `fingertipdesigner` 有 54 张表、323 个索引、所有表有主键;静态解析 54 个 `@TableName` 实体与 54 张表无缺失 |
|
||||
| SQL 合理性 | 可用于空库初始化,不适合直接重复执行 | `FingertipDesigner.sql` 固定 `CREATE DATABASE IF NOT EXISTS fingertipdesigner` 和 `use fingertipdesigner`,前置 `create table t_balance` 等不是全部 `IF NOT EXISTS` |
|
||||
| SQL 兼容性 | 有大小写和排序规则风险 | 后端默认 datasource 写 `FingertipDesigner`,SQL/当前库为 `fingertipdesigner`;当前 4 张表为 `utf8mb4_general_ci`,其余为 `utf8mb4_unicode_ci` |
|
||||
| 后端构建 | 通过 | `FD-Core mvn test` 131 个测试通过;`FD-Gateway mvn test` 4 个测试通过;两者 `mvn package -DskipTests` 成功 |
|
||||
| 后端/数据库匹配 | 主体匹配 | SQL 表与实体表名覆盖一致;`FingertipDesignerSqlSchemaTest` 覆盖对象存储、运营表、权限、默认密码等关键脚本片段 |
|
||||
| Gateway 契约 | 阻断 | Gateway 支持 `/api/admin/**`、`/admin/api/**`、`/admin/auth/**`,小程序默认请求 `/admin/planning`、`/admin/user`、`/admin/product` 等路径 |
|
||||
| 小程序逻辑 | 阻断 | 多个核心页接口失败后使用 `utils/mock` 或静态数据,生产环境会隐藏后端故障并展示假数据 |
|
||||
| 小程序发布配置 | 阻断 | `utils/config.js` 默认 `http://127.0.0.1:80`;`project.config.json` 和 `project.private.config.json` 均关闭 `urlCheck` |
|
||||
| 自动化冒烟 | 受环境阻塞 | 微信开发者工具 automator 可连,但当前会话页为 `pages/auth/index`,而本项目 `app.json` 首页为 `pages/login/index`;导航到 `pages/login/index`、`pages/planning/index` 均返回 page not found |
|
||||
|
||||
## 验证记录
|
||||
|
||||
### SQL 与数据库
|
||||
|
||||
- MySQL MCP 可访问的实例版本:MySQL 5.7.44。
|
||||
- 当前业务库:`fingertipdesigner`。
|
||||
- 当前库结构:54 张表、323 个索引、0 张无主键表。
|
||||
- 排序规则:50 张表为 `utf8mb4_unicode_ci`,4 张表为 `utf8mb4_general_ci`,分别是 `t_legal_agreement`、`t_security_audit_log`、`t_system_parameter_config`、`t_user_agreement_consent`。
|
||||
- 关键初始化数据:`t_permission` 77 行、`t_user` 5 行、`t_system_parameter_config` 5 行、`t_legal_agreement` 2 行、`t_messagehub_push_config` 6 行。
|
||||
- 临时库执行:已尝试用 JDBC 在本机创建 `fingertip_designer_deploy_check_20260622` 并执行脚本;`127.0.0.1:3306` 连接被拒绝,MySQL MCP 暴露的主机名 `a7437d06c91b` 在本机不可解析。已通过 MCP 执行 `DROP DATABASE IF EXISTS fingertip_designer_deploy_check_20260622` 清理同名临时库。该项未完成全量新库执行,需在可直连 MySQL 的部署机或 CI 中补跑。
|
||||
|
||||
### 后端构建与测试
|
||||
|
||||
- `FD-Core`: `mvn test` 成功,Tests run: 131, Failures: 0, Errors: 0, Skipped: 0。
|
||||
- `FD-Gateway`: `mvn test` 成功,Tests run: 4, Failures: 0, Errors: 0, Skipped: 0。
|
||||
- `FD-Core`: `mvn package -DskipTests` 成功,产物 `docs/product/FingertipDesigner-Core.jar`,约 82.1 MB。
|
||||
- `FD-Gateway`: `mvn package -DskipTests` 成功,产物 `docs/product/FingertipDesigner-Gateway.jar`,约 47.5 MB。
|
||||
- `FM-Wechat-Fronted`: 31 个 JS 文件执行 `node --check` 通过,无 JS 语法错误。
|
||||
|
||||
### 小程序自动化
|
||||
|
||||
- `mp_ensureConnection` 曾连接到历史管理师小程序工程的 automator,会话显示 SDKVersion 3.15.2。
|
||||
- 当前 automator 会话页为 `pages/auth/index`,但 `FM-Wechat-Fronted/app.json` 注册页面为 `pages/login/index`、`pages/register/index`、`pages/planning/index` 等 19 个页面,不包含 `pages/auth/index`。
|
||||
- `mp_navigate` 到 `pages/login/index` 和 `pages/planning/index` 均失败:`page is not found`。
|
||||
- 结论:本轮无法用当前开发者工具会话完成真实页面冒烟,该自动化环境不能作为上线通过证据。
|
||||
|
||||
## 阻断问题
|
||||
|
||||
### 1. 小程序默认请求本机地址,无法发布到生产
|
||||
|
||||
严重级别:阻断上线。
|
||||
|
||||
证据:
|
||||
|
||||
- `FM-Wechat-Fronted/utils/config.js:1`:`DEFAULT_DOMAIN = 'http://127.0.0.1:80'`
|
||||
- `FM-Wechat-Fronted/utils/config.js:5`:`ADMIN_API_BASE_URL: ${DEFAULT_DOMAIN}/admin`
|
||||
- `FM-Wechat-Fronted/project.config.json:10`:`urlCheck: false`
|
||||
- `FM-Wechat-Fronted/project.private.config.json:6`:`urlCheck: false`
|
||||
|
||||
影响:
|
||||
|
||||
- 真机和线上小程序会请求用户设备自己的 `127.0.0.1`,不会请求生产服务。
|
||||
- 微信发布要求服务端域名配置和 HTTPS 域名校验,关闭 `urlCheck` 只能用于开发阶段。
|
||||
|
||||
建议:
|
||||
|
||||
- 引入明确的环境构建配置,生产包使用 HTTPS 生产域名。
|
||||
- 提交审核前恢复域名校验,并在微信公众平台配置合法 request 域名。
|
||||
- 将小程序默认后台 API 前缀统一为 Gateway 可识别路径,例如 `/api/admin`,或在 Gateway/Nginx 明确支持 `/admin/**`。
|
||||
|
||||
### 2. 小程序后台 API 前缀与 Gateway 路由不匹配
|
||||
|
||||
严重级别:阻断上线。
|
||||
|
||||
证据:
|
||||
|
||||
- Gateway `FD-Gateway/src/main/resources/application.yaml:101` 支持 `/api/admin/**` 并重写到 `/admin/**`。
|
||||
- Gateway `FD-Gateway/src/main/resources/application.yaml:109` 支持 `/admin/api/**` 并重写到 `/admin/**`。
|
||||
- Gateway `FD-Gateway/src/main/resources/application.yaml:116` 仅兼容 `/admin/auth/**`。
|
||||
- 小程序默认 baseUrl 是 `${DEFAULT_DOMAIN}/admin`,因此 `api/planning.js` 的 `planning/calendar` 会变成 `/admin/planning/calendar`。
|
||||
- 后端 Core 有 `AdminPlanningController @RequestMapping("/admin/planning")`,但 Gateway 没有 `/admin/planning/**` 路由。
|
||||
|
||||
影响:
|
||||
|
||||
- 如果生产流量走 Gateway,小程序除 `/admin/auth/**` 外的大部分后台接口会 404 或无法路由:规划、员工、排班、客户、商品、门店、库存、营销等均受影响。
|
||||
|
||||
建议:
|
||||
|
||||
- 优先调整小程序 `ADMIN_API_BASE_URL` 为生产域名加 `/api/admin`。
|
||||
- 或 Gateway 增加清晰的 `/admin/**` 后台路由,并确保鉴权、白名单、跨域、安全策略一致。
|
||||
- 修复后至少对登录、注册、规划日历、创建预约、员工列表、客户列表、商品列表、门店设置进行接口级冒烟。
|
||||
|
||||
### 3. Gateway 白名单缺少管理师注册接口
|
||||
|
||||
严重级别:阻断上线。
|
||||
|
||||
证据:
|
||||
|
||||
- 后端 Core 存在 `AdminAuthController @RequestMapping("/admin/auth")` 和 `@PostMapping("/register")`。
|
||||
- Gateway 默认白名单包含 `/api/admin/auth/login`、`/admin/auth/login`、`/admin/api/auth/login`,但未包含 `/admin/auth/register` 或 `/api/admin/auth/register`。
|
||||
- 小程序 `api/auth.js` 注册调用 `auth/register`,在当前 baseUrl 下会请求 `/admin/auth/register`。
|
||||
|
||||
影响:
|
||||
|
||||
- 生产若通过 Gateway,未登录用户调用注册会被鉴权过滤器拦截。
|
||||
|
||||
建议:
|
||||
|
||||
- 明确注册是否开放。如果开放,将注册、验证码、协议等未登录接口加入 Gateway/Core 双侧白名单。
|
||||
- 如果注册不开放,前端必须移除或隐藏注册入口,并给出受控邀请/开户注册流程。
|
||||
|
||||
### 4. 核心页面在接口失败后展示 mock/static 数据
|
||||
|
||||
严重级别:阻断上线。
|
||||
|
||||
证据:
|
||||
|
||||
- `FM-Wechat-Fronted/pages/planning/index.js:135`:日历接口失败后 `applyCalendar(mock.buildCalendar(...))`。
|
||||
- `FM-Wechat-Fronted/pages/appointment-form/index.js:40`、`:50`:商品接口失败后使用 `fallbackProducts`。
|
||||
- `FM-Wechat-Fronted/pages/appointment-form/index.js:117`:排班接口失败后使用 `mock.buildCalendar(...)` 做冲突判断。
|
||||
- `FM-Wechat-Fronted/pages/appointment-detail/index.js:22`:详情失败后使用 mock 预约。
|
||||
- `FM-Wechat-Fronted/pages/customers/index.js:20`、`:37`:客户列表失败后使用 fallback 客户。
|
||||
- `FM-Wechat-Fronted/pages/employees/index.js:14`、`:33`:员工列表失败后使用 mock 员工。
|
||||
- `FM-Wechat-Fronted/pages/employee-detail/index.js:10`、`:11`:员工详情使用 mock 员工。
|
||||
|
||||
影响:
|
||||
|
||||
- 后端不可用、权限错误、字段错配时,门店人员会看到假预约、假客户、假员工、假可用档期。
|
||||
- 预约冲突判断可能基于 mock 数据放行,造成超卖或错排。
|
||||
- 线上问题会被前端静默掩盖,排障困难。
|
||||
|
||||
建议:
|
||||
|
||||
- 生产代码中移除 mock 兜底;接口失败必须展示明确错误、重试入口和空状态。
|
||||
- mock 数据仅允许通过显式开发环境开关启用,且生产构建强制关闭。
|
||||
- 对规划、预约、客户、员工页面增加真实接口冒烟或 E2E。
|
||||
|
||||
### 5. 门店设置、导出、客户详情未接入真实后端
|
||||
|
||||
严重级别:阻断上线。
|
||||
|
||||
证据:
|
||||
|
||||
- `FM-Wechat-Fronted/api/shop.js:6`、`:12` 调用 `/shops/current`,但 `AdminShopController` 仅提供 `/list`、`/create`、`/update/{id}`、`/delete/{id}`、`/status/{id}`、`/list/all`、`/{id}`。
|
||||
- `FM-Wechat-Fronted/api/shop.js:20` 调用 `/export`,后端控制器扫描未发现 `admin/export` 或 `/export` 后台导出入口。
|
||||
- `FM-Wechat-Fronted/pages/shop-settings/index.js` 没有调用 `api/shop.js`,保存只 `wx.showToast`。
|
||||
- `FM-Wechat-Fronted/pages/export/index.js` 导出只 `wx.showToast`。
|
||||
- `FM-Wechat-Fronted/api/customers.js` 定义 `/user/detail/${id}`,但 `AdminUserController` 未提供 `/detail/{id}`;`pages/customer-detail/index.js` 使用静态客户和订单数据。
|
||||
|
||||
影响:
|
||||
|
||||
- 设置、导出、客户详情属于管理师上线必用功能,当前无法真实保存、导出或查看真实明细。
|
||||
|
||||
建议:
|
||||
|
||||
- 明确功能是否纳入本次上线。纳入则补齐后端接口和前端接入;不纳入则从小程序入口、菜单、路由中下线。
|
||||
- 对每个入口建立接口契约表:URL、方法、鉴权、请求体、响应字段、错误态。
|
||||
|
||||
## 高风险问题
|
||||
|
||||
### 6. 初始化 SQL 与默认 datasource 库名大小写不一致
|
||||
|
||||
严重级别:高风险需修复。
|
||||
|
||||
证据:
|
||||
|
||||
- `FingertipDesigner.sql` 创建并使用 `fingertipdesigner`。
|
||||
- `FD-Core/src/main/resources/application.yaml:3` 默认连接 `jdbc:mysql://localhost:3306/FingertipDesigner`。
|
||||
- MySQL MCP 当前库名为 `fingertipdesigner`。
|
||||
|
||||
影响:
|
||||
|
||||
- Linux MySQL 上数据库名大小写可能敏感,默认配置与初始化库名不一致会导致服务连错库或启动失败。
|
||||
|
||||
建议:
|
||||
|
||||
- 统一初始化 SQL、Nacos datasource、应用默认配置和部署文档中的库名。
|
||||
- 生产环境优先通过 Nacos/环境变量显式配置,不依赖本地默认值。
|
||||
|
||||
### 7. 增量迁移链缺失,不满足已有库升级要求
|
||||
|
||||
严重级别:高风险需修复。
|
||||
|
||||
证据:
|
||||
|
||||
- `docs/scripts/sql/migrations` 当前仅有 `.gitkeep`。
|
||||
- `FingertipDesigner.sql` 注释仍提到历史增量脚本用于已有数据库升级。
|
||||
- 项目规则要求后端涉及 SQL 时不要修改初始化 SQL,必须新增版本变更 SQL。
|
||||
|
||||
影响:
|
||||
|
||||
- 空库部署可以依赖初始化 SQL,但已有环境升级缺少可审计、可回放的版本变更脚本。
|
||||
- 如果直接对已有库执行初始化 SQL,前置非 `IF NOT EXISTS` 建表语句存在失败风险。
|
||||
|
||||
建议:
|
||||
|
||||
- 恢复或新增本次上线对应的版本变更 SQL,文件名使用中文、体现功能和日期,内容完整可执行。
|
||||
- 初始化 SQL 只作为空库入口,已有库必须走迁移脚本。
|
||||
|
||||
### 8. 表排序规则不完全一致
|
||||
|
||||
严重级别:中风险。
|
||||
|
||||
证据:
|
||||
|
||||
- 50 张表为 `utf8mb4_unicode_ci`,4 张表为 `utf8mb4_general_ci`。
|
||||
|
||||
影响:
|
||||
|
||||
- 跨表字符串比较、唯一约束、排序、模糊搜索可能出现边界差异。
|
||||
|
||||
建议:
|
||||
|
||||
- 统一表级和字段级排序规则,至少对系统配置、协议、审计等新增表给出明确排序规则。
|
||||
|
||||
### 9. 部署配置仍保留测试/默认依赖值
|
||||
|
||||
严重级别:高风险需修复。
|
||||
|
||||
证据:
|
||||
|
||||
- `FD-Core/src/main/resources/bootstrap.yaml` 和 `FD-Gateway/src/main/resources/bootstrap.yaml` 默认 `NACOS_NAMESPACE` 为 `FingertipDesigner-Test`。
|
||||
- Nacos 默认用户名/密码写在配置文件默认值中。
|
||||
- `FD-Core/src/main/resources/application.yaml` 对象存储主提供方为 `QINIU_KODO`,但 `QINIU_KODO_ACCESS_KEY`、`SECRET_KEY`、`BUCKET_NAME`、`DOMAIN`、`ZONE` 默认空。
|
||||
- Core 依赖 MySQL、Redis、RabbitMQ、对象存储;Gateway 依赖 Nacos、Redis 和服务发现。
|
||||
|
||||
影响:
|
||||
|
||||
- 生产环境若未显式覆盖,会连到测试命名空间或因对象存储缺配置导致上传/签名失败。
|
||||
|
||||
建议:
|
||||
|
||||
- 发布前输出生产环境变量清单,并在启动脚本或部署平台强制校验必填项。
|
||||
- 清理配置文件中的敏感默认值,避免误用。
|
||||
|
||||
## 后端与数据库匹配评估
|
||||
|
||||
### 匹配良好的部分
|
||||
|
||||
- 初始化 SQL 与实体表名覆盖一致:54 张 SQL 表与 54 个 `@TableName` 实体无缺失。
|
||||
- 关键业务表存在:预约 `t_appointment_reservation`、员工排班 `t_artist_schedule`、员工信息 `t_nail_artist_info`、客户/用户 `t_user`、门店 `t_shop`、角色权限 `t_shop_role`/`t_shop_role_permission`/`t_user_shop_role`、协议 `t_legal_agreement`、审计 `t_security_audit_log`、系统参数 `t_system_parameter_config`。
|
||||
- 预约规划 DTO/VO 与前端主要字段基本一致:`PlanningAppointmentCreateDTO` 包含 `customerName`、`phone`、`productId`、`artistId`、`appointmentDate`、`appointmentTime`、`durationMinutes`、`clientRequestId`;`PlanningCalendarVO` 返回 `businessStartTime`、`businessEndTime`、`artists`、`schedules`、`appointments`、`daySummaries`。
|
||||
- Core 的 SQL schema 测试覆盖了对象存储字段、运营表、权限、默认密码、用户资料字段等初始化脚本片段。
|
||||
|
||||
### 仍需补测的部分
|
||||
|
||||
- 本轮未能完成新建临时库全量执行,因此没有 fresh install 的执行耗时、warning 和失败语句记录。
|
||||
- 未启动 Core/Gateway 进行真实 HTTP 冒烟,因为外部 Nacos/Redis/RabbitMQ/对象存储生产依赖未在本轮确认可用。
|
||||
- 未完成小程序真实页面 E2E,因为开发者工具 automator 当前会话与 `FM-Wechat-Fronted/app.json` 页面不一致。
|
||||
|
||||
## 小程序接口契约评估
|
||||
|
||||
| 小程序调用 | 期望后端 | 当前状态 | 风险 |
|
||||
| --- | --- | --- | --- |
|
||||
| `/admin/auth/login` | Core 存在,Gateway 兼容且白名单放行 | 基本匹配 | 需生产域名验证 |
|
||||
| `/admin/auth/register` | Core 存在 | Gateway 白名单未放行 | 注册失败 |
|
||||
| `/admin/planning/calendar` | Core 存在 | Gateway 无 `/admin/planning/**` 路由 | 日历失败,前端展示 mock |
|
||||
| `/admin/planning/appointments` | Core 存在 | Gateway 无路由 | 创建预约失败 |
|
||||
| `/admin/nail-artist/list` | Core 存在 | Gateway 无 `/admin/nail-artist/**` 路由 | 员工列表失败,前端展示 mock |
|
||||
| `/admin/artist-schedule/list` | Core 存在 | Gateway 无 `/admin/artist-schedule/**` 路由 | 排班失败 |
|
||||
| `/admin/user/list` | Core 存在 | Gateway 无 `/admin/user/**` 路由 | 客户列表失败,前端展示 fallback |
|
||||
| `/admin/user/detail/{id}` | Core 未发现 | 前端 API 定义但页面未真实使用 | 客户详情是假数据 |
|
||||
| `/admin/product/list` | Core 存在 | Gateway 无 `/admin/product/**` 路由 | 商品列表失败,预约表单展示 fallback |
|
||||
| `/admin/shops/current` | Core 未发现 | 前端 API 调用但页面未真实接入 | 门店设置不可用 |
|
||||
| `/admin/export` | Core 未发现 | 页面只 toast | 导出不可用 |
|
||||
|
||||
## 上线判断
|
||||
|
||||
当前状态不满足上线部署条件。建议将以下问题作为上线前硬门禁:
|
||||
|
||||
1. 修复小程序生产域名和 Gateway 路由前缀。
|
||||
2. 明确并修复注册白名单策略。
|
||||
3. 移除生产 mock/static 兜底,改为真实错误态。
|
||||
4. 补齐或下线门店设置、导出、客户详情等未接入功能。
|
||||
5. 在可直连 MySQL 的环境全量执行 `FingertipDesigner.sql` 到临时库,并记录 warning。
|
||||
6. 验证唯一初始化 SQL 已包含全部上线所需表、字段、索引和运行必需种子数据。
|
||||
7. 用干净的微信开发者工具会话重新打开 `FM-Wechat-Fronted` 并跑核心页面冒烟。
|
||||
8. 以生产 Nacos/Redis/RabbitMQ/MySQL/对象存储配置启动 Core/Gateway 并跑接口冒烟。
|
||||
|
||||
只有以上门禁关闭后,才建议进入灰度或预发布验收。
|
||||
@@ -1,188 +0,0 @@
|
||||
# 指尖设计师三端真实测试报告 20260618
|
||||
|
||||
## 执行概况
|
||||
|
||||
- 测试计划来源:原始测试计划已清理;本报告保留测试结论。
|
||||
- Web 执行方式:Edge DevTools MCP 真实浏览器导航、点击、DOM 读取、截图、Console/Network 检查
|
||||
- Web 环境:`http://127.0.0.1:3000/`
|
||||
- 数据库:`FingertipDesigner`
|
||||
- 管理员账号:`xiaowang / 888888`
|
||||
- 普通测试账号:`quancelianguser / 888888`
|
||||
- 图片策略:仅复用数据库已有图片文件记录和已签名图片地址,未上传新图片
|
||||
- 小程序状态:阻塞,当前线程未暴露微信开发者工具 MCP,未伪造小程序通过结果
|
||||
|
||||
## 本次补造测试数据
|
||||
|
||||
| 类型 | 标识 | 中文数据 |
|
||||
| --- | --- | --- |
|
||||
| 用户 | `326100000000000001` | 全量测试用户,账号 `quancelianguser`,手机号 `18800070029` |
|
||||
| 购物车 | `326100000000000201` | 作品01 x 2 |
|
||||
| 收藏 | `326100000000000202` | 作品02,备注“全量测试收藏备注” |
|
||||
| 订单 | `326100000000000301` / `QLTEST202606180001` | 作品01,测试店铺,美甲师01,金额 156 |
|
||||
| 预约 | `326100000000000303` | 预约确认,关联订单 `QLTEST202606180001` |
|
||||
| 售后 | `326100000000000401` / `ASQLTEST202606180001` | 退款 20,原因“全量测试售后原因” |
|
||||
| 排班 | `326100000000000501` | 美甲师01,2026-06-19 09:00-18:00,“全量测试排班” |
|
||||
| 库存 | `326100000000000601` | 全量测试甲油胶,库存 88 |
|
||||
| 活动 | `326100000000000701` | 全量测试夏日活动 |
|
||||
| 优惠券 | `326100000000000801` | 全量测试优惠券,满 100 减 15 |
|
||||
|
||||
## Web 前台结果
|
||||
|
||||
| 用例 | 模块 | 结果 | 实际结果 |
|
||||
| --- | --- | --- | --- |
|
||||
| WEB-001 | 登录/注册 | 通过 | 使用测试账号进入登录后状态,个人中心、订单、购物车均识别为“全量测试用户” |
|
||||
| WEB-002 | 首页 | 通过 | `/home` 正常展示,无白屏,无明显布局遮挡 |
|
||||
| WEB-003 | 作品列表 | 通过 | `/products` 正常展示作品列表,可滚动,图片可渲染 |
|
||||
| WEB-004 | 作品详情 | 通过 | `/product/325562950938992640` 展示作品、价格、门店和服务信息 |
|
||||
| WEB-005 | 门店详情 | 通过 | `/shop/325517293758889984` 展示测试店铺资料 |
|
||||
| WEB-006 | 设计师主页 | 失败 | `/artist/325562887617585152` 显示“美甲师信息不存在”,但数据库存在该美甲师信息 |
|
||||
| WEB-007 | 未登录拦截 | 通过 | 购物车等受保护页面未登录时跳转登录页 |
|
||||
| WEB-008 | 购物车 | 通过 | `/cart` 显示作品01 x 2、测试店铺、美甲师01、预约时间选择;结算按钮按选择状态控制 |
|
||||
| WEB-009 | 订单列表 | 部分通过 | `/orders` 显示 `QLTEST202606180001`、作品01、美甲师01和金额;但该页截图发现移动壳内内容有横向裁切风险 |
|
||||
| WEB-010 | 订单详情 | 通过 | `/orders/326100000000000301` 展示订单号、测试店铺、作品、美甲师、预约时间、售后记录 |
|
||||
| WEB-011 | 服务进度 | 通过 | `/service-progress?orderId=326100000000000301` 展示订单创建、预约确认、服务安排、售后/评价节点 |
|
||||
| WEB-012 | 售后记录 | 通过 | `/after-sales` 展示 `ASQLTEST202606180001`、退款金额 20、原因“全量测试售后原因” |
|
||||
| WEB-013 | 售后申请 | 通过 | `/after-sale/apply?...` 展示订单、项目、可申请金额、退款类型、原因输入框;未重复提交 |
|
||||
| WEB-014 | 收藏 | 通过 | `/wishlist` 展示作品02、“全量测试收藏备注”,图片签名地址加载成功 |
|
||||
| WEB-015 | 优惠券 | 通过 | `/coupons` 展示“全量测试优惠券”,满 100 减 15,未使用 |
|
||||
| WEB-016 | VIP 中心 | 通过 | `/vip-center` 展示会员等级、余额、充值档位、会员权益,页面可滚动 |
|
||||
| WEB-017 | 消息通知 | 通过 | `/notifications` 展示现有中文消息“店长消息测试”,接口 200 |
|
||||
| WEB-018 | 个人中心/设置 | 通过 | `/profile` 展示全量测试用户、可用券 1、购物车 2;账号设置和密码设置页表单布局正常 |
|
||||
|
||||
## Web 后台结果
|
||||
|
||||
| 用例 | 模块 | 结果 | 实际结果 |
|
||||
| --- | --- | --- | --- |
|
||||
| WEB-019 | 后台登录 | 通过 | `xiaowang / 888888` 登录成功,进入 `/admin/dashboard` |
|
||||
| WEB-020 | 看板 | 通过 | 指标、热门作品、最近动态正常展示 |
|
||||
| WEB-021 | 用户管理 | 通过 | 列表、筛选、分页、操作入口正常展示 |
|
||||
| WEB-022 | 作品管理 | 通过 | 作品列表正常展示;图片使用已有文件记录 |
|
||||
| WEB-023 | 门店管理 | 通过 | 测试店铺正常展示 |
|
||||
| WEB-024 | 美甲师管理 | 通过 | 美甲师01正常展示 |
|
||||
| WEB-025 | 订单管理 | 通过 | `/admin/orders` 表格展示 `QLTEST202606180001`、用户ID、金额、待完成状态 |
|
||||
| WEB-026 | 排班管理 | 通过 | `/admin/schedules` 展示美甲师01、2026-06-19、容量 3、备注“全量测试排班” |
|
||||
| WEB-027 | 售后处理 | 通过 | `/admin/after-sales` 展示 `ASQLTEST202606180001`、退款 20、待处理,审核按钮可见 |
|
||||
| WEB-028 | 库存管理 | 通过 | `/admin/inventory` 展示“全量测试甲油胶”,库存 88,入库/出库入口可见 |
|
||||
| WEB-029 | 活动管理 | 通过 | `/admin/campaigns` 展示“全量测试夏日活动”,状态启用 |
|
||||
| WEB-030 | 优惠券管理 | 通过 | `/admin/coupons` 展示“全量测试优惠券”,满 100 减 15 |
|
||||
| WEB-031 | 权限管理 | 通过 | 权限页面可打开,布局正常 |
|
||||
| WEB-032 | 消息/公告 | 通过 | 消息发布、公告管理页面可打开,布局正常 |
|
||||
| WEB-033 | 协议/参数/VIP配置 | 通过 | 协议管理、参数管理、VIP充值配置页面可打开,布局正常 |
|
||||
|
||||
## 跨端与非功能
|
||||
|
||||
| 项目 | 结果 | 实际结果 |
|
||||
| --- | --- | --- |
|
||||
| Web 用户端到后台订单同步 | 通过 | 同一订单号 `QLTEST202606180001` 在用户订单、订单详情、服务进度、后台订单页一致 |
|
||||
| Web 用户端到后台售后同步 | 通过 | 同一售后单 `ASQLTEST202606180001` 在用户售后记录、服务进度、后台售后处理页一致 |
|
||||
| 排班同步 | 部分通过 | 后台排班存在,美甲师01在购物车可选择;小程序端未测 |
|
||||
| 作品/门店/优惠券同步 | 通过 | 前台作品/门店/优惠券与后台列表数据一致 |
|
||||
| 页面布局 | 部分通过 | 大多数页面无白屏、无不可点击遮挡;订单列表页存在移动壳内横向裁切风险 |
|
||||
| 控制台质量 | 失败 | 后台多个表格 `total` 使用字符串传给 Ant Design Vue 分页,持续触发类型警告 |
|
||||
| 网络请求 | 部分通过 | 主要业务接口 200;订单相关图片曾出现 `/api/file/get/{id}` 401,签名图片地址加载正常 |
|
||||
| 小程序用户端 MP-001 至 MP-035 | 阻塞 | 当前线程无微信开发者工具 MCP,未执行模拟器真实点击和截图 |
|
||||
| 小程序管理师端 FM-001 至 FM-019 | 阻塞 | 当前线程无微信开发者工具 MCP,未执行模拟器真实点击和截图 |
|
||||
| iOS/Android 真机兼容 | 阻塞 | 未提供真机环境 |
|
||||
|
||||
## 主要缺陷
|
||||
|
||||
1. `WEB-006 / INT-004`:数据库存在美甲师 `325562887617585152`,但前台 `/artist/325562887617585152` 显示“美甲师信息不存在”。
|
||||
2. `WEB-009`:用户端订单列表页截图发现内容在手机壳内有横向裁切风险,顶部和卡片边缘显示不如订单详情页稳定。
|
||||
3. 后台多处表格分页 `total` 为字符串,Ant Design Vue 警告“Expected Number, got String”,涉及用户、门店、售后、库存、活动等页面。
|
||||
4. 订单详情/订单列表相关图片曾触发 `/api/file/get/325562654963736576` 401;使用签名 URL 的图片能正常加载,但直接文件接口鉴权行为需要确认。
|
||||
5. 小程序真实测试阻塞:本线程没有微信开发者工具 MCP,无法执行用户小程序和管理师小程序的真实模拟器点击、截图、控制台和网络检查。
|
||||
|
||||
## 结论
|
||||
|
||||
- Web 前台和后台已经用真实 Edge 页面补测,不只是接口检查;缺数据项已补中文测试数据并在页面确认。
|
||||
- Web P0 主链路整体可用,但设计师主页失败、订单列表布局风险、控制台分页警告需要修复。
|
||||
- 小程序和真机兼容未达成执行条件,应保持“阻塞”而不是“通过”。
|
||||
# 2026-06-20 小程序 MCP 补测记录
|
||||
|
||||
## 执行环境
|
||||
|
||||
- 微信开发者工具 MCP 已恢复可用,自动化会话可建立。
|
||||
- 用户端项目:历史测试工程 `FD-WeChat-Fronted`(原路径不再作为当前仓库入口)。
|
||||
- 管理师端项目:历史测试工程 `FM-Wechat-Fronted`(原路径不再作为当前仓库入口)。
|
||||
- 测试方式:微信开发者工具 MCP 真实导航、点击、输入、页面 data 读取、元素布局快照、控制台日志读取。
|
||||
- 测试数据:全部使用中文;管理师端表单输入使用“全量测试客户”“中文测试备注:喜欢浅粉色猫眼款式”。
|
||||
|
||||
## 用户小程序补测
|
||||
|
||||
| 用例 | 模块 | 结果 | 实际结果 |
|
||||
| --- | --- | --- | --- |
|
||||
| MP-001 | 冷启动/首页 | 通过 | `pages/home/index` 可打开,显示“游客模式”“先逛逛喜欢的款式和门店”,无白屏,首页主体、标题、搜索框可定位。 |
|
||||
| MP-002 | TabBar 首页/作品/购物车/我的 | 通过 | 首页、作品、购物车、我的均可切换;作品为空态展示“暂时没有匹配的作品”,购物车和我的展示未登录引导。 |
|
||||
| MP-003 | 登录页 | 通过 | `pages/auth/index` 可打开,显示“登录/注册”“微信手机号一键登录”“其他登录方式”,页面布局正常。 |
|
||||
| MP-004 | 订单未登录态 | 通过 | `pages/orders/index` 展示“登录后查看订单”,未登录保护正常。 |
|
||||
| MP-005 | 售后未登录拦截 | 通过 | 访问 `pages/after-sales/index` 自动跳转登录页,并带 redirect 参数。 |
|
||||
| MP-006 | 服务进度未登录拦截 | 通过 | 访问 `pages/service-progress/index?orderId=326100000000000301` 自动跳转登录页,并带 redirect 参数。 |
|
||||
| MP-007 | 真实业务数据加载 | 阻塞 | 项目缺少 `utils/config.local.js`,默认请求 `http://127.0.0.1:80/api`,微信开发者工具提示 `url not in domain list`,导致作品、订单、购物车等真实接口数据无法加载。 |
|
||||
| MP-008 | 微信手机号登录 | 阻塞 | 当前 DevTools 环境 `wechatMiniSupported=false`,页面提示“当前环境无法使用微信手机号登录,请使用账号密码或验证码登录”。 |
|
||||
|
||||
## 管理师小程序补测
|
||||
|
||||
| 用例 | 模块 | 结果 | 实际结果 |
|
||||
| --- | --- | --- | --- |
|
||||
| FM-001 | 登录页 | 通过 | `pages/login/index` 可打开,账号、密码输入框和“登录/忘记密码/注册账号/微信快捷登录”按钮可见。 |
|
||||
| FM-002 | 规划日历 | 通过 | `pages/planning/index` 可打开,显示 2026 年 6 月规划数据,小王/小李/小张、王女士/陈女士/林女士、纯色美甲/猫眼延长/手部护理等中文业务数据正常。 |
|
||||
| FM-003 | 客户列表 | 通过 | `pages/customers/index` 可打开,页面 data 中客户列表为 3 条中文客户数据。 |
|
||||
| FM-004 | 员工列表 | 通过 | `pages/employees/index` 可打开,员工小王/小李/小张及月订单、金额数据正常。 |
|
||||
| FM-005 | 我的/个人中心 | 通过 | `pages/profile/index` 显示 Fingertip Designer、店长端,以及店铺设置、数据导出、修改密码、关于系统入口。 |
|
||||
| FM-006 | 新建预约表单 | 通过 | `pages/appointment-form/index` 显示客户姓名、手机号、预约日期、预约时间、项目内容、指定员工、备注、容量校验和“保存预约”。中文输入“全量测试客户”“中文测试备注:喜欢浅粉色猫眼款式”能写入并渲染。 |
|
||||
| FM-007 | 预约详情 | 通过 | `pages/appointment-detail/index?id=326100000000000301` 显示王女士、纯色美甲、小王、已确认、时间、确认/完成/取消按钮。 |
|
||||
| FM-008 | 预约改派 | 通过 | `pages/artist-transfer/index?id=326100000000000301` 显示小王可接、小李有冲突、小张已满,以及新日期、新时间和确认改派按钮。 |
|
||||
| FM-009 | 排班设置 | 通过 | `pages/schedule-setting/index` 显示日期、开始时间、结束时间、容量和“保存排班”。 |
|
||||
| FM-010 | 请假管理 | 通过 | `pages/leave-management/index` 显示 1-31 日期、2026-06-12 全天请假、2026-06-25 下午请假和“新增请假”。 |
|
||||
| FM-011 | 店铺设置 | 通过 | `pages/shop-settings/index` 显示 Fingertip Designer、10:00-22:00、默认时长 60、预约规则和“保存设置”。 |
|
||||
| FM-012 | 数据导出 | 通过 | `pages/export/index` 显示订单数据、2026-06-01 至 2026-06-20、导出 Excel。 |
|
||||
| FM-013 | 修改密码 | 通过 | `pages/password/index` 显示原密码、新密码、确认密码和“保存密码”。 |
|
||||
| FM-014 | 关于系统 | 通过 | `pages/about/index` 显示“指尖管理师”、版本 1.0.0、定位“规划 / 客户 / 员工 / 我的”。 |
|
||||
| FM-015 | 颜色设置 | 通过 | `pages/color-setting/index` 显示推荐色、色盘选择、应用、保存颜色;元素快照显示底部按钮位置接近,需要后续截图通道恢复后复核视觉重叠。 |
|
||||
| FM-016 | 客户详情 | 通过 | `pages/customer-detail/index?id=1` 显示王女士、累计订单 12、累计消费 2860、历史订单纯色美甲/猫眼延长/手部护理。 |
|
||||
| FM-017 | 员工详情 | 通过 | `pages/employee-detail/index?id=101` 显示小王、员工色、本月订单 32、本月营业额 5800、排班设置/请假管理/颜色设置/订单记录入口。 |
|
||||
| FM-018 | 员工订单 | 通过 | `pages/employee-orders/index?id=101` 显示纯色美甲、猫眼延长、手部护理 3 条中文订单。 |
|
||||
|
||||
## 本轮新增问题与环境限制
|
||||
|
||||
1. 用户小程序真实数据接口被微信 DevTools 域名限制拦截:`http://127.0.0.1:80/api` 不在合法域名列表,作品、订单、购物车、售后等登录后真实链路无法继续执行。
|
||||
2. 用户小程序微信手机号登录在当前模拟器环境不可用,页面 data 为 `wechatMiniSupported=false`。
|
||||
3. 管理师端大量页面使用本地 mock/fallback 中文数据,即页面可测,但不能证明已与后端真实订单、排班、客户数据联通。
|
||||
4. 微信 MCP 截图通道在后半段出现 `SCREENSHOT_TIMEOUT`,健康检查显示连接仍正常、`needsRecovery=false`,已用页面元素坐标、尺寸、文本和 data 快照兜底验证布局。
|
||||
5. MCP 健康检查中 `projectPath/defaultProjectPath` 曾保留用户端默认值,但 `sourceProjectPath` 和实际路由为管理师端;切换两个小程序项目时建议先完全退出开发者工具,再只启动目标项目,避免共享 `9420` 自动化端口造成项目识别混乱。
|
||||
|
||||
## 小程序补测结论
|
||||
|
||||
- 用户小程序未登录态、TabBar、首页、登录页、认证拦截链路通过;登录后真实业务链路仍被域名配置阻塞。
|
||||
- 管理师小程序主要页面、详情页、设置页和中文输入链路均已通过真实模拟器测试,未发现白屏或控制台异常。
|
||||
- 本轮控制台日志读取结果为空,未捕获小程序运行时异常。
|
||||
# 2026-06-20 后端启动后小程序阻塞复测
|
||||
|
||||
## 测试环境调整
|
||||
|
||||
- 后端 `http://127.0.0.1:80` 已有服务响应。
|
||||
- 为允许微信开发者工具模拟器访问本地 HTTP,新增用户小程序本地私有调试配置:`FD-WeChat-Fronted/project.private.config.json`,内容为 `setting.urlCheck=false`。
|
||||
- 该配置仅用于本地测试环境,未修改业务代码。
|
||||
|
||||
## 用户小程序复测结果
|
||||
|
||||
| 用例 | 模块 | 结果 | 实际结果 |
|
||||
| --- | --- | --- | --- |
|
||||
| MP-007-R1 | 小程序内真实后端请求 | 通过 | `wx.request` 请求 `http://127.0.0.1:80/api/product/list/page?page=1&size=2` 返回 200,拿到“布局测试作品01/02”、测试店铺、签名图片 URL。 |
|
||||
| MP-009 | 首页真实数据 | 部分通过 | 首页可从后端加载门店橱窗,`bannerImages.length=1`,显示测试店铺和门店实拍;精选作品、热门推荐仍为空,`featuredItems.length=0`、`popularItems.length=0`。 |
|
||||
| MP-010 | 作品列表真实数据 | 通过 | `pages/products/index` 加载 10 条作品,首条为“布局测试作品01”,总数 22,`hasMore=true`,价格和图片签名地址正常。 |
|
||||
| MP-011 | 作品详情真实数据 | 通过 | `pages/product-detail/index?id=325700000000000001` 显示“布局测试作品01”、价格 99、测试店铺、2 张图片、标签和可预约信息。 |
|
||||
| MP-012 | 门店详情真实数据 | 通过 | `pages/shop-detail/index?id=325517293758889984` 显示“测试店铺”、重庆地址、营业时间 05:00-22:00、门店介绍和环境图片。 |
|
||||
| MP-013 | 账号密码登录 | 通过 | 通过登录页真实 `handleSubmit` 提交 `quancelianguser / 888888`,登录后回到首页,`isLoggedIn=true`,用户为“全量测试用户”。 |
|
||||
| MP-014 | 购物车登录后数据 | 通过 | `pages/cart/index` 显示购物车 1 条“作品01”x2,优惠券“全量测试优惠券”可用,预估应付 ¥297.00;提示需选择美甲师和预约时间后提交订单。 |
|
||||
| MP-015 | 订单列表登录后数据 | 通过 | `pages/orders/index` 加载订单数据,包含订单号 `QLTEST202606180001`、状态“待完成”、作品01、测试店铺和美甲师01。 |
|
||||
| MP-016 | 订单详情登录后数据 | 通过 | `pages/order-detail/index?id=326100000000000301` 显示订单号、状态“待完成”、作品01、美甲师01、预约时间、售后记录和联系信息。 |
|
||||
| MP-017 | 售后列表登录后数据 | 通过 | `pages/after-sales/index` 显示 `ASQLTEST202606180001`,类型退款,状态“审核中”,退款金额 ¥20.00,原因“全量测试售后原因”。 |
|
||||
| MP-018 | 服务进度登录后数据 | 通过 | `pages/service-progress/index?orderId=326100000000000301` 显示订单创建、预约确认、服务安排、服务完成、售后/评价 5 个节点。 |
|
||||
|
||||
## 本轮仍需关注的问题
|
||||
|
||||
1. 用户小程序首页精选作品和热门推荐仍为空,但作品列表接口已有 22 条数据;需要确认首页所用接口的筛选条件或推荐规则是否符合预期。
|
||||
2. 多个小程序长链路 `navigate` 步出现 MCP 等待超时,但后续路由断言和页面 data 均成功;暂记为自动化等待抖动,不作为页面失败。
|
||||
3. 微信 MCP 截图通道仍处于 `SCREENSHOT_TIMEOUT` 降级状态,本轮主要使用元素尺寸、文本和页面 data 快照作为布局证据。
|
||||
4. `FD-WeChat-Fronted/project.private.config.json` 是本地调试配置,若后续不需要本地 HTTP 测试,可以删除或保持本地不提交。
|
||||
@@ -0,0 +1,21 @@
|
||||
# Salon 业务服务器清单
|
||||
|
||||
更新时间:2026-08-27
|
||||
|
||||
## 后端服务器
|
||||
|
||||
| 名称 | 环境 | 角色 | IP 地址 | SSH 端口 | 操作系统 | Java | 应用目录 | 当前状态 |
|
||||
| --- | --- | --- | --- | ---: | --- | --- | --- | --- |
|
||||
| core01-01 | 生产 | Salon Core | `192.168.10.24` | 22 | Rocky Linux 9.8 | 17.0.20.1 | `/opt/jc-salon-core` | 已创建发布、备份、日志目录;服务单元待首次部署创建 |
|
||||
| core01-02 | 生产 | Salon Core | `192.168.10.25` | 22 | Rocky Linux 9.8 | 17.0.20.1 | `/opt/jc-salon-core` | 已创建发布、备份、日志目录;服务单元待首次部署创建 |
|
||||
| core01-03 | 生产 | Salon Core | `192.168.20.16` | 22 | Rocky Linux 9.8 | 17.0.20.1 | `/opt/jc-salon-core` | 已创建发布、备份、日志目录;服务单元待首次部署创建 |
|
||||
| gateway01-01 | 生产 | Salon Gateway | `192.168.10.26` | 22 | Rocky Linux 9.8 | 17.0.20.1 | `/opt/jc-salon-gateway` | 已创建发布、备份、日志目录;服务单元待首次部署创建 |
|
||||
| gateway01-02 | 生产 | Salon Gateway | `192.168.10.27` | 22 | Rocky Linux 9.8 | 17.0.20.1 | `/opt/jc-salon-gateway` | 已创建发布、备份、日志目录;服务单元待首次部署创建 |
|
||||
| gateway01-03 | 生产 | Salon Gateway | `192.168.20.18` | 22 | Rocky Linux 9.8 | 17.0.20.1 | `/opt/jc-salon-gateway` | 已创建发布、备份、日志目录;服务单元待首次部署创建 |
|
||||
|
||||
## 统一基线
|
||||
|
||||
- 6 台服务器 SSH 端口均为 `22`,防火墙由 firewalld 管理并处于运行状态。
|
||||
- 应用目录及其 `releases`、`backups`、`logs` 子目录权限均为 `755 root:root`。
|
||||
- 当前未创建或启动 `jc-salon-core`、`jc-salon-gateway` systemd 服务,80/81 业务端口未监听。
|
||||
- 生产 SSH 凭据、Nacos 凭据和部署私钥由私有凭据管理,不写入本清单。
|
||||
+3
-5
@@ -11,13 +11,11 @@
|
||||
|
||||
服务注册名为 `jc-artlist-core`、`jc-artlist-gateway`、`jc-salon-core`、`jc-salon-gateway`。设计师 Web/小程序不再包含管理入口;店务 Web 仅保留管理工作流。
|
||||
|
||||
Nacos 配置源位于 `nacos/namespaces/dev/`、`nacos/namespaces/sit/` 与 `nacos/namespaces/prod/`,发布流程为 `.gitea/workflows/publish-nacos.yml`。工作流必须手工选择环境,配置与凭据不跨环境复用。生产 Nacos 元数据库使用 `192.168.10.200:3306/nacos`,生产业务数据库使用 `192.168.10.200:6033` 对应业务库;SIT 业务数据库使用 `192.168.10.102:3306`;Dev 中间件统一使用 `192.168.5.15`。Redis、RabbitMQ 和对象存储的连接信息通过环境变量或 Gitea Secrets 注入,不在仓库提交敏感值。详细规则见 `docs/scripts/生产与测试环境Nacos配置说明_20260826.md` 和 `docs/scripts/开发环境Nacos配置发布说明_20260826.md`。
|
||||
Nacos 配置源位于 `nacos/namespaces/dev/`、`nacos/namespaces/sit/` 与 `nacos/namespaces/prod/`,发布流程为 `.gitea/workflows/publish-nacos.yml`。推送到 `dev` 或 `sit` 分支会自动发布对应环境;生产环境仍须通过工作流手工选择发布目标。配置与凭据不跨环境复用。生产 Nacos 元数据库使用 `192.168.10.200:3306/nacos`,生产业务数据库使用 `192.168.10.200:6033` 对应业务库;SIT 业务数据库使用 `192.168.10.102:3306`;Dev 中间件统一使用 `192.168.5.15`。Redis、RabbitMQ 和对象存储的连接信息通过环境变量或 Gitea Secrets 注入,不在仓库提交敏感值。详细规则见 `docs/scripts/生产与测试环境Nacos配置说明_20260826.md` 和 `docs/scripts/开发环境Nacos配置发布说明_20260826.md`。
|
||||
|
||||
生产对象存储默认使用中心1 MinIO `http://192.168.10.105:9000`,中心2 `http://192.168.20.15:9000` 仅在灾备接管时切换。七牛云 Kodo 使用私有空间 `jayucloud`、`z2` 和 `https://img.yunail.art`;阿里云 OSS 使用私有桶 `jayucloud`、`cn-chengdu` 和 `https://oss-cn-chengdu.aliyuncs.com`。详细发布与验证要求见 `docs/scripts/生产对象存储与中间件配置调整说明_20260825.md`。
|
||||
|
||||
两套数据库空库脚本位于 `docs/scripts/sql/migrations/20260825-双端独立数据库/`。生产执行前须先核对目标库、账号和备份状态;本次改造不迁移既有生产数据。
|
||||
|
||||
职责裁剪迁移位于 `docs/scripts/sql/migrations/20260825-双端职责裁剪/`,必须在对应后端裁剪发布完成、数据库备份确认后执行。
|
||||
两套数据库空库脚本位于 `docs/scripts/sql/init/`:店务端执行 `jayucloud-salon.sql`,设计师端执行 `jayucloud-artlist.sql`。两个脚本已包含各自端侧职责边界和排班规则;生产执行前须先核对目标库、账号和备份状态。
|
||||
|
||||
## 环境变量总表
|
||||
|
||||
@@ -87,7 +85,7 @@ Nacos 配置源位于 `nacos/namespaces/dev/`、`nacos/namespaces/sit/` 与 `nac
|
||||
| `NACOS_PROD_URLS`、`NACOS_PROD_USERNAME`、`NACOS_PROD_PASSWORD` | 发布生产中心一,至少两个节点回读 |
|
||||
| `NACOS_DR_URLS`、`NACOS_DR_USERNAME`、`NACOS_DR_PASSWORD` | 发布生产灾备中心,单节点回读 |
|
||||
|
||||
工作流输入 `NACOS_ENVIRONMENT` 可选 `dev`、`sit`、`prod-center1`、`prod-center2`、`prod-both`。发布脚本只读取所选环境目录,日志不输出配置正文和敏感值。
|
||||
推送 `dev`/`sit` 分支时,工作流自动将 `NACOS_ENVIRONMENT` 设置为分支名;手工触发时输入 `NACOS_ENVIRONMENT` 可选 `dev`、`sit`、`prod-center1`、`prod-center2`、`prod-both`。发布脚本只读取所选环境目录,日志不输出配置正文和敏感值。
|
||||
|
||||
### Web 前端构建变量
|
||||
|
||||
|
||||
+1
-2
@@ -31,7 +31,6 @@ FingertipDesigner 指尖设计师是一个面向美甲门店经营的全链路
|
||||
- `docs/testing/`:测试计划、测试报告和用例矩阵。
|
||||
- `JC-ArtList-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/`:后端 Core 业务模块目录。
|
||||
- `JC-ArtList-Core/src/main/java/com/xiaowang/fingertipdesigner/core/common/`:后端 Core 公共 DTO、VO 和基类目录。
|
||||
- `docs/scripts/sql/init/`:`0.0.1` 空库初始化 SQL 基线,后续不再修改。
|
||||
- `docs/scripts/sql/migrations/`:`0.0.1` 后的数据库版本变更 SQL 目录。
|
||||
- `docs/scripts/sql/init/`:店务端 `jayucloud-salon.sql` 与设计师端 `jayucloud-artlist.sql` 的空库初始化脚本。
|
||||
- `docs/scripts/0.0.1版本基线与后续迭代规则_20260628.md`:脚本、配置、SQL 后续版本迭代规则。
|
||||
- `artifacts/maven/`:Maven 打包产物指定输出目录。
|
||||
|
||||
+8
-1
@@ -1,5 +1,12 @@
|
||||
# 项目变更记录
|
||||
|
||||
## 2026-08-27 Salon 生产后端基础环境准备
|
||||
|
||||
- 已连接并盘点 Salon 生产 6 台后端服务器:Core `192.168.10.24`、`192.168.10.25`、`192.168.20.16`;Gateway `192.168.10.26`、`192.168.10.27`、`192.168.20.18`。
|
||||
- 6 台均为 Rocky Linux 9.8,已安装 `java-17-openjdk-headless`(Java `17.0.20.1`)。
|
||||
- 已创建 Core `/opt/jc-salon-core/{releases,backups,logs}` 与 Gateway `/opt/jc-salon-gateway/{releases,backups,logs}`,目录权限为 `755 root:root`。
|
||||
- 未创建或启动 systemd 业务单元,未开放或监听 80/81 业务端口;后续部署时再上传 JAR、写入服务单元并执行健康检查。
|
||||
|
||||
## 2026-08-25 生产对象存储与中间件配置调整
|
||||
|
||||
- 两个生产 namespace 的 `core.yaml`、`infra.yaml` 补齐中心1 MinIO、七牛云 Kodo 与阿里云 OSS 的非敏感默认参数。
|
||||
@@ -22,5 +29,5 @@
|
||||
- 目录、Maven 产物、前端包名、小程序项目和部署入口统一为 `JC-ArtList-*` / `JC-Salon-*`。
|
||||
- Nacos namespace 保持不变,服务注册名和 Gateway 路由改为 `jc-artlist-*` / `jc-salon-*`。
|
||||
- 设计师 Web 与小程序移除管理端路由、页面、API、后台会话和管理入口;店务 Web 收敛为管理端路由。
|
||||
- 新增 `docs/scripts/sql/migrations/20260825-双端职责裁剪/` 两份职责裁剪迁移脚本。
|
||||
- 将双端职责裁剪结果合并到 `docs/scripts/sql/init/jayucloud-salon.sql` 与 `docs/scripts/sql/init/jayucloud-artlist.sql`。
|
||||
- GitNexus impact/detect_changes 受本地 LadybugDB WAL 崩溃影响未能返回结果,已通过四后端打包和前端构建/测试进行替代验证。
|
||||
|
||||
@@ -14,6 +14,7 @@ logging:
|
||||
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
||||
|
||||
server:
|
||||
port: 8081
|
||||
servlet:
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
server:
|
||||
port: 80
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
gateway:
|
||||
|
||||
@@ -2,8 +2,7 @@ spring:
|
||||
redis:
|
||||
host: ${REDIS_HOST:192.168.5.15}
|
||||
port: ${REDIS_PORT:6379}
|
||||
username: ${REDIS_USERNAME:xiaowang}
|
||||
password: ${REDIS_PASSWORD:122503wcy....}
|
||||
password: ${REDIS_PASSWORD:122503wcy}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
rabbitmq:
|
||||
addresses: ${RABBITMQ_ADDRESSES:192.168.5.15:5672}
|
||||
|
||||
@@ -6,7 +6,7 @@ security:
|
||||
username: ${BUSINESS_DB_USERNAME:root}
|
||||
password: ${BUSINESS_DB_PASSWORD:122503wcy}
|
||||
redis:
|
||||
password: ${REDIS_PASSWORD:122503wcy....}
|
||||
password: ${REDIS_PASSWORD:122503wcy}
|
||||
rabbitmq:
|
||||
username: ${RABBITMQ_USERNAME:rabbitmq}
|
||||
password: ${RABBITMQ_PASSWORD:122503wcy....}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# SalonAdmin 登录令牌修复
|
||||
|
||||
## 变更
|
||||
|
||||
- 管理台页签标题固定为 `SalonAdmin`,favicon 使用 SalonAdmin 专用图标。
|
||||
- Salon Gateway 的 JWT `issuer` 与 Salon Core 统一为 `jayucloud-salon`。
|
||||
- Salon 开发环境 Nacos 的 `gateway.yaml` 需要同步使用 `jayucloud-salon`,避免 Nacos 配置覆盖本地配置。
|
||||
|
||||
## 验证
|
||||
|
||||
登录接口签发令牌后,使用该令牌访问 `/admin/permission/user/current` 应返回 HTTP 200,不应因发行者不一致返回 401。
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
Dev 的 Nacos、Redis、RabbitMQ、MinIO、七牛云和阿里云 OSS 参数已提供默认值,运行环境中的同名变量可以覆盖默认值。Core 的 bootstrap 配置同样默认连接 Dev Nacos,避免首次拉取 Nacos 配置时仍指向生产集群。
|
||||
|
||||
Dev 店务端端口固定为:`jc-salon-core` 使用 `8081`,`jc-salon-gateway` 使用 `80`。端口由各自 Nacos Data ID 声明,修改后必须发布 Dev 配置并重启对应服务才会生效。
|
||||
|
||||
业务数据库的 `BUSINESS_JDBC_URL`、`BUSINESS_DB_USERNAME` 和 `BUSINESS_DB_PASSWORD` 已提供 Dev Salon 默认值,运行环境可以按需覆盖。
|
||||
|
||||
本次调整的版本化文件:
|
||||
|
||||
Reference in New Issue
Block a user