-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
309 additions
and
236 deletions.
There are no files selected for viewing
56 changes: 0 additions & 56 deletions
56
...ava/yerong/wedle/category/announcement/controller/AdmissionAnnouncementApiController.java
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
src/main/java/yerong/wedle/category/announcement/domain/AdmissionAnnouncement.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/main/java/yerong/wedle/category/announcement/dto/AdmissionAnnouncementResponse.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...wedle/category/announcement/exception/AdmissionAnnouncementCategoryNotFoundException.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
.../yerong/wedle/category/announcement/exception/AdmissionAnnouncementNotFoundException.java
This file was deleted.
Oops, something went wrong.
67 changes: 0 additions & 67 deletions
67
src/main/java/yerong/wedle/category/announcement/service/AdmissionAnnouncementService.java
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
src/main/java/yerong/wedle/category/expo/controller/ExpoApiController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package yerong.wedle.category.expo.controller; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import yerong.wedle.category.expo.domain.ExpoStatus; | ||
import yerong.wedle.category.expo.domain.ExpoType; | ||
import yerong.wedle.category.expo.dto.ExpoResponse; | ||
import yerong.wedle.category.expo.service.ExpoService; | ||
|
||
import java.util.List; | ||
|
||
@Tag(name = "Expo API", description = "대학교 입시설명회 및 연계 활동 공지 관련 API") | ||
@RequiredArgsConstructor | ||
@RestController | ||
@RequestMapping("/api/expo") | ||
public class ExpoApiController { | ||
|
||
private final ExpoService expoService; | ||
|
||
|
||
@Operation(summary = "대학별 연계활동 조회", description = "특정 대학의 ID를 사용하여 해당 대학과 관련된 모든 공지사항을 조회합니다.") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "대학과 관련된 공지사항 조회 성공"), | ||
@ApiResponse(responseCode = "404", description = "해당 대학을 찾을 수 없음") | ||
}) | ||
@GetMapping("/search") | ||
public ResponseEntity<List<ExpoResponse>> getExposByUniversity(@RequestParam String keyword) { | ||
return ResponseEntity.ok().body(expoService.getExposByKeyword(keyword)); | ||
} | ||
|
||
@Operation(summary = "카테고리별 연계활동 조회", description = "특정 카테고리를 사용하여 해당 카테고리에 속한 모든 연계활동을 조회합니다.") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "카테고리별 연계활동 조회 성공"), | ||
@ApiResponse(responseCode = "404", description = "해당 카테고리에 연계활동이 없음") | ||
}) | ||
@GetMapping("/type") | ||
public ResponseEntity<List<ExpoResponse>> getExposByType(@RequestParam ExpoType type) { | ||
return ResponseEntity.ok().body(expoService.getExposByType(type)); | ||
} | ||
|
||
@Operation(summary = "상태별 연계활동 조회", description = "특정 카테고리를 사용하여 해당 카테고리에 속한 모든 연계활동을 조회합니다.") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "카테고리별 연계활동 조회 성공"), | ||
@ApiResponse(responseCode = "404", description = "해당 카테고리에 연계활동이 없음") | ||
}) | ||
@GetMapping("/status") | ||
public ResponseEntity<List<ExpoResponse>> getExposByStatus(@RequestParam ExpoStatus status) { | ||
return ResponseEntity.ok().body(expoService.getExposByStatus(status)); | ||
} | ||
|
||
@Operation(summary = "모든 연계활동 조회", description = "모든 연계활동을 조회합니다.") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "모든 연계활동 조회 성공") | ||
}) | ||
@GetMapping | ||
public ResponseEntity<List<ExpoResponse>> getAllExpos() { | ||
return ResponseEntity.ok().body(expoService.getAllExpos()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package yerong.wedle.category.expo.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.cglib.core.Local; | ||
import yerong.wedle.category.activity.domain.ActivityUniversity; | ||
import yerong.wedle.university.domain.University; | ||
|
||
import java.time.LocalDate; | ||
import java.time.format.DateTimeFormatter; | ||
import java.util.ArrayList; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Entity | ||
public | ||
class Expo { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "expo_id") | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private ExpoType expoType; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private ExpoStatus expoStatus; | ||
|
||
private String expoYear; | ||
|
||
@Column(nullable = false) | ||
private String title; | ||
|
||
@Column(nullable = false) | ||
private String link; | ||
|
||
private String location; | ||
|
||
@Column(columnDefinition = "TEXT") | ||
private String content; | ||
|
||
private LocalDate startDate; | ||
private LocalDate endDate; | ||
|
||
public void setExpoStatus(ExpoStatus expoStatus) { | ||
this.expoStatus = expoStatus; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/yerong/wedle/category/expo/domain/ExpoStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package yerong.wedle.category.expo.domain; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum ExpoStatus { | ||
OPEN("접수 중"), | ||
CLOSED("접수 종료"); | ||
|
||
private final String displayName; | ||
|
||
ExpoStatus(String displayName) { | ||
this.displayName = displayName; | ||
} | ||
} |
10 changes: 6 additions & 4 deletions
10
...uncement/domain/AnnouncementCategory.java → .../wedle/category/expo/domain/ExpoType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/yerong/wedle/category/expo/dto/ExpoResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package yerong.wedle.category.expo.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import yerong.wedle.category.expo.domain.Expo; | ||
|
||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ExpoResponse { | ||
private Long expoId; | ||
private String title; | ||
private String category; | ||
private String expoYear; | ||
private String status; | ||
private String link; | ||
private String location; | ||
private String content; | ||
private String date; | ||
} |
Oops, something went wrong.