From 05bae8f92a8d53c68c065af8f8aed9742165b777 Mon Sep 17 00:00:00 2001 From: yang Date: Sat, 25 May 2024 03:12:42 +0900 Subject: [PATCH 1/3] =?UTF-8?q?RAC-387=20feat=20:=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=A1=B0=ED=9A=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../senior/domain/repository/SeniorDslRepositoryImpl.java | 3 +++ .../domain/senior/presentation/SeniorController.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/postgraduate/domain/senior/domain/repository/SeniorDslRepositoryImpl.java b/src/main/java/com/postgraduate/domain/senior/domain/repository/SeniorDslRepositoryImpl.java index e484d5b7..45d012cb 100644 --- a/src/main/java/com/postgraduate/domain/senior/domain/repository/SeniorDslRepositoryImpl.java +++ b/src/main/java/com/postgraduate/domain/senior/domain/repository/SeniorDslRepositoryImpl.java @@ -108,6 +108,9 @@ public Page findAllByFieldSenior(String field, String postgradu, Pageabl } private BooleanExpression fieldSpecifier(String fields) { + if (fields.contains(ALL)) + return TRUE; + String[] field = fields.split(","); if (fields.contains(ETC)) return Arrays.stream(field) diff --git a/src/main/java/com/postgraduate/domain/senior/presentation/SeniorController.java b/src/main/java/com/postgraduate/domain/senior/presentation/SeniorController.java index 4b7500df..17479a0a 100644 --- a/src/main/java/com/postgraduate/domain/senior/presentation/SeniorController.java +++ b/src/main/java/com/postgraduate/domain/senior/presentation/SeniorController.java @@ -128,7 +128,7 @@ public ResponseDto getSearchSenior(@RequestParam String } @GetMapping("/field") - @Operation(summary = "대학원생 필드 검색", description = "분야 (분야1,분야2 이런식으로, 다른분야 : others), 대학원 필수 (대학원1,대학원2 이런식으로, 다른학교 : others, 전체 : all), 페이지 선택 ") + @Operation(summary = "대학원생 필드 검색", description = "분야 (분야1,분야2 이런식으로, 다른분야 : others, 전체 : all), 대학원 필수 (대학원1,대학원2 이런식으로, 다른학교 : others, 전체 : all), 페이지 선택 ") public ResponseDto getFieldSenior(@RequestParam String field, @RequestParam String postgradu, @RequestParam(required = false) Integer page) { From 2b16bd442e1e3591b0bbb55d686b195a7656b7a9 Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 26 May 2024 03:35:45 +0900 Subject: [PATCH 2/3] =?UTF-8?q?RAC-386=20feat=20:=20=EB=B0=B0=EC=B9=98=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EA=B4=80=EB=A0=A8=20=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../postgraduate/batch/salary/CreateSalaryItemWriter.java | 2 +- .../postgraduate/batch/salary/CreateSalaryJobConfig.java | 7 ++++++- .../postgraduate/batch/salary/CreateSalaryRepository.java | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/postgraduate/batch/salary/CreateSalaryItemWriter.java b/src/main/java/com/postgraduate/batch/salary/CreateSalaryItemWriter.java index d8bd95d8..04cf9885 100644 --- a/src/main/java/com/postgraduate/batch/salary/CreateSalaryItemWriter.java +++ b/src/main/java/com/postgraduate/batch/salary/CreateSalaryItemWriter.java @@ -16,7 +16,7 @@ public class CreateSalaryItemWriter implements ItemWriter { private final CreateSalaryRepository createSalaryRepository; @Override - public void write(Chunk chunk) throws Exception { + public void write(Chunk chunk) { List createSalaries = new ArrayList<>(); chunk.forEach(createSalaries::add); createSalaryRepository.insertAllSalary(createSalaries); diff --git a/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java b/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java index bfcdb05c..198a9894 100644 --- a/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java +++ b/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java @@ -4,6 +4,7 @@ import com.postgraduate.domain.salary.domain.service.SalaryGetService; import com.postgraduate.global.slack.SlackSalaryMessage; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.batch.core.Job; import org.springframework.batch.core.Step; import org.springframework.batch.core.job.builder.JobBuilder; @@ -19,6 +20,7 @@ import org.springframework.transaction.PlatformTransactionManager; import javax.sql.DataSource; +import java.time.LocalDate; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,6 +28,7 @@ import static com.postgraduate.domain.salary.util.SalaryUtil.getSalaryDate; @Configuration +@Slf4j @RequiredArgsConstructor public class CreateSalaryJobConfig { private final JobRepository jobRepository; @@ -73,7 +76,9 @@ public Step createSalaryStep() throws Exception { @Bean(name = "salaryReader") public JdbcPagingItemReader salaryReader() throws Exception { Map parameters = new HashMap<>(); - parameters.put("salaryDate", getSalaryDate().plusDays(7)); + LocalDate salaryDate = getSalaryDate().plusDays(7); + parameters.put("salaryDate", salaryDate); + log.info("salaryReader salaryDate : {}", salaryDate); return new JdbcPagingItemReaderBuilder() .pageSize(CHUNK_SIZE) .fetchSize(CHUNK_SIZE) diff --git a/src/main/java/com/postgraduate/batch/salary/CreateSalaryRepository.java b/src/main/java/com/postgraduate/batch/salary/CreateSalaryRepository.java index 2a50b27d..a1b4878d 100644 --- a/src/main/java/com/postgraduate/batch/salary/CreateSalaryRepository.java +++ b/src/main/java/com/postgraduate/batch/salary/CreateSalaryRepository.java @@ -1,6 +1,7 @@ package com.postgraduate.batch.salary; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc.core.namedparam.SqlParameterSource; @@ -14,6 +15,7 @@ @Component @RequiredArgsConstructor +@Slf4j public class CreateSalaryRepository { private final NamedParameterJdbcTemplate jdbcTemplate; private static final String INSERT_SALARY = "insert into salary " + @@ -32,6 +34,7 @@ private SqlParameterSource[] generateParameterSource(List createSa } private Map generateEntityParams(CreateSalary createSalary) { + log.info("create salary for seniorId : {}", createSalary.seniorId()); HashMap parameter = new HashMap<>(); parameter.put("salaryDate", getSalaryDate().plusDays(7)); parameter.put("seniorId", createSalary.seniorId()); From 80d4e6d20260a0763370873f72f273b219e25810 Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 26 May 2024 03:42:32 +0900 Subject: [PATCH 3/3] =?UTF-8?q?RAC-386=20fix=20:=20SkipListener=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../postgraduate/batch/done/DoneMentoringSkipListener.java | 6 +++--- .../postgraduate/batch/salary/CreateSalarySkipListener.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/postgraduate/batch/done/DoneMentoringSkipListener.java b/src/main/java/com/postgraduate/batch/done/DoneMentoringSkipListener.java index 6f75a1df..7901e59c 100644 --- a/src/main/java/com/postgraduate/batch/done/DoneMentoringSkipListener.java +++ b/src/main/java/com/postgraduate/batch/done/DoneMentoringSkipListener.java @@ -14,18 +14,18 @@ public class DoneMentoringSkipListener implements SkipListener