Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] issue188: 스터디 상태 자동 변경 #191

Merged
merged 21 commits into from Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
43d759f
feat: 스케쥴러를 이용한 스터디 상태 자동 변경
tco0427 Aug 3, 2022
13935dd
refactor: 스케줄러 로직 개선
tco0427 Aug 3, 2022
edbdd6d
fix: 테스트 코드 수정
tco0427 Aug 3, 2022
1d37bc2
refactor: 응답 값이 없는 경우 null 반환
tco0427 Aug 3, 2022
b39181a
chore: 충돌 해결
tco0427 Aug 3, 2022
3bdaddf
Merge branch 'develop' of https://github.com/woowacourse-teams/2022-m…
tco0427 Aug 3, 2022
e224dd1
refactor: 메소드명 개선 및 Getter 추가
tco0427 Aug 3, 2022
604e9b4
refactor: 불필요한 메소드 제거
tco0427 Aug 3, 2022
f10eb90
refactor: log 개선
tco0427 Aug 4, 2022
a196411
refactor: 기존 메소드 활용
tco0427 Aug 4, 2022
5568c77
refactor: `@Enumerated` 통일
tco0427 Aug 4, 2022
7392e40
feat: 테스트 코드 수정
tco0427 Aug 4, 2022
ae0c1b0
refactor: StudyPlanner 수정
tco0427 Aug 4, 2022
d551ac7
Merge branch 'develop' of https://github.com/woowacourse-teams/2022-m…
tco0427 Aug 4, 2022
e2ebea9
Merge branch 'develop' of https://github.com/woowacourse-teams/2022-m…
tco0427 Aug 4, 2022
e1f1ce0
Merge branch 'develop' of https://github.com/woowacourse-teams/2022-m…
tco0427 Aug 4, 2022
dc4d4ea
feat: Study 불변식 검증 추가
tco0427 Aug 4, 2022
e87dc38
Merge branch 'develop' of https://github.com/woowacourse-teams/2022-m…
tco0427 Aug 4, 2022
3cc64c2
refactor: Auto에 Transactional 제거
tco0427 Aug 4, 2022
88aa874
fix: 불필요한 Bean 제거
tco0427 Aug 4, 2022
a89b0ba
test: 테스트 코드 개선
tco0427 Aug 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,26 +1,29 @@
package com.woowacourse.moamoa.study.domain;

import static com.woowacourse.moamoa.study.domain.RecruitStatus.RECRUITMENT_END;
import static com.woowacourse.moamoa.study.domain.RecruitStatus.RECRUITMENT_START;
import static javax.persistence.EnumType.STRING;
import static lombok.AccessLevel.PROTECTED;

import java.time.LocalDate;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import lombok.NoArgsConstructor;

