-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OING-317] refactor: 뷰 기반 API를 둘러싼 교통정리 1 (#238)
* feat: Add leftUploadCountUntilMissionUnlock, dailyMissionConten and Add debug parameter to control boolean flag * refactor: Integrate HomeAPI to MainViewController and Add getNighttimePage API * fix: Fix wrongly written get mapping url of getNighttimePage * fix: Add the missing GetMapping annotation and fix wrongly written swagger summary
- Loading branch information
Showing
9 changed files
with
179 additions
and
118 deletions.
There are no files selected for viewing
23 changes: 0 additions & 23 deletions
23
gateway/src/main/java/com/oing/controller/HomeController.java
This file was deleted.
Oops, something went wrong.
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
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
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
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
15 changes: 15 additions & 0 deletions
15
gateway/src/main/java/com/oing/dto/response/NighttimePageResponse.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 com.oing.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
import java.util.List; | ||
|
||
@Schema(description = "야간 메인 페이지") | ||
public record NighttimePageResponse( | ||
@Schema(description = "상단 바 요소") | ||
List<MainPageTopBarResponse> topBarElements, | ||
|
||
@Schema(description = "금월의 가족 구성원 월간 랭킹") | ||
FamilyMemberMonthlyRankingResponse familyMemberMonthlyRanking | ||
) { | ||
} |
This file was deleted.
Oops, something went wrong.
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,69 @@ | ||
package com.oing.restapi; | ||
|
||
import com.oing.dto.response.DaytimePageResponse; | ||
import com.oing.dto.response.FamilyMemberMonthlyRankingResponse; | ||
import com.oing.dto.response.NighttimePageResponse; | ||
import com.oing.util.security.LoginFamilyId; | ||
import com.oing.util.security.LoginMemberId; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
/** | ||
* no5ing-server | ||
* User: CChuYong | ||
* Date: 4/16/24 | ||
* Time: 4:01 PM | ||
*/ | ||
@Tag(name = "메인페이지 뷰 기반 API", description = "프론트의 메인페이지 기반으로 작성된 View API입니다.") | ||
@RestController | ||
@RequestMapping("/v1/view/main") | ||
public interface MainViewApi { | ||
|
||
@Operation(summary = "주간의 메인 페이지 조회") | ||
@GetMapping("/daytime-page") | ||
DaytimePageResponse getDaytimePage( | ||
|
||
@RequestParam(required = false, defaultValue = "true") | ||
@Parameter(description = "(디버그용) 미션 해금 여부 조작 필드", example = "true") | ||
boolean isMissionUnlocked, | ||
|
||
@RequestParam(required = false, defaultValue = "true") | ||
@Parameter(description = "(디버그용) 오늘 나 업로드 여부 조작 필드", example = "true") | ||
boolean isMeUploadedToday, | ||
|
||
@Parameter(hidden = true) | ||
@LoginMemberId | ||
String loginMemberId | ||
); | ||
|
||
|
||
@Operation(summary = "야간의 메인 페이지 조회") | ||
@GetMapping("/nighttime-page") | ||
NighttimePageResponse getNighttimePage( | ||
@Parameter(hidden = true) | ||
@LoginMemberId | ||
String loginMemberId, | ||
|
||
@Parameter(hidden = true) | ||
@LoginFamilyId | ||
String loginFamilyId | ||
); | ||
|
||
|
||
@Operation(summary = "금월의 가족 구성원 월간 랭킹 조회", description = "이번 달에 해당하는 가족 구성원 월간 랭킹을 조회합니다.") | ||
@GetMapping("/family-ranking") | ||
FamilyMemberMonthlyRankingResponse getFamilyMemberMonthlyRanking( | ||
@Parameter(hidden = true) | ||
@LoginMemberId | ||
String loginMemberId, | ||
|
||
@Parameter(hidden = true) | ||
@LoginFamilyId | ||
String loginFamilyId | ||
); | ||
} |
Oops, something went wrong.