Skip to content

Commit 59ba93d

Browse files
committed
feat: add endpoint to retrieve paid application count by school
1 parent e7f5d98 commit 59ba93d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/main/java/life/mosu/mosuserver/global/filter/Whitelist.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public enum Whitelist {
5050
//USER find-password
5151
USER_FIND_PASSWORD("/api/v1/user/me/find-password", WhitelistMethod.POST),
5252

53-
APPLICATION_GUEST("/api/v1/applications/guest", WhitelistMethod.ALL);
54-
53+
APPLICATION_GUEST("/api/v1/applications/guest", WhitelistMethod.ALL),
54+
APPLICATION_PAID("/api/v1/applications/schools/paid-count",WhitelistMethod.ALL);
5555
private static final List<ExceptionRule> AUTH_REQUIRED_EXCEPTIONS = List.of(
5656
new ExceptionRule("/api/v1/exam-application", WhitelistMethod.GET)
5757
);

src/main/java/life/mosu/mosuserver/presentation/application/ApplicationController.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import life.mosu.mosuserver.presentation.application.dto.ApplicationRequest;
1111
import life.mosu.mosuserver.presentation.application.dto.ApplicationResponse;
1212
import life.mosu.mosuserver.presentation.application.dto.CreateApplicationResponse;
13+
import life.mosu.mosuserver.presentation.application.dto.SchoolApplicationCountResponse;
1314
import lombok.RequiredArgsConstructor;
1415
import lombok.extern.slf4j.Slf4j;
1516
import org.springframework.http.HttpStatus;
@@ -74,4 +75,12 @@ public ResponseEntity<ApiResponseWrapper<List<ApplicationResponse>>> getApplicat
7475
return ResponseEntity.ok(
7576
ApiResponseWrapper.success(HttpStatus.OK, "신청 내역 조회 성공", responses));
7677
}
78+
79+
//학교별 결제된 신청 수 조회
80+
@GetMapping("/schools/paid-count")
81+
public ResponseEntity<ApiResponseWrapper<List<SchoolApplicationCountResponse>>> getPaidApplicationCountBySchool() {
82+
List<SchoolApplicationCountResponse> responses = applicationService.getPaidApplicationCountBySchool();
83+
return ResponseEntity.ok(
84+
ApiResponseWrapper.success(HttpStatus.OK, "학교별 결제된 신청 수 조회 성공", responses));
85+
}
7786
}

0 commit comments

Comments
 (0)