Skip to content

Commit af23d05

Browse files
Merge pull request #262 from Podo-Store/bug/#261_performance
bug: 신청된 공연이 없을 경우 오류 수정(#261)
2 parents 86cfb85 + 2264c00 commit af23d05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/PodoeMarket/podoemarket/common/repository/OrderItemRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public interface OrderItemRepository extends JpaRepository<OrderItemEntity, Long
2828
@Query("SELECT COUNT(o) FROM OrderItemEntity o WHERE o.product.id = :productId AND o.script = true")
2929
int sumScriptByProductId(@Param("productId") UUID productId);
3030

31-
@Query("SELECT SUM(o.performanceAmount) FROM OrderItemEntity o WHERE o.product.id = :productId")
31+
@Query("SELECT COALESCE(SUM(o.performanceAmount), 0) FROM OrderItemEntity o WHERE o.product.id = :productId")
3232
int sumPerformanceAmountByProductId(@Param("productId") UUID productId);
3333

3434
List<OrderItemEntity> findAllByProductId(UUID productId);

0 commit comments

Comments
 (0)