You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/vn/webapp/backend/auction/repository/AuctionRegistrationRepository.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ public interface AuctionRegistrationRepository extends JpaRepository<AuctionRegi
28
28
@Query("SELECT SUM(ar.registrationFee) FROM AuctionRegistration ar")
29
29
DoublesumTotalRegistrationFee();
30
30
31
-
@Query("SELECT COUNT(DISTINCT ar.user.id) FROM AuctionRegistration ar WHERE ar.auctionRegistrationState = 'VALID'")
32
-
LongcountDistinctUsersRegistered();
31
+
@Query("SELECT COUNT(DISTINCT ar.user.id) FROM AuctionRegistration ar WHERE ar.auctionRegistrationState = 'VALID' AND MONTH(ar.registrationDate) = :month AND YEAR(ar.registrationDate) = :year")
@Query("SELECT SUM(t.totalPrice * 0.08) FROM Transaction t WHERE t.type = 'PAYMENT_TO_WINNER' AND t.state = 'SUCCEED'")
37
-
DoublegetTotalCommissionRevenue();
36
+
@Query("SELECT SUM(t.totalPrice * 0.08) FROM Transaction t WHERE t.type = 'PAYMENT_TO_WINNER' AND t.state = 'SUCCEED' AND YEAR(t.paymentTime) = :year")
@Query("SELECT SUM(t.auction.participationFee) FROM Transaction t WHERE t.type = 'REGISTRATION' AND t.state = 'SUCCEED'")
40
-
DoublegetTotalRegistrationFeeRevenue();
39
+
@Query("SELECT SUM(t.auction.participationFee) FROM Transaction t WHERE t.type = 'REGISTRATION' AND t.state = 'SUCCEED' AND YEAR(t.paymentTime) = :year")
0 commit comments