-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] #559 merge recruit-dev into 559
- Loading branch information
Showing
47 changed files
with
292 additions
and
60 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
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
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
2 changes: 1 addition & 1 deletion
2
...ain/java/gg/pingpong/api/admin/manage/controller/request/FeedbackAdminPageRequestDto.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
2 changes: 1 addition & 1 deletion
2
.../src/main/java/gg/pingpong/api/admin/noti/controller/request/NotiListAdminRequestDto.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
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
2 changes: 1 addition & 1 deletion
2
.../main/java/gg/pingpong/api/admin/store/controller/request/ReceiptAdminPageRequestDto.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
2 changes: 1 addition & 1 deletion
2
...rc/main/java/gg/pingpong/api/admin/user/controller/request/UserSearchAdminRequestDto.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
10 changes: 0 additions & 10 deletions
10
gg-pingpong-api/src/main/java/gg/pingpong/api/global/config/JpaAuditingConfig.java
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
...-api/src/main/java/gg/pingpong/api/user/game/controller/request/NormalGameListReqDto.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
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
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
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
25 changes: 25 additions & 0 deletions
25
gg-recruit-api/src/main/java/gg/recruit/api/user/controller/RecruitmentController.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,25 @@ | ||
package gg.recruit.api.user.controller; | ||
|
||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import gg.recruit.api.user.controller.response.ActiveRecruitmentListResDto; | ||
import gg.recruit.api.user.service.RecruitmentService; | ||
import gg.utils.dto.PageRequestDto; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/recruitments") | ||
public class RecruitmentController { | ||
private final RecruitmentService recruitmentService; | ||
|
||
@GetMapping | ||
public ActiveRecruitmentListResDto findActiveRecruitmentList(PageRequestDto requestDto) { | ||
Pageable pageable = PageRequest.of(requestDto.getPage() - 1, requestDto.getSize()); | ||
return new ActiveRecruitmentListResDto(recruitmentService.findActiveRecruitmentList(pageable)); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...pi/src/main/java/gg/recruit/api/user/controller/response/ActiveRecruitmentListResDto.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,20 @@ | ||
package gg.recruit.api.user.controller.response; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
import gg.recruit.api.user.service.response.RecruitmentListSvcDto; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class ActiveRecruitmentListResDto { | ||
private List<RecruitmentDto> recruitments; | ||
private Integer totalPage; | ||
|
||
public ActiveRecruitmentListResDto(RecruitmentListSvcDto dto) { | ||
this.recruitments = dto.getRecruitments().stream().map(RecruitmentDto::new).collect(Collectors.toList()); | ||
this.totalPage = dto.getTotalPage(); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...ontroller/response/ApplicationResDto.java → ...ontroller/response/ApplicationResDto.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
4 changes: 2 additions & 2 deletions
4
.../controller/response/CheckListResDto.java → .../controller/response/CheckListResDto.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
4 changes: 2 additions & 2 deletions
4
...ation/controller/response/FormResDto.java → .../user/controller/response/FormResDto.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
4 changes: 2 additions & 2 deletions
4
...r/response/MyApplicationDetailResDto.java → ...r/response/MyApplicationDetailResDto.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
4 changes: 2 additions & 2 deletions
4
...roller/response/MyApplicationsResDto.java → ...roller/response/MyApplicationsResDto.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
32 changes: 32 additions & 0 deletions
32
gg-recruit-api/src/main/java/gg/recruit/api/user/controller/response/RecruitmentDto.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,32 @@ | ||
package gg.recruit.api.user.controller.response; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import gg.recruit.api.user.service.response.RecruitmentSvcDto; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class RecruitmentDto { | ||
private Long id; | ||
private LocalDateTime startDate; | ||
private LocalDateTime endDate; | ||
private String title; | ||
private RecruitmentStatus status; | ||
private String generation; | ||
|
||
public RecruitmentDto(RecruitmentSvcDto dto) { | ||
this.id = dto.getId(); | ||
this.startDate = dto.getStartDate(); | ||
this.endDate = dto.getEndDate(); | ||
this.title = dto.getTitle(); | ||
this.generation = dto.getGeneration(); | ||
this.status = RecruitmentStatus.BEFORE; | ||
if (LocalDateTime.now().isAfter(dto.getStartDate()) && LocalDateTime.now().isBefore(dto.getEndDate())) { | ||
this.status = RecruitmentStatus.PROGRESS; | ||
} else if (LocalDateTime.now().isAfter(dto.getEndDate())) { | ||
this.status = RecruitmentStatus.FINISHED; | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
gg-recruit-api/src/main/java/gg/recruit/api/user/controller/response/RecruitmentStatus.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,9 @@ | ||
package gg.recruit.api.user.controller.response; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@RequiredArgsConstructor | ||
public enum RecruitmentStatus { | ||
BEFORE("모집전"), PROGRESS("모집중"), FINISHED("모집완료"); | ||
private final String desc; | ||
} |
Oops, something went wrong.