功能:完善门店能力与用户安全配置
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# 2026-05-16 公告、VIP 充值展示与一键联系测试报告
|
||||
|
||||
## 范围
|
||||
- 后端新增公告、VIP 充值档位、一键联系接口。
|
||||
- Web 后台新增公告管理、VIP 充值配置。
|
||||
- Web 用户端新增首页公告滚动、VIP 充值档位展示、店铺一键联系。
|
||||
- 小程序新增首页公告滚动、VIP 充值档位展示,并补齐用户端相关 API。
|
||||
- SQL 继续集中在 `YumiNail-Core/src/main/resources/files/YumiNail.sql`。
|
||||
|
||||
## 数据库与 SQL
|
||||
- 当前会话未暴露 MySQL MCP 工具,本机也未检测到 `mysql` CLI,因此本轮未能实际执行落库 SQL。
|
||||
- 已确认 SQL 目录仅保留 `YumiNail.sql`。
|
||||
- `YumiNail.sql` 已补充:
|
||||
- `t_announcement`
|
||||
- `t_vip_recharge_plan`
|
||||
- `announcement:view/create/delete` 权限种子与默认授权
|
||||
- 3 条验收公告
|
||||
- 5 条 VIP 充值档位验收数据
|
||||
- 新表雪花 ID 收口调用
|
||||
|
||||
## 自动化验证
|
||||
- `YumiNail-Core`: `rtk mvn -q -DskipTests compile` 通过。
|
||||
- `YumiNail-Gateway`: `rtk mvn -q -DskipTests compile` 通过。
|
||||
- `YumiNail-Frontend`: `rtk npm run build` 通过。
|
||||
- `WeChatProgram`: 全量 `node --check` 通过。
|
||||
- `rtk git diff --check` 通过。
|
||||
|
||||
## 剩余风险
|
||||
- SQL 尚未在真实 MySQL 数据库执行,需要在 MySQL MCP 可用或安装 MySQL CLI 后执行 `YumiNail.sql` 并回查新表、权限和验收数据。
|
||||
- 未连接 WeChat DevTools MCP 做真机页面流转验证;已完成 JS 语法级检查。
|
||||
- Web UI 已构建通过,但本轮未启动浏览器做视觉截图验收。
|
||||
@@ -0,0 +1,49 @@
|
||||
# 2026-05-16 System Message And MySQL MCP Follow-up
|
||||
|
||||
## Scope
|
||||
|
||||
- Added system message publishing for admins and store managers.
|
||||
- Added Web admin message publishing, Web user notifications, and WeChat mini program notifications.
|
||||
- Kept SQL consolidated in `YumiNail-Core/src/main/resources/files/YumiNail.sql`; no extra SQL files were added.
|
||||
- Added acceptance seed messages and message user state rows.
|
||||
|
||||
## MySQL MCP Status
|
||||
|
||||
- Nacos `YumiNail-Dev / DEFAULT_GROUP / datasource.yaml` was read successfully.
|
||||
- Datasource target used for verification: `192.168.5.15:3306/nailart`, user `root`; password was read from Nacos and was not printed.
|
||||
- `C:\Users\21616\.codex\config.toml` was updated so both `mcp_servers.mysql` and `mcp_servers.toolbox-mysql` point to the Nacos datasource; MySQL MCP write flags were enabled for this test.
|
||||
- The active Codex session still did not hot-load MySQL MCP tools after config update, so SQL execution used a temporary Node `mysql2` runner as the configured-connection fallback.
|
||||
- `YumiNail.sql` was executed against `nailart` on 2026-05-16. The runner completed with 143 executed statements and 80 ignored already-existing/repeat-seed statements.
|
||||
|
||||
## Database Verification
|
||||
|
||||
- Message tables present: `t_system_message`, `t_system_message_user_state`.
|
||||
- Message permissions present: `message:view`, `message:create`, `message:delete`.
|
||||
- Acceptance messages present: 3.
|
||||
- Participating production records present: 2.
|
||||
- SQL directory check: only `YumiNail.sql` remains.
|
||||
|
||||
## Verification
|
||||
|
||||
- `rtk mvn -q -DskipTests compile` in `YumiNail-Core`: passed.
|
||||
- `rtk npm run build` in `YumiNail-Frontend`: passed, with the existing Vite large chunk warning.
|
||||
- Full WeChat mini program JavaScript syntax check with `node --check`: passed.
|
||||
- `rtk git diff --check`: passed.
|
||||
- SQL execution fallback: passed against Nacos datasource database.
|
||||
|
||||
## Acceptance Data Added
|
||||
|
||||
- `t_system_message`
|
||||
- `Acceptance Platform Notice`
|
||||
- `Acceptance Shop Notice`
|
||||
- `Acceptance Selected User Notice`
|
||||
- `t_system_message_user_state`
|
||||
- Covers read, unread, popup shown, and popup pending states.
|
||||
|
||||
## Remaining Manual Checks
|
||||
|
||||
- Verify admin can publish platform, shop, and selected-user messages.
|
||||
- Verify store manager can publish only current-shop and selected current-shop-user messages.
|
||||
- Verify user popup messages appear once, then remain visible in the notification list.
|
||||
- Verify dynamic shop targeting by binding a user to a target shop after message creation and confirming the message becomes visible.
|
||||
- Restart Codex or open a new session to expose the reconfigured MySQL MCP tools directly.
|
||||
@@ -0,0 +1,49 @@
|
||||
# 店长参与制作与 VIP 中心测试报告
|
||||
|
||||
## 变更范围
|
||||
|
||||
- 后端支持 `type=2` 店长通过 `participate_production` 开关进入可预约服务人员体系。
|
||||
- Web 后台美甲师管理展示人员类型、参与制作状态、工作时间,并支持编辑保存。
|
||||
- Web 用户端新增 `/vip-center`,展示 VIP、余额和余额变动记录。
|
||||
- 小程序新增 `pages/vip-center/index`,个人中心增加 VIP 中心入口,购物车选择服务人员时展示“店长 · 参与制作”。
|
||||
- SQL 已收口到 `YumiNail-Core/src/main/resources/files/YumiNail.sql`,同目录其他 `.sql` 文件已删除。
|
||||
|
||||
## 自动验证结果
|
||||
|
||||
- `YumiNail-Core`: `rtk mvn -q -DskipTests compile` 通过。
|
||||
- `YumiNail-Gateway`: `rtk mvn -q -DskipTests compile` 通过。
|
||||
- `YumiNail-Frontend`: `rtk npm run build` 通过,仅存在 Vite 大 chunk 提示。
|
||||
- `WeChatProgram`: 全量 `node --check` 通过。
|
||||
- `git diff --check` 通过。
|
||||
|
||||
## SQL 与测试数据
|
||||
|
||||
- 当前会话未暴露 MySQL MCP;本机也未发现可用 `mysql` 命令,因此没有直接执行数据库 DDL/DML。
|
||||
- 已在 `YumiNail.sql` 中集中加入:
|
||||
- `t_nail_artist_info.participate_production`
|
||||
- `t_nail_artist_info.work_start_time`
|
||||
- `t_nail_artist_info.work_end_time`
|
||||
- 参与制作状态索引
|
||||
- 店长默认服务资料初始化与美甲师默认参与制作修复 SQL
|
||||
- 小型全覆盖测试数据已写入初始化 SQL,包含:
|
||||
- 店铺:`Acceptance Main Shop`、`Acceptance Branch Shop`
|
||||
- 用户:`accept_user_normal`、`accept_user_bronze`、`accept_user_silver`、`accept_user_gold`
|
||||
- 店长:`accept_manager_main`(不参与制作)、`accept_manager_artist`(参与制作)、`accept_manager_branch`(分店参与制作)
|
||||
- 美甲师:`accept_artist_main`、`accept_artist_branch`
|
||||
- 商品:`Acceptance Gel Manicure`、`Acceptance Manager Exclusive Design`、`Acceptance Branch Care`
|
||||
- 余额与流水:普通、Bronze、Silver、Gold 用户均有余额、累计充值和充值/消费流水
|
||||
- 预约样例:`ACCEPTANCE-ORDER-001` 指向参与制作店长
|
||||
- 真实库执行仍需在有 MySQL MCP 或 MySQL 客户端连接后完成。
|
||||
|
||||
## 人工抽检建议
|
||||
|
||||
- 后台:使用管理员进入美甲师管理,确认普通美甲师和已开启参与制作的店长均出现,并能保存工作时间。
|
||||
- 后台:商品管理选择可预约人员,确认参与制作店长可被选中。
|
||||
- 用户端 Web:进入个人中心 -> VIP 中心,确认等级、余额、累计充值和流水展示。
|
||||
- 小程序:进入我的 -> VIP 中心;进入购物车选择服务人员,确认店长显示“店长 · 参与制作”。
|
||||
- 下单:同一商品分别选择普通美甲师、参与制作店长验证可下单;关闭店长参与制作后应不可再作为可约人员。
|
||||
|
||||
## 剩余风险
|
||||
|
||||
- 当前未能直接执行 MySQL 变更,真实环境首次运行前必须先执行 `YumiNail.sql` 或对应字段补齐 SQL。
|
||||
- 小程序 DevTools MCP 未在本轮连接验证,已完成静态语法检查,交互流程仍需在微信开发者工具中人工抽检。
|
||||
@@ -0,0 +1,73 @@
|
||||
# 新人调用说明
|
||||
|
||||
这份文档只记录最近新增功能的调用入口,方便新同学先跑通流程,再回头看实现细节。
|
||||
|
||||
## 预约日历
|
||||
|
||||
- Web API 文件:`YumiNail-Frontend/src/api/order.ts`
|
||||
- 后端入口:`YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/controller/OrderController.java`
|
||||
|
||||
常用接口:
|
||||
|
||||
```http
|
||||
GET /order/artist/calendar/recent?days=7
|
||||
GET /order/artist/calendar/day?date=2026-05-17
|
||||
PUT /order/artist/complete/{orderId}
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
- 登录人必须是美甲师,或开启了“参与制作”的店长。
|
||||
- 后端已经按当前登录人过滤预约,前端不要再自己拼 artistId。
|
||||
- `date` 统一传 `yyyy-MM-dd`。
|
||||
|
||||
## 公告与消息
|
||||
|
||||
公告用于首页顶部滚动展示,不进入消息通知历史:
|
||||
|
||||
```http
|
||||
GET /announcement/my/list
|
||||
POST /announcement/admin/create
|
||||
GET /announcement/admin/target-options
|
||||
```
|
||||
|
||||
消息用于消息通知列表和一次性弹窗:
|
||||
|
||||
```http
|
||||
GET /system-message/my/list
|
||||
GET /system-message/my/popup
|
||||
PUT /system-message/my/{id}/popup-shown
|
||||
PUT /system-message/my/{id}/read
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
- 弹窗展示后必须调用 `popup-shown`,否则刷新页面还会继续弹。
|
||||
- 已弹窗和已读是两件事,点击详情或进入消息详情时再标记已读。
|
||||
|
||||
## VIP 充值档位
|
||||
|
||||
```http
|
||||
GET /vip-recharge-plan/my/list
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
- 当前只是展示店长配置的充值档位。
|
||||
- 不创建充值订单,不调用支付,不改余额流水。
|
||||
|
||||
## 用户归属与邀请码
|
||||
|
||||
```http
|
||||
GET /user/relation/me
|
||||
GET /user/invite-code/resolve?code=INVITE001
|
||||
GET /admin/shop-role/invite-code/list
|
||||
POST /admin/shop-role/invite-code/create
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
- 注册页可先调用 `resolve` 展示邀请码对应的所属人和店铺。
|
||||
- 不填邀请码时,默认归属到当前店铺店长。
|
||||
- 后台用户列表默认使用脱敏字段,例如 `maskedPhone`、`maskedEmail`。
|
||||
|
||||
Reference in New Issue
Block a user