@Embeddable
@NoArgsConstructor(access = PROTECTED)
public class RecruitPlanner {

@Column(name = "max_member_count")
private Integer max;

@Enumerated(EnumType.STRING)
@Enumerated(value = STRING)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value 제거해주세요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!! 일관성 있게 나머지 @Enumerated 도 통일해주었습니다!

@Column(name = "recruitment_status")
private RecruitStatus recruitStatus;

private LocalDate enrollmentEndDate;

protected RecruitPlanner() {
}

public RecruitPlanner(final Integer max, final RecruitStatus recruitStatus, final LocalDate enrollmentEndDate) {
this.max = max;
this.recruitStatus = recruitStatus;
Expand All @@ -38,20 +41,26 @@ boolean isRecruitedBeforeThan(LocalDate date) {
return enrollmentEndDate.isBefore(date);
}

boolean isNeedToCloseRecruiting(final LocalDate now) {
return recruitStatus.equals(RecruitStatus.RECRUITMENT_START) && isRecruitedBeforeThan(now);
void updateRecruiting(final LocalDate now) {
if (isNeedToCloseRecruiting(now)) {
closeRecruiting();
}
}

private boolean isNeedToCloseRecruiting(final LocalDate now) {
return recruitStatus.equals(RECRUITMENT_START) && isRecruitedBeforeThan(now);
}

void closeRecruiting() {
recruitStatus = RecruitStatus.RECRUITMENT_END;
recruitStatus = RECRUITMENT_END;
}

LocalDate getEnrollmentEndDate() {
return enrollmentEndDate;
}

boolean isCloseEnrollment() {
return recruitStatus.equals(RecruitStatus.RECRUITMENT_END);
return recruitStatus.equals(RECRUITMENT_END);
}

int getCapacity() {
Expand Down
Expand Up @@ -95,19 +95,20 @@ public void participate(final Long memberId) {
}
}

private boolean isFullOfCapacity() {
return recruitPlanner.hasCapacity() && recruitPlanner.getCapacity() == participants.getSize();
public void changeStatus(final LocalDate now) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Study 객체에서 상태 관리 👍

recruitPlanner.updateRecruiting(now);
studyPlanner.updateStatus(now);
}

public boolean isNeedToCloseRecruiting(LocalDate now) {
return recruitPlanner.isNeedToCloseRecruiting(now);
public boolean isProgressStatus() {
return studyPlanner.isProgress();
}

public void closeEnrollment() {
recruitPlanner.closeRecruiting();
public boolean isCloseStudy() {
return studyPlanner.isCloseStudy();
}

public boolean isCloseEnrollment() {
return recruitPlanner.isCloseEnrollment();
private boolean isFullOfCapacity() {
return recruitPlanner.hasCapacity() && recruitPlanner.getCapacity() == participants.getSize();
}
}
@@ -1,17 +1,21 @@
package com.woowacourse.moamoa.study.domain;

import static com.woowacourse.moamoa.study.domain.StudyStatus.DONE;
import static com.woowacourse.moamoa.study.domain.StudyStatus.IN_PROGRESS;
import static com.woowacourse.moamoa.study.domain.StudyStatus.PREPARE;
import static javax.persistence.EnumType.STRING;
import static lombok.AccessLevel.PROTECTED;

import com.woowacourse.moamoa.study.domain.exception.InvalidPeriodException;
import java.time.LocalDate;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Enumerated;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Embeddable
@EqualsAndHashCode
@NoArgsConstructor(access = PROTECTED)
public class StudyPlanner {

Expand Down Expand Up @@ -44,28 +48,32 @@ boolean isEndBeforeThan(LocalDate date) {
return endDate.isBefore(date);
}

boolean isPreparing() {
return studyStatus.equals(StudyStatus.PREPARE);
void updateStatus(final LocalDate now) {
if (isNeedToCloseStudy(now)) {
studyStatus = DONE;
}
if (isNeedToChangeProgress(now)) {
studyStatus = IN_PROGRESS;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (isNeedToCloseStudy(now)) {
studyStatus = DONE;
}
if (isNeedToChangeProgress(now)) {
studyStatus = IN_PROGRESS;
}
if (isNeedToChangeStatus(now)) {
studyStatus = nextStatus(now);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정해보았습니다~_~

}

public StudyStatus getStudyStatus() {
return studyStatus;
private boolean isNeedToCloseStudy(final LocalDate now) {
return (endDate != null) && (studyStatus.equals(IN_PROGRESS)) && (endDate.isAfter(now) || endDate.isEqual(now));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 isProgress 메서드 써도 좋을 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오!! 좋네요~_~

}

@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final StudyPlanner studyPlanner = (StudyPlanner) o;
return Objects.equals(startDate, studyPlanner.startDate) && Objects.equals(endDate, studyPlanner.endDate);
private boolean isNeedToChangeProgress(final LocalDate now) {
return (studyStatus.equals(PREPARE)) && (startDate.isAfter(now) || startDate.isEqual(now));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

밑에 있는 isPreparing 메서드 써도 좋을 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오!! 변경하도록 하겠습니다~_~

}

boolean isProgress() {
return studyStatus.equals(IN_PROGRESS);
}

boolean isPreparing() {
return studyStatus.equals(PREPARE);
}

@Override
public int hashCode() {
return Objects.hash(startDate, endDate);
boolean isCloseStudy() {
return studyStatus.equals(DONE);
}
}
Expand Up @@ -4,7 +4,6 @@
import com.woowacourse.moamoa.study.service.StudyService;
import java.time.LocalDateTime;
import java.time.ZoneId;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.config.TriggerTask;
Expand All @@ -27,7 +26,7 @@ private static Runnable runnable(final StudyService studyService) {
@Transactional
public void run() {
LOGGER.debug(LocalDateTime.now() + " : " + "start moamoa scheduled task!");
studyService.autoCloseStudies();
studyService.autoUpdateStatus();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 이렇게 한거군요!

}
};
}
Expand Down
@@ -1,18 +1,15 @@
package com.woowacourse.moamoa.study.service;

import static com.woowacourse.moamoa.study.domain.StudyStatus.IN_PROGRESS;
import static com.woowacourse.moamoa.study.domain.StudyStatus.PREPARE;

import com.woowacourse.moamoa.common.exception.UnauthorizedException;
import com.woowacourse.moamoa.common.utils.DateTimeSystem;
import com.woowacourse.moamoa.member.domain.Member;
import com.woowacourse.moamoa.member.domain.repository.MemberRepository;
import com.woowacourse.moamoa.study.domain.AttachedTags;
import com.woowacourse.moamoa.study.domain.Content;
import com.woowacourse.moamoa.study.domain.Participants;
import com.woowacourse.moamoa.study.domain.StudyPlanner;
import com.woowacourse.moamoa.study.domain.RecruitPlanner;
import com.woowacourse.moamoa.study.domain.Study;
import com.woowacourse.moamoa.study.domain.StudyPlanner;
import com.woowacourse.moamoa.study.domain.repository.StudyRepository;
import com.woowacourse.moamoa.study.service.exception.StudyNotFoundException;
import com.woowacourse.moamoa.study.service.request.CreatingStudyRequest;
Expand Down Expand Up @@ -68,14 +65,12 @@ private Member findMemberBy(final Long githubId) {
.orElseThrow(() -> new UnauthorizedException(String.format("%d의 githubId를 가진 사용자는 없습니다.", githubId)));
}

public void autoCloseStudies() {
public void autoUpdateStatus() {
final List<Study> studies = studyRepository.findAll();
final LocalDate now = dateTimeSystem.now().toLocalDate();

for (Study study : studies) {
if (study.isNeedToCloseRecruiting(now)) {
study.closeEnrollment();
}
study.changeStatus(now);
}
}
}
Expand Up @@ -3,6 +3,7 @@
import com.woowacourse.moamoa.member.query.data.MemberData;
import com.woowacourse.moamoa.study.query.data.StudyDetailsData;
import com.woowacourse.moamoa.tag.query.response.TagData;
import java.time.LocalDate;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Getter;
Expand All @@ -22,11 +23,11 @@ public class StudyDetailResponse {
private String recruitmentStatus;
private String description;
private Integer currentMemberCount;
private String maxMemberCount;
private String createdDate;
private String enrollmentEndDate;
private String startDate;
private String endDate;
private Integer maxMemberCount;
private LocalDate createdDate;
private LocalDate enrollmentEndDate;
private LocalDate startDate;
private LocalDate endDate;
private MemberData owner;
private List<MemberData> members;
private List<TagData> tags;
Expand All @@ -41,20 +42,13 @@ public StudyDetailResponse(final StudyDetailsData study,
this.recruitmentStatus = study.getRecruitmentStatus();
this.description = study.getDescription();
this.currentMemberCount = study.getCurrentMemberCount();
this.maxMemberCount = getNullableDate(study.getMaxMemberCount());
this.createdDate = study.getCreatedDate().toString();
this.enrollmentEndDate = getNullableDate(study.getEnrollmentEndDate());
this.startDate = study.getStartDate().toString();
this.endDate = getNullableDate(study.getEndDate());
this.maxMemberCount = study.getMaxMemberCount();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

명세 변경 null 리팩터링 👍

this.createdDate = study.getCreatedDate();
this.enrollmentEndDate = study.getEnrollmentEndDate();
this.startDate = study.getStartDate();
this.endDate = study.getEndDate();
this.owner = study.getOwner();
this.members = participants;
this.tags = attachedTags;
}

private String getNullableDate(final Object value) {
if (value == null) {
return "";
}
return value.toString();
}
}
Expand Up @@ -33,10 +33,10 @@ void initDatabase() {
+ "VALUES (1, 'Java 스터디', '자바 설명', 'java thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 우당탕탕 자바 스터디입니다.', 3, 10, '" + now + "', '2021-12-08', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, enrollment_end_date, start_date, end_date, owner_id) "
+ "VALUES (2, 'React 스터디', '리액트 설명', 'react thumbnail', 'RECRUITMENT_START', 'PREPARE', '디우의 뤼액트 스터디입니다.', 4, 5, '" + now + "', '2021-11-09', '2021-11-10', '2021-12-08', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, owner_id) "
+ "VALUES (3, 'javaScript 스터디', '자바스크립트 설명', 'javascript thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 자바스크립트 접해보기', 3, 20, '" + now + "', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, max_member_count, created_at, owner_id) "
+ "VALUES (4, 'HTTP 스터디', 'HTTP 설명', 'http thumbnail', 'RECRUITMENT_END', 'PREPARE', '디우의 HTTP 정복하기', 5, '" + now + "', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, start_date, owner_id) "
+ "VALUES (3, 'javaScript 스터디', '자바스크립트 설명', 'javascript thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 자바스크립트 접해보기', 3, 20, '" + now + "', '2022-08-03', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, max_member_count, created_at, start_date, owner_id) "
+ "VALUES (4, 'HTTP 스터디', 'HTTP 설명', 'http thumbnail', 'RECRUITMENT_END', 'PREPARE', '디우의 HTTP 정복하기', 5, '" + now + "', '2022-08-03', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, created_at, owner_id, start_date) "
+ "VALUES (5, '알고리즘 스터디', '알고리즘 설명', 'algorithm thumbnail', 'RECRUITMENT_END', 'PREPARE', '알고리즘을 TDD로 풀자의 베루스입니다.', 1, '" + now + "', 4, '2021-12-06')");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, created_at, owner_id, start_date, enrollment_end_date, end_date) "
Expand Down
Expand Up @@ -4,6 +4,7 @@
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;

import com.woowacourse.acceptance.AcceptanceTest;
import com.woowacourse.moamoa.auth.service.oauthclient.response.GithubProfileResponse;
Expand Down Expand Up @@ -34,10 +35,10 @@ void initDataBase() {
+ "VALUES (1, 'Java 스터디', '자바 설명', 'java thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 우당탕탕 자바 스터디입니다.', 3, 10, '" + now + "', '2021-12-08', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, enrollment_end_date, start_date, end_date, owner_id) "
+ "VALUES (2, 'React 스터디', '리액트 설명', 'react thumbnail', 'RECRUITMENT_START', 'PREPARE', '디우의 뤼액트 스터디입니다.', 4, 5, '" + now + "', '2021-11-09', '2021-11-10', '2021-12-08', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, owner_id) "
+ "VALUES (3, 'javaScript 스터디', '자바스크립트 설명', 'javascript thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 자바스크립트 접해보기', 3, 20, '" + now + "', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, max_member_count, created_at, owner_id) "
+ "VALUES (4, 'HTTP 스터디', 'HTTP 설명', 'http thumbnail', 'RECRUITMENT_END', 'PREPARE', '디우의 HTTP 정복하기', 5, '" + now + "', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, start_date, owner_id) "
+ "VALUES (3, 'javaScript 스터디', '자바스크립트 설명', 'javascript thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 자바스크립트 접해보기', 3, 20, '" + now + "', '2022-08-03', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, max_member_count, created_at, start_date, owner_id) "
+ "VALUES (4, 'HTTP 스터디', 'HTTP 설명', 'http thumbnail', 'RECRUITMENT_END', 'PREPARE', '디우의 HTTP 정복하기', 5, '" + now + "', '2022-08-03', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, created_at, owner_id, start_date) "
+ "VALUES (5, '알고리즘 스터디', '알고리즘 설명', 'algorithm thumbnail', 'RECRUITMENT_END', 'PREPARE', '알고리즘을 TDD로 풀자의 베루스입니다.', 1, '" + now + "', 4, '2021-12-06')");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, created_at, owner_id, start_date, enrollment_end_date, end_date) "
Expand Down Expand Up @@ -93,7 +94,7 @@ public void getStudyDetails() {
.body("recruitmentStatus", is("RECRUITMENT_START"))
.body("description", is("디우의 뤼액트 스터디입니다."))
.body("currentMemberCount", is(4))
.body("maxMemberCount", is("5"))
.body("maxMemberCount", is(5))
.body("enrollmentEndDate", is("2021-11-09"))
.body("startDate", is("2021-11-10"))
.body("endDate", is("2021-12-08"))
Expand Down Expand Up @@ -124,10 +125,10 @@ public void getNotHasOptionalDataStudyDetails() {
.body("recruitmentStatus", is("RECRUITMENT_END"))
.body("description", is("알고리즘을 TDD로 풀자의 베루스입니다."))
.body("currentMemberCount", is(1))
.body("maxMemberCount", is(""))
.body("enrollmentEndDate", is(""))
.body("maxMemberCount", is(nullValue()))
.body("enrollmentEndDate", is(nullValue()))
.body("startDate", is("2021-12-06"))
.body("endDate", is(""))
.body("endDate", is(nullValue()))
.body("owner.id", is(4))
.body("owner.username", is("verus"))
.body("owner.imageUrl", is("https://image"))
Expand Down
Expand Up @@ -40,10 +40,10 @@ void initDataBase() {
+ "VALUES (1, 'Java 스터디', '자바 설명', 'java thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 우당탕탕 자바 스터디입니다.', 3, 10, '" + now + "', '2021-12-08', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, enrollment_end_date, start_date, end_date, owner_id) "
+ "VALUES (2, 'React 스터디', '리액트 설명', 'react thumbnail', 'RECRUITMENT_START', 'PREPARE', '디우의 뤼액트 스터디입니다.', 4, 5, '" + now + "', '2021-11-09', '2021-11-10', '2021-12-08', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, owner_id) "
+ "VALUES (3, 'javaScript 스터디', '자바스크립트 설명', 'javascript thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 자바스크립트 접해보기', 3, 20, '" + now + "', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, max_member_count, created_at, owner_id) "
+ "VALUES (4, 'HTTP 스터디', 'HTTP 설명', 'http thumbnail', 'RECRUITMENT_END', 'PREPARE', '디우의 HTTP 정복하기', 5, '" + now + "', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, max_member_count, created_at, start_date, owner_id) "
+ "VALUES (3, 'javaScript 스터디', '자바스크립트 설명', 'javascript thumbnail', 'RECRUITMENT_START', 'PREPARE', '그린론의 자바스크립트 접해보기', 3, 20, '" + now + "', '2022-08-03', 2)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, max_member_count, created_at, start_date, owner_id) "
+ "VALUES (4, 'HTTP 스터디', 'HTTP 설명', 'http thumbnail', 'RECRUITMENT_END', 'PREPARE', '디우의 HTTP 정복하기', 5, '" + now + "', '2022-08-03', 3)");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, created_at, owner_id, start_date) "
+ "VALUES (5, '알고리즘 스터디', '알고리즘 설명', 'algorithm thumbnail', 'RECRUITMENT_END', 'PREPARE', '알고리즘을 TDD로 풀자의 베루스입니다.', 1, '" + now + "', 4, '2021-12-06')");
jdbcTemplate.update("INSERT INTO study(id, title, excerpt, thumbnail, recruitment_status, study_status, description, current_member_count, created_at, owner_id, start_date, enrollment_end_date, end_date) "
Expand Down