-
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.
Merge pull request #27 from Leets-Official/24-fearture-마이페이지-구현
24 fearture 마이페이지 구현
- Loading branch information
Showing
7 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -53,6 +53,7 @@ dependencies { | |
|
||
// GSON | ||
implementation "com.google.code.gson:gson:2.8.9" | ||
|
||
} | ||
|
||
tasks.named('test') { | ||
|
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
34 changes: 34 additions & 0 deletions
34
...in/java/com/leets/commitatobe/domain/user/presentation/dto/response/UserInfoResponse.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,34 @@ | ||
package com.leets.commitatobe.domain.user.presentation.dto.response; | ||
|
||
import com.leets.commitatobe.domain.commit.domain.Commit; | ||
import com.leets.commitatobe.domain.user.domain.User; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Builder(access = AccessLevel.PRIVATE) | ||
public record UserInfoResponse( | ||
Boolean isMyAccount, | ||
String githubId, | ||
String tierName, | ||
String characterUrl, | ||
Integer consecutiveCommitDays, | ||
Integer todayCommitCount, | ||
Integer totalCommitCount, | ||
LocalDateTime updatedAt | ||
) { | ||
public static UserInfoResponse of(boolean isMyAccount, User user){ | ||
return UserInfoResponse.builder() | ||
.isMyAccount(isMyAccount) | ||
.githubId(user.getGithubId()) | ||
.tierName(user.getTier().getTierName()) | ||
.characterUrl(user.getTier().getCharacterUrl()) | ||
.consecutiveCommitDays(user.getConsecutiveCommitDays()) | ||
.todayCommitCount(user.getTodayCommitCount()) | ||
.totalCommitCount(user.getTotalCommitCount()) | ||
.updatedAt(user.getUpdatedAt()) | ||
.build(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/leets/commitatobe/domain/user/usecase/UserQueryService.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 |
---|---|---|
@@ -1,12 +1,18 @@ | ||
package com.leets.commitatobe.domain.user.usecase; | ||
|
||
|
||
import com.leets.commitatobe.domain.user.presentation.dto.response.UserInfoResponse; | ||
import com.leets.commitatobe.domain.user.presentation.dto.response.UserRankResponse; | ||
import com.leets.commitatobe.domain.user.presentation.dto.response.UserSearchResponse; | ||
import com.leets.commitatobe.global.response.CustomPageResponse; | ||
|
||
public interface UserQueryService { | ||
UserSearchResponse searchUsersByGithubId(String GithubId);//유저 이름으로 유저 정보를 검색하는 메서드 | ||
|
||
CustomPageResponse<UserRankResponse> getUsersOrderByExp(int page, int size);//경험치 순으로 페이징된 유저 정보를 조회 | ||
|
||
String getUserGitHubAccessToken(String githubId); | ||
|
||
|
||
UserInfoResponse findUserInfo(String githubId, String myGitHubId); | ||
} |
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