Skip to content

Commit

Permalink
[FIX] #559 check style
Browse files Browse the repository at this point in the history
  • Loading branch information
wken5577 committed Mar 15, 2024
1 parent ea86d2a commit 9e146cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package gg.recruit.api.user.controller;

import org.springframework.data.repository.query.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import gg.auth.UserDto;
import gg.auth.argumentresolver.Login;
import gg.recruit.api.user.controller.response.MyApplicationDetailResDto;
import gg.recruit.api.user.service.param.FindApplicationDetailParam;
import gg.recruit.api.user.controller.response.MyApplicationsResDto;
import gg.recruit.api.user.service.ApplicationService;
import gg.recruit.api.user.service.param.FindApplicationDetailParam;
import gg.recruit.api.user.service.response.ApplicationListSvcDto;
import gg.recruit.api.user.service.response.ApplicationWithAnswerSvcDto;
import io.swagger.v3.oas.annotations.Parameter;
Expand All @@ -30,7 +29,8 @@ public MyApplicationsResDto getMyApplications(@Login UserDto userDto) {
}

@GetMapping("{recruitmentId}/applications/{applicationId}")
public MyApplicationDetailResDto getMyApplication(@Login @Parameter(hidden = true) UserDto userDto, Long recruitmentId, Long applicationId) {
public MyApplicationDetailResDto getMyApplication(@Login @Parameter(hidden = true) UserDto userDto,
Long recruitmentId, Long applicationId) {
ApplicationWithAnswerSvcDto res = applicationService
.findMyApplicationDetail(new FindApplicationDetailParam(userDto.getId(), recruitmentId, applicationId));
return new MyApplicationDetailResDto(res);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public ApplicationListSvcDto findMyApplications(Long userId) {
public ApplicationWithAnswerSvcDto findMyApplicationDetail(FindApplicationDetailParam param) {
List<ApplicationAnswer> answers = applicationAnswerRepository
.findAllAnswers(param.getUserId(), param.getRecruitId(), param.getApplicationId());
if (answers.size() == 0)
if (answers.size() == 0) {
throw new NotExistException("application not found", ErrorCode.BAD_REQUEST);
}
return new ApplicationWithAnswerSvcDto(answers);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import gg.data.recruit.application.ApplicationAnswer;
import gg.data.recruit.application.ApplicationAnswerEntityDto;
import lombok.Getter;

@Getter
public class ApplicationWithAnswerSvcDto {
private Long applicationId;
private LocalDateTime endTime;
private String title;
private String content;
private List<FormSvcDto> form;
private final Long applicationId;
private final LocalDateTime endTime;
private final String title;
private final String content;
private final List<FormSvcDto> form;

public ApplicationWithAnswerSvcDto(List<ApplicationAnswer> answers) {
this.applicationId = answers.get(0).getApplication().getId();
Expand Down

0 comments on commit 9e146cc

Please sign in to comment.