Skip to content

Commit ddb1d19

Browse files
committed
#116 Feat: 강점 리포트 조회 응답에 사용자 희망 직업을 추가한다
1 parent 16bf8de commit ddb1d19

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/main/java/next/career/domain/report/controller/dto/GetStrengthReportDto.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ public class GetStrengthReportDto {
1515
@Builder
1616
public static class Response{
1717
private List<Report> reportList;
18+
private String occupation;
1819

19-
public static Response of(List<Report> reportList){
20+
public static Response of(List<Report> reportList, String occupation){
2021
return Response.builder()
22+
.occupation(occupation)
2123
.reportList(reportList)
2224
.build();
2325
}

src/main/java/next/career/domain/report/entity/StrengthReport.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public class StrengthReport {
4646

4747
boolean isDeleted = false;
4848

49+
private String occupation;
50+
4951
public static StrengthReport of(Member member, String strength, String experience,
50-
List<String> keyword, List<String> job, String appeal, int version) {
52+
List<String> keyword, List<String> job, String appeal, int version, String occupation) {
5153
return StrengthReport.builder()
5254
.member(member)
5355
.strength(strength)
@@ -56,6 +58,7 @@ public static StrengthReport of(Member member, String strength, String experienc
5658
.job(job)
5759
.appeal(appeal)
5860
.version(version)
61+
.occupation(occupation)
5962
.build();
6063
}
6164

src/main/java/next/career/domain/report/service/ReportService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public GetStrengthReportDto.Response createStrengthReport(Member member, String
4040
r.getKeyword(),
4141
r.getJob(),
4242
r.getAppeal(),
43-
newVersion
43+
newVersion,
44+
occupation
4445
))
4546
.toList();
4647

@@ -65,7 +66,7 @@ public GetStrengthReportDto.Response getStrengthReport(Member member) {
6566
.toList();
6667

6768

68-
return GetStrengthReportDto.Response.of(reportList);
69+
return GetStrengthReportDto.Response.of(reportList, strengthReportList.getFirst().getOccupation());
6970
}
7071

7172
public GetStrengthReportDto.Response getStrengthReportCurrentHistory(Member member) {
@@ -93,7 +94,7 @@ public GetStrengthReportDto.Response getStrengthReportCurrentHistory(Member memb
9394
.toList();
9495

9596

96-
return GetStrengthReportDto.Response.of(reportList);
97+
return GetStrengthReportDto.Response.of(reportList, latestReports.getFirst().getOccupation());
9798
}
9899

99100
@Transactional

0 commit comments

Comments
 (0)