Skip to content

Commit e162dad

Browse files
committed
feat(product): 상품 집계 결과에 총 판매 금액 추가
- 집계 결과 반환 값에 totalSalesAmount 필드 추가 - 집계 결과 배열 길이 검증 로직 수정
1 parent 9c26225 commit e162dad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/commerce-batch/src/main/java/com/loopers/batch/job/ranking/dto/RankingAggregation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private RankingAggregation(Long productId, long viewCount, long likeCount,
4444
* @throws IllegalArgumentException row가 null이거나 형식이 잘못된 경우
4545
*/
4646
public static RankingAggregation from(Object[] row, ScoreCalculator calculator) {
47-
if (row == null || row.length < 4) {
47+
if (row == null || row.length < 6) {
4848
throw new IllegalArgumentException("집계 결과 배열이 null이거나 길이가 부족합니다.");
4949
}
5050

apps/commerce-batch/src/main/java/com/loopers/infrastructure/metrics/ProductMetricsJpaRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public interface ProductMetricsJpaRepository extends JpaRepository<ProductMetric
2222
*
2323
* @param startDate 시작 날짜 (포함)
2424
* @param endDate 종료 날짜 (포함)
25-
* @return 집계 결과 [productId, viewCount, likeCount, salesCount, orderCount]
25+
* @return 집계 결과 [productId, viewCount, likeCount, salesCount, orderCount, totalSalesAmount]
2626
*/
2727
@Query("""
2828
SELECT m.id.productId,

0 commit comments

Comments
 (0)