Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
2b5ad1c
Article Repository Jpa / Query 전용 구분
qowl880 May 28, 2025
58ed566
Article Custom Error Exception 구현
qowl880 May 28, 2025
a6af50e
Auditing 설정 추가
qowl880 May 28, 2025
9692750
Article Create Controller 구현
qowl880 May 28, 2025
9216574
Article Delete Controller 구현
qowl880 May 28, 2025
b030f6a
Article Controller CUD 구현
qowl880 May 28, 2025
fd5f1e5
Comment Repository Jpa / Query 전용 구분
qowl880 May 28, 2025
98f4a8d
Comment Controller Create 구현
qowl880 May 28, 2025
4df29de
application yml파일 배포/로컬 분리
qowl880 May 28, 2025
d8423bd
Article Create Controller 구현
qowl880 May 28, 2025
8fa38e2
Article Delete Controller 구현
qowl880 May 28, 2025
7ea48ff
Article Controller CUD 구현
qowl880 May 28, 2025
c21cce4
application.yml 통합
qowl880 May 28, 2025
80ae873
Article Repository 설정
qowl880 Jun 3, 2025
20ba3e7
Comment Error Exception 생성
qowl880 Jun 4, 2025
2e7dea8
구조 변경
qowl880 Jun 4, 2025
d4fc853
Comment Read 전용 Dao 생성
qowl880 Jun 4, 2025
744f21e
application yml파일 배포/로컬 분리
qowl880 May 28, 2025
09f7c74
Article Repository Jpa / Query 전용 구분
qowl880 May 28, 2025
156bdce
Article Create Controller 구현
qowl880 May 28, 2025
91fbf43
Article Delete Controller 구현
qowl880 May 28, 2025
b56fd9a
Article Controller CUD 구현
qowl880 May 28, 2025
8af1fc9
application.yml 통합
qowl880 May 28, 2025
ea296b7
Article Repository 설정
qowl880 Jun 3, 2025
e8f7fac
개행 추가
qowl880 Jun 6, 2025
2bd5c16
ErrorException 통합
qowl880 Jun 8, 2025
d85562a
Dao -> QueryResult 파일명 변경
qowl880 Jun 8, 2025
9a8ab2e
Update IdolApplication.java
qowl880 Jun 10, 2025
80ff30d
유저 인증 검사 추가
qowl880 Jun 14, 2025
8f9641a
Article Entity 구현
qowl880 May 28, 2025
16aee94
Article Repository Jpa / Query 전용 구분
qowl880 May 28, 2025
04f7346
Article Custom Error Exception 구현
qowl880 May 28, 2025
3af4629
Auditing 설정 추가
qowl880 May 28, 2025
90f01f5
Article Create Controller 구현
qowl880 May 28, 2025
c10f6da
Article Delete Controller 구현
qowl880 May 28, 2025
1e3d9eb
Article Controller CUD 구현
qowl880 May 28, 2025
1d11c93
S3 관련 이미지 업로드 및 호출 기능 구현
qowl880 May 28, 2025
e8400c7
Comment Repository Jpa / Query 전용 구분
qowl880 May 28, 2025
240154d
Comment Controller Create 구현
qowl880 May 28, 2025
c60856c
application yml파일 배포/로컬 분리
qowl880 May 28, 2025
95fb120
Article Create Controller 구현
qowl880 May 28, 2025
63bb021
Article Delete Controller 구현
qowl880 May 28, 2025
5b493bd
Article Controller CUD 구현
qowl880 May 28, 2025
b99e313
application.yml 통합
qowl880 May 28, 2025
af45ba1
Article Repository 설정
qowl880 Jun 3, 2025
69beeb8
Comment Error Exception 생성
qowl880 Jun 4, 2025
2ce4b42
구조 변경
qowl880 Jun 4, 2025
ea38316
Comment Read 전용 Dao 생성
qowl880 Jun 4, 2025
f52bf9f
application yml파일 배포/로컬 분리
qowl880 May 28, 2025
7bad145
Article Repository Jpa / Query 전용 구분
qowl880 May 28, 2025
11290a1
Article Create Controller 구현
qowl880 May 28, 2025
af3222f
Article Delete Controller 구현
qowl880 May 28, 2025
6372e28
Article Controller CUD 구현
qowl880 May 28, 2025
ee90c93
application.yml 통합
qowl880 May 28, 2025
daf3a75
SoftDelete 추가
qowl880 Jun 3, 2025
8956762
Article Repository 설정
qowl880 Jun 3, 2025
e1cdfcf
개행 추가
qowl880 Jun 6, 2025
5e8dea4
ErrorException 통합
qowl880 Jun 8, 2025
2a27c13
Dao -> QueryResult 파일명 변경
qowl880 Jun 8, 2025
2e2cc5c
S3 의존성 변경에 따른 구조 변경
qowl880 Jun 8, 2025
0da6432
Update IdolApplication.java
qowl880 Jun 10, 2025
885d13c
유저 인증 검사 추가
qowl880 Jun 14, 2025
83018ad
@Where 삭제
qowl880 Jun 17, 2025
3509447
오류로 인한 주석처리
qowl880 Jun 18, 2025
e89b474
aws 관련 설정 추가
qowl880 Jun 19, 2025
a1bf7eb
Transactional 관리
qowl880 Jun 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class ArticleStatusService {
private final ArticleRepository articleRepository;
private final EntityManager entityManager;

@Transactional(propagation = Propagation.REQUIRES_NEW)
public void validateCheckOpenStatus(Article article) {
if(article.getCurrentPerson() >= article.getMinPerson()){
if(article.getOpenStatus().equals(OpenStatus.PENDING_STATUS)) {
Expand All @@ -28,8 +27,6 @@ public void validateCheckOpenStatus(Article article) {
}
}


@Transactional(propagation = Propagation.REQUIRES_NEW)
public OpenStatus validateCheckDeadlineStatus(Long articleId, OpenStatus status, Date deadline) {
Article article = articleRepository.findByArticleId(articleId)
.orElseThrow(() -> new NotFoundException("Article", articleId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class ReadArticleService implements ReadArticleUseCase {
private final MemberJpaRepository memberJpaRepository;
private final ParticipantRepository participantRepository;
private final WishRepository wishRepository;
private final ArticleStatusService articleStatusService;

@Override
@Transactional(readOnly = true)
Expand Down Expand Up @@ -84,7 +83,7 @@ public ArticleReadResponseDto readArticle(Long articleId, Long userId) {
Location location = validateLocation(article.getLocationId());


articleStatusService.validateCheckOpenStatus(article);
validateCheckOpenStatus(article);

boolean wish = wishCheck(articleId,userId);

Expand All @@ -111,7 +110,7 @@ public List<ArticleListImgResponseDto> searchArticleList(
ArticleListImgResponseDto.from(
result,
validateLocation(result.locationId()).getRoadNameAddress(),
articleStatusService.validateCheckDeadlineStatus(result.articleId(), result.openStatus(), result.deadLine()),
validateCheckDeadlineStatus(result.articleId(), result.openStatus(), result.deadLine()),
wishCheck(result.articleId(), memberId),
result.imageKey().equals("")? "" : getS3Url(result.imageKey()).preSignedUrl(),
validateUser(result.writerId()).getNickname(),
Expand All @@ -125,7 +124,30 @@ public List<ArticleListImgResponseDto> searchArticleList(
}


public void validateCheckOpenStatus(Article article) {
if(article.getCurrentPerson() >= article.getMinPerson()){
if(article.getOpenStatus().equals(OpenStatus.PENDING_STATUS)) {
article.updateOpenStatus(OpenStatus.CONFIRMED_STATUS);
}
}
}

public OpenStatus validateCheckDeadlineStatus(Long articleId, OpenStatus status, Date deadline) {
Article article = articleRepository.findByArticleId(articleId)
.orElseThrow(() -> new NotFoundException("Article", articleId));

Timestamp deadlineTime = new Timestamp(deadline.getTime());
if(deadlineTime.before(new Timestamp(System.currentTimeMillis()))){
if(status.equals(OpenStatus.CONFIRMED_STATUS)) {
article.updateOpenStatus(OpenStatus.DEADLINE_STATUS);
return OpenStatus.DEADLINE_STATUS;
}else if(status.equals(OpenStatus.PENDING_STATUS)){
article.updateOpenStatus(OpenStatus.CANCELED_STATUS);
return OpenStatus.CANCELED_STATUS;
}
}
return status;
}



Expand Down