Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ public static JobInfoResponseDTO.AddJobResultDTO toAddJobResultDTO(JobInfo jobIn
.build();
}

public static List<JobInfoResponseDTO.JobInfoResultDTO> getJobInfoListDTO(List<JobInfo> jobInfos) {
public static List<JobInfoResponseDTO.JobInfoListDTO> getJobInfoListDTO(List<JobInfo> jobInfos) {
return jobInfos.stream()
.map(job -> JobInfoResponseDTO.JobInfoResultDTO.builder()
.map(job -> JobInfoResponseDTO.JobInfoListDTO.builder()
.id(job.getId())
.title(job.getTitle())
.content(job.getContent())
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

public interface JobInfoQueryService {

List<JobInfoResponseDTO.JobInfoResultDTO> getJobInfoList(Long userId);
List<JobInfoResponseDTO.JobInfoListDTO> getJobInfoList(Long userId);
JobInfoResponseDTO.JobInfoDetailDTO getJobInfoDetails(Long userId, Long jobInfoId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class JobInfoQueryServiceImpl implements JobInfoQueryService {
private final JobInfoRepository jobInfoRepository;

@Override
public List<JobInfoResponseDTO.JobInfoResultDTO> getJobInfoList(Long userId) {
public List<JobInfoResponseDTO.JobInfoListDTO> getJobInfoList(Long userId) {

List<JobInfo> jobInfos = jobInfoRepository.findJobInfoList(userId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public ApiResponse<List<JobInfoResponseDTO.AddJobResultDTO>> addJobInfo(@Request
}

@GetMapping("")
public ApiResponse<List<JobInfoResponseDTO.JobInfoResultDTO>> getJobInfoList() {
public ApiResponse<List<JobInfoResponseDTO.JobInfoListDTO>> getJobInfoList() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
Long userId = (Long) authentication.getPrincipal();

List<JobInfoResponseDTO.JobInfoResultDTO> response = jobInfoQueryService.getJobInfoList(userId);
List<JobInfoResponseDTO.JobInfoListDTO> response = jobInfoQueryService.getJobInfoList(userId);
return ApiResponse.onSuccess(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface JobInfoSpecification {
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON200", description = "⭕ SUCCESS, 성공"),
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON400", description = "❌ BAD, 잘못된 요청", content = @Content(schema = @Schema(implementation = ApiResponse.class)))
})
ApiResponse<List<JobInfoResponseDTO.JobInfoResultDTO>> getJobInfoList();
ApiResponse<List<JobInfoResponseDTO.JobInfoListDTO>> getJobInfoList();

@GetMapping("/{jobInfoId}")
@Operation(summary = "특정 구직정보 조회", description = "내가 저장한 특정 구직정보를 조회합니다. 구직정보 아이디 값을 보내주세요.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ public static class AddJobResultDTO {
private String content;
}

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class JobInfoListDTO {
private Long id;
private String title;
private String content;
}

// 저장한 구직정보 상세페이지 dto
@Getter
@Builder
Expand Down