129 lines
5.3 KiB
Markdown
129 lines
5.3 KiB
Markdown
|
|
# LSFX Mock Server 异常账户基线同步前端 Implementation Plan
|
|||
|
|
|
|||
|
|
> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|||
|
|
>
|
|||
|
|
> 仓库约束:当前仓库明确禁止开启 subagent,执行时统一使用 `superpowers:executing-plans`。
|
|||
|
|
|
|||
|
|
**Goal:** 在不修改 `ruoyi-ui` 源码的前提下,明确本次 `lsfx-mock-server` 异常账户基线同步对前端的影响边界,沉淀“零代码改动”实施计划与核验记录。
|
|||
|
|
|
|||
|
|
**Architecture:** 本次需求只增强 Mock 服务内部的异常账户事实落库能力,不修改对外银行流水接口协议,也不新增前端入参、页面或调试入口。前端计划采用“影响面检索 + 协议不变确认 + 文档留痕”的最短路径;若核查发现必须适配新字段或新交互,应停止执行并回到设计阶段,而不是在本计划中扩展 UI。
|
|||
|
|
|
|||
|
|
**Tech Stack:** Vue 2, rg, git diff, Markdown docs
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## File Structure
|
|||
|
|
|
|||
|
|
- `ruoyi-ui/src/api/`: 只用于检索是否存在直接依赖 `lsfx-mock-server` 异常账户内部事实的新接口封装,不预期修改。
|
|||
|
|
- `ruoyi-ui/src/views/ccdiProject/`: 只用于确认现有页面是否直接依赖 Mock 内部账户事实,不预期修改。
|
|||
|
|
- `docs/reports/implementation/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-implementation.md`: 记录前端零代码改动结论。
|
|||
|
|
- `docs/tests/records/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-verification.md`: 记录检索命令、查验范围和判断依据。
|
|||
|
|
|
|||
|
|
## Task 1: 核验前端是否需要承接本次 Mock 基线同步
|
|||
|
|
|
|||
|
|
**Files:**
|
|||
|
|
- Reference: `ruoyi-ui/src/api/`
|
|||
|
|
- Reference: `ruoyi-ui/src/views/ccdiProject/`
|
|||
|
|
- Reference: `docs/design/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-design.md`
|
|||
|
|
|
|||
|
|
- [ ] **Step 1: Check existing frontend touchpoints**
|
|||
|
|
|
|||
|
|
先确认本次需求是否触达以下任一前端边界:
|
|||
|
|
|
|||
|
|
- 前端是否直接调用 `lsfx-mock-server` 并依赖异常账户内部事实
|
|||
|
|
- 前端是否需要新增字段才能继续消费 `/watson/api/project/getBSByLogId`
|
|||
|
|
- 前端是否存在专门围绕 Mock 联调的页面、按钮或测试入口需要跟进
|
|||
|
|
|
|||
|
|
若三项都不存在,则本轮前端默认保持零代码改动。
|
|||
|
|
|
|||
|
|
- [ ] **Step 2: Verify with search commands**
|
|||
|
|
|
|||
|
|
Run:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cd ruoyi-ui
|
|||
|
|
rg -n "lsfx|mock|异常账户|getBSByLogId|bankStatement|account_info" src
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Expected:
|
|||
|
|
|
|||
|
|
- 不存在必须新增前端适配的直接依赖
|
|||
|
|
- 不应因为 Mock 内部写库增强而顺手增加演示页、调试页或临时开关
|
|||
|
|
|
|||
|
|
- [ ] **Step 3: Confirm contract stability**
|
|||
|
|
|
|||
|
|
对照设计文档确认以下三点全部成立:
|
|||
|
|
|
|||
|
|
- `/watson/api/project/getBSByLogId` 返回结构不变
|
|||
|
|
- 本次只新增 Mock 内部异常账户基线写库,不新增前端入参
|
|||
|
|
- 风险页面仍只消费后端聚合结果,不直接读取 `ccdi_account_info`
|
|||
|
|
|
|||
|
|
若任一点不成立,停止执行并回到设计阶段。
|
|||
|
|
|
|||
|
|
- [ ] **Step 4: Record the no-op boundary**
|
|||
|
|
|
|||
|
|
在后续实施记录中明确写明:
|
|||
|
|
|
|||
|
|
- 本次需求不涉及 `ruoyi-ui` 源码修改
|
|||
|
|
- 前端不会为了“方便联调”新增占位页面、按钮或 mock 参数
|
|||
|
|
|
|||
|
|
- [ ] **Step 5: Commit**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
git add \
|
|||
|
|
docs/reports/implementation/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-implementation.md \
|
|||
|
|
docs/tests/records/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-verification.md
|
|||
|
|
git commit -m "记录异常账户基线同步前端零改动结论"
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Task 2: 沉淀前端核验记录并确认源码未被误改
|
|||
|
|
|
|||
|
|
**Files:**
|
|||
|
|
- Create: `docs/reports/implementation/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-implementation.md`
|
|||
|
|
- Create: `docs/tests/records/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-verification.md`
|
|||
|
|
|
|||
|
|
- [ ] **Step 1: Write implementation record**
|
|||
|
|
|
|||
|
|
在 `docs/reports/implementation/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-implementation.md` 中记录:
|
|||
|
|
|
|||
|
|
- 需求主体是 `lsfx-mock-server` 后端基线同步
|
|||
|
|
- 前端不直接消费 Mock 新增的内部写库行为
|
|||
|
|
- 因此本轮不修改 `ruoyi-ui` 源码
|
|||
|
|
|
|||
|
|
- [ ] **Step 2: Write verification record**
|
|||
|
|
|
|||
|
|
在 `docs/tests/records/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-verification.md` 中记录:
|
|||
|
|
|
|||
|
|
- 执行过的 `rg` / `git diff` 命令
|
|||
|
|
- 核验目录范围
|
|||
|
|
- “无需前端改动”的判断依据
|
|||
|
|
|
|||
|
|
- [ ] **Step 3: Verify frontend diff scope**
|
|||
|
|
|
|||
|
|
Run:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
git diff --name-only -- ruoyi-ui
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Expected:
|
|||
|
|
|
|||
|
|
- 无与本次需求相关的新前端改动
|
|||
|
|
- 若存在既有无关改动,只记录“本计划未新增前端源码变更”,不顺手处理他人改动
|
|||
|
|
|
|||
|
|
- [ ] **Step 4: Confirm no frontend build is required**
|
|||
|
|
|
|||
|
|
在验证记录中明确写明:
|
|||
|
|
|
|||
|
|
- 因为 `ruoyi-ui` 无本次需求相关源码改动,本次不执行 `npm run build:prod`
|
|||
|
|
- 若后续出现真实前端接入需求,再单独补构建与联调验证
|
|||
|
|
|
|||
|
|
- [ ] **Step 5: Commit**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
git add \
|
|||
|
|
docs/reports/implementation/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-implementation.md \
|
|||
|
|
docs/tests/records/2026-03-31-lsfx-mock-server-abnormal-account-baseline-sync-frontend-verification.md
|
|||
|
|
git commit -m "补充异常账户基线同步前端核验记录"
|
|||
|
|
```
|