refactor(app): 观看历史统一分页契约并移除 limit

This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-22 13:21:07 +08:00
1 parent 7b694938c6
commit c5468a669b
5 files changed
+19 -34

No files matched your search

@@ -44,19 +44,14 @@ public class AppWatchController {
return Result.ok(progressService.ofDrama(SecurityUtils.getAppUserId(), dramaId));
}
@Operation(summary = "最近观看列表")
/** 最近观看分页,契约与 /app/favorites 一致:pageIndex/pageSize。 */
@Operation(summary = "最近观看分页")
@GetMapping("/recent")
public Result<?> recent(
@RequestParam(required = false) Integer limit,
public Result<PageResult<ProgressRespVO>> recent(
@RequestParam(defaultValue = "1") int pageIndex,
@RequestParam(defaultValue = "20") int pageSize) {
Long userId = SecurityUtils.getAppUserId();
if (limit != null) {
return Result.ok(progressService.recent(userId, limit));
}
PageResult<ProgressRespVO> page = progressService.recentPage(
userId, pageIndex, pageSize);
return Result.ok(page);
return Result.ok(progressService.recentPage(
SecurityUtils.getAppUserId(), pageIndex, pageSize));
}
@Operation(summary = "删除某部剧的观看记录")