-
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.
Browse files
Browse the repository at this point in the history
feat: 멘토 상세 정보 조회 API 개발
- Loading branch information
Showing
12 changed files
with
217 additions
and
116 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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
name: "♻️ [REFACTOR]" | ||
about: 리팩토링 이슈 템플릿입니다. | ||
title: "♻️ [REFACTOR]" | ||
labels: "\U0001F41B bug, ♻️ refactor" | ||
assignees: oxdjww | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp | ||
--- | ||
name: "♻️ [REFACTOR]" | ||
about: 리팩토링 이슈 템플릿입니다. | ||
title: "♻️ [REFACTOR]" | ||
labels: '' | ||
assignees: oxdjww | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp |
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,17 +1,17 @@ | ||
--- | ||
name: "✨ [FEAT] " | ||
about: 기능 개발 이슈 템플릿입니다. | ||
title: "✨ [FEAT] " | ||
labels: "✨ feature" | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp | ||
--- | ||
name: "✨ [FEAT] " | ||
about: 기능 개발 이슈 템플릿입니다. | ||
title: "✨ [FEAT] " | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp |
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,17 +1,17 @@ | ||
--- | ||
name: "\U0001F41B [BUG]" | ||
about: 버그 이슈 템플릿입니다. | ||
title: "\U0001F41B [BUG]" | ||
labels: "\U0001F41B bug" | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp | ||
--- | ||
name: "\U0001F41B [BUG]" | ||
about: 버그 이슈 템플릿입니다. | ||
title: "\U0001F41B [BUG]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp |
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,10 +1,17 @@ | ||
--- | ||
name: "\U0001F49A [CI]" | ||
about: CI 이슈 템플릿입니다 | ||
title: "\U0001F49A [CI]" | ||
labels: "\U0001F49A CI" | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
||
--- | ||
name: "\U0001F49A [CI]" | ||
about: CI 이슈 템플릿입니다 | ||
title: "\U0001F49A [CI]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
- tmp | ||
|
||
# Content | ||
- tmp | ||
|
||
# TODO | ||
- [ ] tmp |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/soongsil/CoffeeChat/controller/Exception/CustomException.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,13 @@ | ||
package com.soongsil.CoffeeChat.controller.Exception; | ||
|
||
import org.springframework.http.HttpStatusCode; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class CustomException extends RuntimeException{ | ||
private final HttpStatusCode errorCode; | ||
private final String errorMessage; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/soongsil/CoffeeChat/controller/Exception/enums/MentorErrorCode.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,18 @@ | ||
package com.soongsil.CoffeeChat.controller.Exception.enums; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.HttpStatusCode; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum MentorErrorCode { | ||
// 400 | ||
MEMBER_NOT_FOUND(HttpStatus.NOT_FOUND, "MENTOR_404", "멘토를 찾을 수 없습니다."); | ||
|
||
private final HttpStatusCode httpStatusCode; | ||
private final String errorCode; | ||
private final String errorMessage; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
package com.soongsil.CoffeeChat.dto; | ||
|
||
import com.soongsil.CoffeeChat.enums.ClubEnum; | ||
import com.soongsil.CoffeeChat.enums.PartEnum; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class MentorDto { | ||
private String part; | ||
private int club; | ||
private PartEnum part; | ||
private ClubEnum club; | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/soongsil/CoffeeChat/dto/ResponseMentorInfo.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,33 @@ | ||
package com.soongsil.CoffeeChat.dto; | ||
|
||
import com.soongsil.CoffeeChat.entity.Mentor; | ||
import com.soongsil.CoffeeChat.entity.User; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class ResponseMentorInfo { | ||
Long mentorId; | ||
String mentorName; | ||
String part; | ||
String introductionTitle; | ||
String introductionDescription; | ||
String introductionAnswer1; | ||
String introductionAnswer2; | ||
String imageUrl; | ||
|
||
public static ResponseMentorInfo of(Mentor mentor, User user) { | ||
return ResponseMentorInfo.builder() | ||
.mentorId(mentor.getId()) | ||
.mentorName(user.getName()) | ||
.imageUrl(user.getPicture()) | ||
.part(String.valueOf(mentor.getPart())) | ||
.introductionTitle(mentor.getIntroduction().getTitle()) | ||
.introductionDescription(mentor.getIntroduction().getDescription()) | ||
.introductionAnswer1(mentor.getIntroduction().getAnswer1()) | ||
.introductionAnswer2(mentor.getIntroduction().getAnswer2()) | ||
.build(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
src/main/java/com/soongsil/CoffeeChat/entity/Introduction.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
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
Oops, something went wrong.