feat(calculator): 食谱计算器历史记录功能(test-0415 反馈2-2)
后端: - GET /api/front/tool/calculator/history 倒序分页返回当前用户记录摘要 - ToolCalculatorService.getHistory(PageParamRequest) 实现 - 摘要含 id / createdAt / bmi / ckdStage / proteinIntake / energyIntake / isAdopted / hasDialysis 前端: - api/tool.js 新增 getCalculatorHistory(params) - pages/tool/calculator-history.vue 历史列表页(下拉刷新 + 触底加载) - 点击行跳转 calculator-result?id=xxx 复用结果页,自然支持「重新载入参数」 - pages.json 注册路由 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,17 @@ public class ToolController {
|
||||
return CommonResult.success(toolCalculatorService.getResult(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取计算历史记录列表(test-0415 反馈2-2)
|
||||
* 当前登录用户最近的营养计算记录倒序分页。
|
||||
*/
|
||||
@ApiOperation(value = "获取计算历史记录", notes = "倒序分页返回当前用户的营养计算结果摘要")
|
||||
@GetMapping("/calculator/history")
|
||||
public CommonResult<CommonPage<Map<String, Object>>> getCalculatorHistory(
|
||||
@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(toolCalculatorService.getHistory(pageParamRequest)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 采纳营养计划
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user