## Problem 以下端点一次性返回全部数据,数据量大时性能堪忧: - `GET /api/notebook-words` - `GET /api/wrong-words` - `GET /api/study-records` - `GET /api/words` ## Proposed Solution 添加分页参数并返回标准化分页响应: ``` GET /api/notebook-words?userId=1&page=1&size=20 Response: { "code": 200, "data": { "content": [...], "page": 1, "size": 20, "totalElements": 156, "totalPages": 8 } } ``` 后端 MyBatis 使用 `LIMIT #{offset}, #{size}` + `COUNT(*)` 实现。 前端列表添加下拉加载更多。
Problem
以下端点一次性返回全部数据,数据量大时性能堪忧:
GET /api/notebook-wordsGET /api/wrong-wordsGET /api/study-recordsGET /api/wordsProposed Solution
添加分页参数并返回标准化分页响应:
后端 MyBatis 使用
LIMIT #{offset}, #{size}+COUNT(*)实现。前端列表添加下拉加载更多。