From 768f1f59b915c2ffe73a72493cd06965cd6b617e Mon Sep 17 00:00:00 2001 From: wlgns12370 Date: Thu, 15 May 2025 16:00:24 +0900 Subject: [PATCH 1/5] =?UTF-8?q?RINGUS-74=20fix:=20mentor=20category=20?= =?UTF-8?q?=ED=95=9C=EA=B5=AD=EC=96=B4=20=ED=85=8C=EC=9D=B4=EB=B8=94=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ringus/domain/mentor/vo/DetailedJob.java | 23 ++++--------- .../ringus/domain/mentor/vo/JobCategory.java | 10 +++--- .../db/migration/V7__fix_mentor_category.sql | 33 +++++++++++++++++++ 3 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 src/main/resources/db/migration/V7__fix_mentor_category.sql diff --git a/src/main/java/es/princip/ringus/domain/mentor/vo/DetailedJob.java b/src/main/java/es/princip/ringus/domain/mentor/vo/DetailedJob.java index 6ba5af4..70afb14 100644 --- a/src/main/java/es/princip/ringus/domain/mentor/vo/DetailedJob.java +++ b/src/main/java/es/princip/ringus/domain/mentor/vo/DetailedJob.java @@ -6,7 +6,6 @@ @Getter public enum DetailedJob { - // Marketing BRAND_MARKETING("BRAND_MARKETING", "브랜드 마케팅", JobCategory.MARKETING), PERFORMANCE_MARKETING("PERFORMANCE_MARKETING", "퍼포먼스 마케팅", JobCategory.MARKETING), DIGITAL_SOCIAL_MARKETING("DIGITAL_SOCIAL_MARKETING", "디지털/소셜 마케팅", JobCategory.MARKETING), @@ -20,7 +19,6 @@ public enum DetailedJob { BROADCAST_PD("BROADCAST_PD", "방송PD/영상PD", JobCategory.MARKETING), OTHER_MARKETING("OTHER_MARKETING", "기타", JobCategory.MARKETING), - // Service Planning SERVICE_PLANNING("SERVICE_PLANNING", "서비스기획", JobCategory.SERVICE_PLANNING), PM_PO("PM_PO", "PM/PO", JobCategory.SERVICE_PLANNING), STRATEGY_PLANNING("STRATEGY_PLANNING", "전략 기획", JobCategory.SERVICE_PLANNING), @@ -30,7 +28,6 @@ public enum DetailedJob { STARTUP("STARTUP", "창업", JobCategory.SERVICE_PLANNING), OTHER_SERVICE_PLANNING("OTHER_SERVICE_PLANNING", "기타", JobCategory.SERVICE_PLANNING), - // Design UX_UI_DESIGN("UX_UI_DESIGN", "UX/UI 디자인", JobCategory.DESIGN), GRAPHIC_DESIGN("GRAPHIC_DESIGN", "그래픽 디자인", JobCategory.DESIGN), PRODUCT_DESIGN("PRODUCT_DESIGN", "상품 디자인", JobCategory.DESIGN), @@ -39,7 +36,6 @@ public enum DetailedJob { ART_DIRECTOR("ART_DIRECTOR", "아트 디렉터", JobCategory.DESIGN), OTHER_DESIGN("OTHER_DESIGN", "기타", JobCategory.DESIGN), - // Development FRONTEND("FRONTEND", "프론트엔드", JobCategory.DEVELOPMENT), BACKEND("BACKEND", "백엔드", JobCategory.DEVELOPMENT), FULLSTACK("FULLSTACK", "풀스택 개발자", JobCategory.DEVELOPMENT), @@ -50,12 +46,10 @@ public enum DetailedJob { SECURITY("SECURITY", "보안 엔지니어", JobCategory.DEVELOPMENT), OTHER_DEVELOPMENT("OTHER_DEVELOPMENT", "기타", JobCategory.DEVELOPMENT), - // Graduate School DOMESTIC_GRADUATE_SCHOOL("DOMESTIC_GRADUATE_SCHOOL", "국내 대학원", JobCategory.GRADUATE_SCHOOL), OVERSEAS_GRADUATE_SCHOOL("OVERSEAS_GRADUATE_SCHOOL", "해외 대학원", JobCategory.GRADUATE_SCHOOL), OTHER_GRADUATE_SCHOOL("OTHER_GRADUATE_SCHOOL", "기타", JobCategory.GRADUATE_SCHOOL), - // HR Support HR_PLANNING("HR_PLANNING", "인사기획", JobCategory.HR_SUPPORT), RECRUITMENT("RECRUITMENT", "채용담당", JobCategory.HR_SUPPORT), TALENT_DEVELOPMENT("TALENT_DEVELOPMENT", "인재육성/교육담당", JobCategory.HR_SUPPORT), @@ -66,7 +60,6 @@ public enum DetailedJob { RECRUITER("RECRUITER", "리크루터", JobCategory.HR_SUPPORT), OTHER_HR_SUPPORT("OTHER_HR_SUPPORT", "기타", JobCategory.HR_SUPPORT), - // Sales Customer B2B_SALES("B2B_SALES", "기업영업(B2B)", JobCategory.SALES_CUSTOMER), B2C_SALES("B2C_SALES", "개인영업(B2C)", JobCategory.SALES_CUSTOMER), OVERSEAS_SALES("OVERSEAS_SALES", "해외영업", JobCategory.SALES_CUSTOMER), @@ -77,15 +70,13 @@ public enum DetailedJob { CSM_CX("CSM_CX", "CSM/CX", JobCategory.SALES_CUSTOMER), OTHER_SALES_CUSTOMER("OTHER_SALES_CUSTOMER", "기타", JobCategory.SALES_CUSTOMER), - // Finance Consulting VC - CONSULTANT("CONSULTANT", "컨설턴트", JobCategory.FINANCE_CONSULTING_VC), - VC_INVESTMENT("VC_INVESTMENT", "VC/투자", JobCategory.FINANCE_CONSULTING_VC), - IB_PE_ALTERNATIVE_INVESTMENT("IB_PE_ALTERNATIVE_INVESTMENT", "IB/PE/대체투자", JobCategory.FINANCE_CONSULTING_VC), - ANALYST("ANALYST", "애널리스트", JobCategory.FINANCE_CONSULTING_VC), - ACCOUNTING_FINANCE("ACCOUNTING_FINANCE", "회계/재무", JobCategory.FINANCE_CONSULTING_VC), - OTHER_FINANCE_CONSULTING_VC("OTHER_FINANCE_CONSULTING_VC", "기타", JobCategory.FINANCE_CONSULTING_VC), + CONSULTANT("CONSULTANT", "컨설턴트", JobCategory.FINANCE), + VC_INVESTMENT("VC_INVESTMENT", "VC/투자", JobCategory.FINANCE), + IB_PE_ALTERNATIVE_INVESTMENT("IB_PE_ALTERNATIVE_INVESTMENT", "IB/PE/대체투자", JobCategory.FINANCE), + ANALYST("ANALYST", "애널리스트", JobCategory.FINANCE), + ACCOUNTING_FINANCE("ACCOUNTING_FINANCE", "회계/재무", JobCategory.FINANCE), + OTHER_FINANCE("OTHER_FINANCE", "기타", JobCategory.FINANCE), - // Data DATA_SCIENTIST("DATA_SCIENTIST", "데이터 사이언티스트", JobCategory.DATA), DATA_ENGINEER("DATA_ENGINEER", "데이터 엔지니어", JobCategory.DATA), DATA_ANALYST("DATA_ANALYST", "데이터 애널리스트", JobCategory.DATA), @@ -95,7 +86,6 @@ public enum DetailedJob { RESEARCH_ANALYST("RESEARCH_ANALYST", "리서치 애널리스트", JobCategory.DATA), OTHER_DATA("OTHER_DATA", "기타", JobCategory.DATA), - // Medical CLINICAL_DOCTOR("CLINICAL_DOCTOR", "임상의사", JobCategory.MEDICAL), CLINICAL_RESEARCHER("CLINICAL_RESEARCHER", "임상연구원", JobCategory.MEDICAL), MEDICAL_DEVICE_RND("MEDICAL_DEVICE_RND", "의료기기 연구개발", JobCategory.MEDICAL), @@ -103,7 +93,6 @@ public enum DetailedJob { BIO_RESEARCHER("BIO_RESEARCHER", "바이오 연구원", JobCategory.MEDICAL), OTHER_MEDICAL("OTHER_MEDICAL", "기타", JobCategory.MEDICAL), - // Legal LAWYER("LAWYER", "변호사", JobCategory.LEGAL), LEGAL_COUNSEL("LEGAL_COUNSEL", "법무담당", JobCategory.LEGAL), PATENT("PATENT", "특허담당", JobCategory.LEGAL), diff --git a/src/main/java/es/princip/ringus/domain/mentor/vo/JobCategory.java b/src/main/java/es/princip/ringus/domain/mentor/vo/JobCategory.java index 164227b..2ff9f51 100644 --- a/src/main/java/es/princip/ringus/domain/mentor/vo/JobCategory.java +++ b/src/main/java/es/princip/ringus/domain/mentor/vo/JobCategory.java @@ -6,14 +6,14 @@ @Getter public enum JobCategory { - MARKETING("MARKETING", "마케팅/광고홍보/미디어"), - SERVICE_PLANNING("SERVICE_PLANNING", "서비스 기획/사업/운영"), + MARKETING("MARKETING", "마케팅"), + SERVICE_PLANNING("SERVICE_PLANNING", "서비스 기획"), DESIGN("DESIGN", "디자인"), DEVELOPMENT("DEVELOPMENT", "개발"), GRADUATE_SCHOOL("GRADUATE_SCHOOL", "대학원"), - HR_SUPPORT("HR_SUPPORT", "인사/채용/경영지원"), - SALES_CUSTOMER("SALES_CUSTOMER", "영업/고객"), - FINANCE_CONSULTING_VC("FINANCE_CONSULTING_VC", "금융/컨설팅/VC/재무"), + HR_SUPPORT("HR_SUPPORT", "인사"), + SALES_CUSTOMER("SALES_CUSTOMER", "영업"), + FINANCE("FINANCE", "금융"), DATA("DATA", "데이터"), MEDICAL("MEDICAL", "의료"), LEGAL("LEGAL", "법률"); diff --git a/src/main/resources/db/migration/V7__fix_mentor_category.sql b/src/main/resources/db/migration/V7__fix_mentor_category.sql new file mode 100644 index 0000000..46c07ca --- /dev/null +++ b/src/main/resources/db/migration/V7__fix_mentor_category.sql @@ -0,0 +1,33 @@ +ALTER TABLE mentor + MODIFY job_category ENUM( + 'DATA','DESIGN','DEVELOPMENT', + 'FINANCE','FINANCE_CONSULTING_VC', + 'GRADUATE_SCHOOL','HR_SUPPORT','LEGAL', + 'MARKETING','MEDICAL','SALES_CUSTOMER','SERVICE_PLANNING' + ); + +ALTER TABLE mentor + MODIFY detailed_job ENUM( + 'ACCOUNTING_FINANCE','AE','ANALYST','ART_DIRECTOR', + 'B2B_SALES','B2C_SALES','BACKEND','BIO_RESEARCHER','BI_ENGINEER', + 'BRAND_DESIGN','BRAND_MARKETING','BROADCAST_PD','BUSINESS_DEVELOPMENT', + 'CLINICAL_DOCTOR','CLINICAL_RESEARCHER','CLOUD','COMPLIANCE','CONSULTANT', + 'CONTENT_MARKETING','COPYWRITER','CREATIVE_DIRECTING','CSM_CX','CX_MANAGER', + 'DATA_ANALYST','DATA_ARCHITECT','DATA_ENGINEER','DATA_SCIENTIST','DEVOPS', + 'DIGITAL_SOCIAL_MARKETING','DOMESTIC_GRADUATE_SCHOOL','FRONTEND','FULLSTACK', + 'GENERAL_AFFAIRS','GRAPHIC_DESIGN','GROWTH_MARKETING','HR_OPERATION', + 'HR_PLANNING','IB_PE_ALTERNATIVE_INVESTMENT','IOS_ANDROID','KAM','LABOR', + 'LAWYER','LAW_FIRM_STAFF','LEGAL_ADVISOR','LEGAL_COUNSEL', + 'MACHINE_LEARNING_ENGINEER','MEDIA_PLANNER','MEDICAL_DEVICE_RND', + 'OPERATION_PLANNING','ORGANIZATION_CULTURE', + 'OTHER_DATA','OTHER_DESIGN','OTHER_DEVELOPMENT', + 'OTHER_FINANCE','OTHER_FINANCE_CONSULTING_VC', + 'OTHER_GRADUATE_SCHOOL','OTHER_HR_SUPPORT','OTHER_LEGAL','OTHER_MARKETING', + 'OTHER_MEDICAL','OTHER_SALES_CUSTOMER','OTHER_SERVICE_PLANNING', + 'OVERSEAS_GRADUATE_SCHOOL','OVERSEAS_SALES','PATENT','PATENT_ENGINEER', + 'PERFORMANCE_MARKETING','PHARMACEUTICAL_RESEARCHER','PM_PO','PR', + 'PRODUCT_DESIGN','RECRUITER','RECRUITMENT','RESEARCH_ANALYST', + 'SALES_SUPPORT','SECURITY','SERVICE_PLANNING','SOLUTION_CONSULTANT', + 'STARTUP','STRATEGY_PLANNING','SYSTEM_NETWORK','TALENT_DEVELOPMENT', + 'TECHNICAL_SALES','UX_UI_DESIGN','VC_INVESTMENT','WEB_DESIGN' + ); \ No newline at end of file From 183c0f28e41100b47b17dc98fd44522038093b48 Mon Sep 17 00:00:00 2001 From: wlgns12370 Date: Thu, 15 May 2025 18:43:27 +0900 Subject: [PATCH 2/5] =?UTF-8?q?RINGUS-74=20fix:=20MentorDetail=20Email=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ringus/application/mentor/service/MentorService.java | 5 +++++ .../presentation/mentor/dto/MentorDetailResponse.java | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java b/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java index 036c1ae..e274ece 100644 --- a/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java +++ b/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java @@ -74,7 +74,12 @@ public CursorResponse getMentorBy(CursorRequest request, Pag public MentorDetailResponse getDetailBy(Long mentorId) { Mentor mentor = mentorRepository.findById(mentorId) .orElseThrow(() -> new CustomRuntimeException(MentorErrorCode.MENTOR_PROFILE_NOT_FOUND)); + + Member member = memberRepository.findById(mentor.getMemberId()) + .orElseThrow(() -> new CustomRuntimeException(MemberErrorCode.MEMBER_NOT_FOUND)); + return MentorDetailResponse.from( + member, mentor, mentoringRepository.findMentoringCountBy(mentorId) ); diff --git a/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java b/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java index 824d470..254a719 100644 --- a/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java +++ b/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java @@ -1,5 +1,6 @@ package es.princip.ringus.presentation.mentor.dto; +import es.princip.ringus.domain.member.Member; import es.princip.ringus.domain.mentor.Mentor; import es.princip.ringus.domain.mentor.vo.Hashtag; import es.princip.ringus.domain.mentor.vo.MentoringField; @@ -8,6 +9,7 @@ import java.util.List; public record MentorDetailResponse( + String email, String nickname, EducationResponse education, OrganizationResponse organization, @@ -19,8 +21,13 @@ public record MentorDetailResponse( PortfolioResponse portfolio, Long mentoringCount ) { - public static MentorDetailResponse from(final Mentor mentor, Long mentoringCount) { + public static MentorDetailResponse from( + final Member member, + final Mentor mentor, + Long mentoringCount + ) { return new MentorDetailResponse( + member.getEmail(), mentor.getNickname(), EducationResponse.from(mentor.getEducation()), OrganizationResponse.from(mentor.getOrganization()), From 7df34dd4e0a2658ff4be1ebc86efb3f9b491956b Mon Sep 17 00:00:00 2001 From: wlgns12370 Date: Thu, 15 May 2025 18:49:32 +0900 Subject: [PATCH 3/5] =?UTF-8?q?RINGUS-74=20fix:=20MenteeDetail=20Email=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/mentee/service/MyMenteeService.java | 10 +++++++++- .../presentation/mentee/dto/MyMenteeResponse.java | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/es/princip/ringus/application/mentee/service/MyMenteeService.java b/src/main/java/es/princip/ringus/application/mentee/service/MyMenteeService.java index 53019b8..41ce4d4 100644 --- a/src/main/java/es/princip/ringus/application/mentee/service/MyMenteeService.java +++ b/src/main/java/es/princip/ringus/application/mentee/service/MyMenteeService.java @@ -1,6 +1,9 @@ package es.princip.ringus.application.mentee.service; +import es.princip.ringus.domain.exception.MemberErrorCode; import es.princip.ringus.domain.exception.MenteeErrorCode; +import es.princip.ringus.domain.member.Member; +import es.princip.ringus.domain.member.MemberRepository; import es.princip.ringus.domain.mentee.Mentee; import es.princip.ringus.domain.mentee.MenteeRepository; import es.princip.ringus.global.exception.CustomRuntimeException; @@ -13,11 +16,16 @@ @RequiredArgsConstructor @Transactional(readOnly = true) public class MyMenteeService { + private final MemberRepository memberRepository; private final MenteeRepository menteeRepository; public MyMenteeResponse getDetailBy(Long mentorId) { Mentee mentee = menteeRepository.findByMemberId(mentorId) .orElseThrow(() -> new CustomRuntimeException(MenteeErrorCode.MENTEE_NOT_FOUND)); - return MyMenteeResponse.from(mentee); + + Member member = memberRepository.findById(mentee.getMemberId()) + .orElseThrow(() -> new CustomRuntimeException(MemberErrorCode.MEMBER_NOT_FOUND)); + + return MyMenteeResponse.from(member,mentee); } } diff --git a/src/main/java/es/princip/ringus/presentation/mentee/dto/MyMenteeResponse.java b/src/main/java/es/princip/ringus/presentation/mentee/dto/MyMenteeResponse.java index 07140d9..da4bf71 100644 --- a/src/main/java/es/princip/ringus/presentation/mentee/dto/MyMenteeResponse.java +++ b/src/main/java/es/princip/ringus/presentation/mentee/dto/MyMenteeResponse.java @@ -1,17 +1,23 @@ package es.princip.ringus.presentation.mentee.dto; +import es.princip.ringus.domain.member.Member; import es.princip.ringus.domain.mentee.Mentee; import es.princip.ringus.presentation.common.dto.EducationResponse; import es.princip.ringus.presentation.common.dto.ProfileImageResponse; public record MyMenteeResponse( + String email, String nickname, EducationResponse education, String introduction, ProfileImageResponse image ) { - public static MyMenteeResponse from(final Mentee mentee) { + public static MyMenteeResponse from( + final Member member, + final Mentee mentee + ) { return new MyMenteeResponse( + member.getEmail(), mentee.getNickname(), EducationResponse.from(mentee.getEducation()), mentee.getIntroduction(), From 405c21cb432112445726de085c85b2130e7cdb85 Mon Sep 17 00:00:00 2001 From: wlgns12370 Date: Mon, 19 May 2025 20:10:07 +0900 Subject: [PATCH 4/5] =?UTF-8?q?RINGUS-74=20fix:=20MentorDetail=20email=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=A0=9C=EA=B1=B0=20=EB=B0=8F=20MyMentorD?= =?UTF-8?q?etail=20email=20=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/mentor/service/MentorService.java | 4 ---- .../application/mentor/service/MyMentorService.java | 10 +++++++++- .../presentation/mentor/dto/MentorDetailResponse.java | 4 ---- .../presentation/mentor/dto/MyMentorResponse.java | 5 ++++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java b/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java index e274ece..1029bb5 100644 --- a/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java +++ b/src/main/java/es/princip/ringus/application/mentor/service/MentorService.java @@ -75,11 +75,7 @@ public MentorDetailResponse getDetailBy(Long mentorId) { Mentor mentor = mentorRepository.findById(mentorId) .orElseThrow(() -> new CustomRuntimeException(MentorErrorCode.MENTOR_PROFILE_NOT_FOUND)); - Member member = memberRepository.findById(mentor.getMemberId()) - .orElseThrow(() -> new CustomRuntimeException(MemberErrorCode.MEMBER_NOT_FOUND)); - return MentorDetailResponse.from( - member, mentor, mentoringRepository.findMentoringCountBy(mentorId) ); diff --git a/src/main/java/es/princip/ringus/application/mentor/service/MyMentorService.java b/src/main/java/es/princip/ringus/application/mentor/service/MyMentorService.java index f32fb16..d8e94ab 100644 --- a/src/main/java/es/princip/ringus/application/mentor/service/MyMentorService.java +++ b/src/main/java/es/princip/ringus/application/mentor/service/MyMentorService.java @@ -1,6 +1,9 @@ package es.princip.ringus.application.mentor.service; +import es.princip.ringus.domain.exception.MemberErrorCode; import es.princip.ringus.domain.exception.MentorErrorCode; +import es.princip.ringus.domain.member.Member; +import es.princip.ringus.domain.member.MemberRepository; import es.princip.ringus.domain.mentor.Mentor; import es.princip.ringus.domain.mentor.MentorRepository; import es.princip.ringus.domain.mentoring.MentoringRepository; @@ -15,11 +18,16 @@ @Transactional(readOnly = true) public class MyMentorService { private final MentorRepository mentorRepository; + private final MemberRepository memberRepository; private final MentoringRepository mentoringRepository; public MyMentorResponse getDetailBy(Long memberId) { Mentor mentor = mentorRepository.findByMemberId(memberId) .orElseThrow(() -> new CustomRuntimeException(MentorErrorCode.MENTOR_PROFILE_NOT_FOUND)); - return MyMentorResponse.from(mentor, mentoringRepository.findMentoringCountBy(mentor.getId())); + + Member member = memberRepository.findById(mentor.getMemberId()) + .orElseThrow(() -> new CustomRuntimeException(MemberErrorCode.MEMBER_NOT_FOUND)); + + return MyMentorResponse.from(member, mentor, mentoringRepository.findMentoringCountBy(mentor.getId())); } } diff --git a/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java b/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java index 254a719..9283e18 100644 --- a/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java +++ b/src/main/java/es/princip/ringus/presentation/mentor/dto/MentorDetailResponse.java @@ -1,6 +1,5 @@ package es.princip.ringus.presentation.mentor.dto; -import es.princip.ringus.domain.member.Member; import es.princip.ringus.domain.mentor.Mentor; import es.princip.ringus.domain.mentor.vo.Hashtag; import es.princip.ringus.domain.mentor.vo.MentoringField; @@ -9,7 +8,6 @@ import java.util.List; public record MentorDetailResponse( - String email, String nickname, EducationResponse education, OrganizationResponse organization, @@ -22,12 +20,10 @@ public record MentorDetailResponse( Long mentoringCount ) { public static MentorDetailResponse from( - final Member member, final Mentor mentor, Long mentoringCount ) { return new MentorDetailResponse( - member.getEmail(), mentor.getNickname(), EducationResponse.from(mentor.getEducation()), OrganizationResponse.from(mentor.getOrganization()), diff --git a/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java b/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java index 0b4f891..13173ff 100644 --- a/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java +++ b/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java @@ -1,5 +1,6 @@ package es.princip.ringus.presentation.mentor.dto; +import es.princip.ringus.domain.member.Member; import es.princip.ringus.domain.mentor.Mentor; import es.princip.ringus.domain.mentor.vo.Hashtag; import es.princip.ringus.domain.mentor.vo.MentoringField; @@ -8,6 +9,7 @@ import java.util.List; public record MyMentorResponse( + String email, String nickname, EducationResponse education, OrganizationResponse organization, @@ -19,8 +21,9 @@ public record MyMentorResponse( PortfolioResponse portfolio, Long mentoringCount ) { - public static MyMentorResponse from(final Mentor mentor, Long mentoringCount) { + public static MyMentorResponse from(final Member member, final Mentor mentor, Long mentoringCount) { return new MyMentorResponse( + member.getEmail(), mentor.getNickname(), EducationResponse.from(mentor.getEducation()), OrganizationResponse.from(mentor.getOrganization()), From a6a1248c8d132dc190efc051fb60b9610dc49ef2 Mon Sep 17 00:00:00 2001 From: wlgns12370 Date: Wed, 21 May 2025 00:18:33 +0900 Subject: [PATCH 5/5] =?UTF-8?q?RINGUS-74=20fix:=20Portfolio=20=EB=B9=8C?= =?UTF-8?q?=EB=8D=94=20=ED=8C=A8=ED=84=B4=20=EC=A0=81=EC=9A=A9=20=EB=B0=8F?= =?UTF-8?q?=20MyMentorDetail=20image=20=ED=95=84=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ringus/presentation/common/dto/PortfolioRequest.java | 6 +++++- .../ringus/presentation/mentor/dto/MyMentorResponse.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/es/princip/ringus/presentation/common/dto/PortfolioRequest.java b/src/main/java/es/princip/ringus/presentation/common/dto/PortfolioRequest.java index 0993d46..6c12d00 100644 --- a/src/main/java/es/princip/ringus/presentation/common/dto/PortfolioRequest.java +++ b/src/main/java/es/princip/ringus/presentation/common/dto/PortfolioRequest.java @@ -8,6 +8,10 @@ public record PortfolioRequest( Integer fileSize ) { public Portfolio toEntity() { - return new Portfolio(url, description, fileSize); + return Portfolio.builder() + .filePath(url) + .fileName(description) + .fileSize(fileSize) + .build(); } } diff --git a/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java b/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java index 13173ff..99b14f2 100644 --- a/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java +++ b/src/main/java/es/princip/ringus/presentation/mentor/dto/MyMentorResponse.java @@ -19,6 +19,7 @@ public record MyMentorResponse( List hashtags, String message, PortfolioResponse portfolio, + ProfileImageResponse image, Long mentoringCount ) { public static MyMentorResponse from(final Member member, final Mentor mentor, Long mentoringCount) { @@ -33,6 +34,7 @@ public static MyMentorResponse from(final Member member, final Mentor mentor, Lo mentor.getHashtags().stream().map(Hashtag::getValue).toList(), mentor.getMessage(), PortfolioResponse.from(mentor.getPortfolio()), + ProfileImageResponse.from(mentor.getProfileImage()), mentoringCount ); }