Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsoftj1123 committed Nov 12, 2023
2 parents 22c60f0 + 5e12fe6 commit 191ace5
Show file tree
Hide file tree
Showing 42 changed files with 224 additions and 152 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: dev-cd
on:
push:
branches:
- main
- develop

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class StringUtil {

public static <E> String joinStringList(List<E> request) {
return request == null ? null : String.join(",", request.stream().map(Object::toString).toList());
public static <E> String joinStringList(List<E> request, String key) {
return request == null ? null : String.join(key, request.stream().map(Object::toString).toList());
}

public static String mergeString(String str1, String str2) {
return str1 + " " + str2;
}

public static List<String> divideString(String content) {
public static List<String> divideString(String content, String key) {
if (content == null || content.isEmpty()) {
return List.of();
}
return List.of(content.split(","));
return List.of(content.split(key));
}

public static String generateRandomCode(int size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class Company {
private final String serviceName;
private final List<String> attachmentUrls;

public Company update(String mainAddress, String mainAddressDetail, String mainZipCode, String subAddress, String subAddressDetail,String subZipCode,
public Company update(String mainAddress, String mainAddressDetail, String mainZipCode, String subAddress, String subAddressDetail, String subZipCode,
double take, int workersCount, String managerName, String managerPhoneNo, String subManagerName,
String subManagerPhoneNo, String companyIntroduce, String companyLogoUrl, String fax, String email, String serviceName) {
return this.toBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import team.retum.jobis.common.annotation.ReadOnlyUseCase;
import team.retum.jobis.common.spi.FeignClientPort;
import team.retum.jobis.domain.company.dto.response.CheckCompanyExistsResponse;
import team.retum.jobis.domain.company.exception.CompanyNotExistsException;
import team.retum.jobis.domain.company.spi.QueryCompanyPort;

@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class RecruitmentFilter {

private final Long studentId;

private final String jobKeyword;
private final Long jobCode;

@Builder.Default
private int limit = 11;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import team.retum.jobis.domain.recruitment.model.ProgressType;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Getter
Expand All @@ -13,19 +14,19 @@ public class ApplyRecruitmentRequest {

private List<CreateRecruitAreaRequest> areas;

private String preferentialTreatment;

private Integer requiredGrade;

private int workHours;
private LocalTime startTime;

private LocalTime endTime;

private List<String> requiredLicenses;

private List<ProgressType> hiringProgress;

private int trainPay;

private Integer pay;
private String pay;

private String benefits;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ public class CreateRecruitAreaRequest {
private int hiring;

private String majorTask;

private String preferentialTreatment;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@
import team.retum.jobis.domain.recruitment.model.ProgressType;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Getter
@Builder
public class UpdateRecruitmentRequest {

private String preferentialTreatment;

private Integer requiredGrade;

private Integer workHours;
private LocalTime startTime;

private LocalTime endTime;

private List<String> requiredLicenses;

private List<ProgressType> hiringProgress;

private Integer trainPay;

private Integer pay;
private String pay;

private String benefits;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import team.retum.jobis.domain.recruitment.model.ProgressType;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Getter
Expand All @@ -17,9 +18,10 @@ public class QueryMyRecruitmentResponse {
private final String preferentialTreatment;
private final Integer requiredGrade;
private final List<String> requiredLicenses;
private final Integer workHours;
private final LocalTime startTime;
private final LocalTime endTime;
private final Integer trainPay;
private final Integer pay;
private final String pay;
private final String benefits;
private final boolean militarySupport;
private final List<ProgressType> hiringProgress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import team.retum.jobis.domain.recruitment.spi.vo.RecruitmentDetailVO;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Getter
Expand All @@ -17,14 +18,13 @@ public class QueryRecruitmentDetailResponse {
private final String companyProfileUrl;
private final String companyName;
private final List<RecruitAreaResponse> areas;
private final String preferentialTreatment;
private final Integer requiredGrade;
private final Integer workHours;
private final LocalTime startTime;
private final LocalTime endTime;
private final List<String> requiredLicenses;

private final List<ProgressType> hiringProgress;
private final Integer trainPay;
private final Integer pay;
private final String pay;
private final String benefits;
private final Boolean military;
private final String submitDocument;
Expand All @@ -39,9 +39,9 @@ public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentD
.companyProfileUrl(recruitmentDetail.getCompanyProfileUrl())
.companyName(recruitmentDetail.getCompanyName())
.areas(recruitAreas)
.preferentialTreatment(recruitmentDetail.getPreferentialTreatment())
.requiredGrade(recruitmentDetail.getRequiredGrade())
.workHours(recruitmentDetail.getWorkHours())
.startTime(recruitmentDetail.getStartTime())
.endTime(recruitmentDetail.getEndTime())
.requiredLicenses(recruitmentDetail.getRequiredLicenses())
.hiringProgress(recruitmentDetail.getHiringProgress())
.trainPay(recruitmentDetail.getTrainPay())
Expand All @@ -54,5 +54,4 @@ public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentD
.etc(recruitmentDetail.getEtc())
.build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ public class RecruitAreaResponse {
private final int hiring;

private final String majorTask;

private final String preferentialTreatment;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.Getter;
import team.retum.jobis.common.annotation.Aggregate;

import java.util.List;

@Getter
@Builder
@Aggregate
Expand All @@ -15,7 +17,9 @@ public class RecruitArea {

private final String majorTask;

private final String jobCodes;
private final List<String> jobCodes;

private final String preferentialTreatment;

private final Long recruitmentId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import team.retum.jobis.domain.recruitment.exception.InvalidRecruitmentStatusException;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Getter
Expand All @@ -20,13 +21,13 @@ public class Recruitment {

private final RecruitStatus status;

private final String preferentialTreatment;

private final List<String> requiredLicenses;

private final Integer requiredGrade;

private final Integer workingHours;
private final LocalTime startTime;

private final LocalTime endTime;

private final String benefits;

Expand All @@ -44,23 +45,23 @@ public class Recruitment {

private final Integer trainPay;

private final Integer pay;
private final String pay;

private final boolean personalContract;

private final Long companyId;

public Recruitment update(Integer trainPay, Integer pay, int workingHours, String submitDocument,
public Recruitment update(Integer trainPay, String pay, LocalTime startTime, LocalTime endTime, String submitDocument,
LocalDate startDate, LocalDate endDate, String benefits, List<String> requiredLicenses,
boolean militarySupport, String etc, String preferentialTreatment, List<ProgressType> hiringProgress, Integer requiredGrade
boolean militarySupport, String etc, List<ProgressType> hiringProgress, Integer requiredGrade
) {
return this.toBuilder()
.workingHours(workingHours)
.startTime(startTime)
.endTime(endTime)
.hiringProgress(hiringProgress)
.submitDocument(submitDocument)
.requiredGrade(requiredGrade)
.benefits(benefits)
.preferentialTreatment(preferentialTreatment)
.startDate(startDate)
.endDate(endDate)
.trainPay(trainPay)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import lombok.RequiredArgsConstructor;
import team.retum.jobis.common.annotation.Service;
import team.retum.jobis.common.util.StringUtil;
import team.retum.jobis.domain.code.model.Code;
import team.retum.jobis.domain.code.model.RecruitAreaCode;
import team.retum.jobis.domain.code.spi.QueryCodePort;
import team.retum.jobis.domain.recruitment.dto.request.CreateRecruitAreaRequest;
Expand All @@ -17,18 +15,17 @@
public class SaveRecruitmentAreaService {

private final CommandRecruitmentPort commandRecruitmentPort;
private final QueryCodePort queryCodePort;

public void execute(CreateRecruitAreaRequest request, Long recruitmentId) {
List<Code> jobCodes = queryCodePort.queryCodesByIdIn(request.getJobCodes());
String recruitJobs = StringUtil.joinStringList(jobCodes.stream().map(Code::getKeyword).toList());
List<String> jobCodes = request.getJobCodes().stream().map(Object::toString).toList();

RecruitArea savedRecruitArea = commandRecruitmentPort.saveRecruitmentArea(
RecruitArea.builder()
.recruitmentId(recruitmentId)
.hiredCount(request.getHiring())
.jobCodes(recruitJobs)
.jobCodes(jobCodes)
.majorTask(request.getMajorTask())
.preferentialTreatment(request.getPreferentialTreatment())
.build()
);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import team.retum.jobis.domain.recruitment.model.ProgressType;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Getter
Expand All @@ -15,14 +16,13 @@ public class RecruitmentDetailVO {
private final Long companyId;
private final String companyProfileUrl;
private final String companyName;
private final String preferentialTreatment;
private final Integer requiredGrade;
private final Integer workHours;
private final LocalTime startTime;
private final LocalTime endTime;
private final List<String> requiredLicenses;

private final List<ProgressType> hiringProgress;
private final Integer trainPay;
private final Integer pay;
private final String pay;
private final String benefits;
private final Boolean military;
private final String submitDocument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class RecruitmentVO {
private final Integer trainPay;
private final boolean militarySupport;
private final String companyLogoUrl;
private final String recruitAreaList;
private final String jobCodes;
private final Integer totalHiring;
private final Long requestedApplicationCount;
private final Long approvedApplicationCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public void execute(ApplyRecruitmentRequest request) {
.recruitYear(Year.now().getValue())
.militarySupport(request.isMilitarySupport())
.personalContract(request.isPersonalContact())
.workingHours(request.getWorkHours())
.preferentialTreatment(request.getPreferentialTreatment())
.startTime(request.getStartTime())
.endTime(request.getEndTime())
.requiredLicenses(request.getRequiredLicenses())
.status(RecruitStatus.REQUESTED)
.requiredGrade(request.getRequiredGrade())
Expand Down
Loading

0 comments on commit 191ace5

Please sign in to comment.