feat: 순자산 추이 주간 집계 추가 (/networth/trend?unit=WEEK)

- weeklyWalletFlow(월요일 기준 주별 순현금흐름) + netWorthTrendWeekly(기본 13주)
- 컨트롤러에 unit=WEEK&weeks=N 지원(기존 월별은 그대로)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-22 22:38:06 +09:00
co-authored by Claude Opus 4.8
parent 7de643022b
commit 3fc233d697
4 changed files with 81 additions and 1 deletions
@@ -167,11 +167,16 @@ public class AccountController {
return accountService.categoryStats(current.getId(), type, year, month);
}
/** 월별 순자산 추이 */
/** 순자산 추이 (unit=WEEK 면 주별, weeks 개수 / 그 외 월별, months 개수) */
@GetMapping("/networth/trend")
public List<NetWorthPoint> netWorthTrend(
@RequestParam(required = false) Integer months,
@RequestParam(required = false) Integer weeks,
@RequestParam(defaultValue = "MONTH") String unit,
@RequestAttribute(AuthInterceptor.CURRENT_MEMBER) SessionUser current) {
if ("WEEK".equalsIgnoreCase(unit)) {
return accountService.netWorthTrendWeekly(current.getId(), weeks);
}
return accountService.netWorthTrend(current.getId(), months);
}