-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore : HTML Library추가 - FontAwesome * feat : 경매 시작, 종료 Scheduler 구현 완료 - 현재 주입받아야할 메일, 그림관련 기능이 없어 실행되는 스케쥴링만 구현 완료
- Loading branch information
1 parent
98d5c64
commit 7f44b48
Showing
5 changed files
with
69 additions
and
0 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
29 changes: 29 additions & 0 deletions
29
Api/src/main/java/picasso/server/api/auction/scheduler/EndAuctionScheduler.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,29 @@ | ||
package picasso.server.api.auction.scheduler; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.scheduling.annotation.EnableAsync; | ||
import org.springframework.scheduling.annotation.Scheduled; | ||
import org.springframework.stereotype.Component; | ||
import picasso.server.common.util.DateStaticConstants; | ||
|
||
import java.time.LocalDate; | ||
|
||
/** | ||
* 18시에 경매 전 상태인 게시물들을 처리하는 스케쥴러 | ||
*/ | ||
|
||
@Slf4j | ||
@Component | ||
@EnableAsync | ||
@RequiredArgsConstructor | ||
public class EndAuctionScheduler { | ||
@Scheduled(cron = "0 0 18 * * *", zone = DateStaticConstants.ZONE_SEOUL) | ||
public void startAuction() { | ||
log.info("End Todays Auctions Open : TodayDate >>> {}", LocalDate.now()); | ||
|
||
// TODO : 입찰자가 존재하는 경우 입찰 안내 메일 발송 로직 추가 및 상태값 변경 | ||
|
||
// TODO : 입찰자가 존재하지 않는 경우 유찰 안내 메일 발송 로직 추가 및 상태값 변경 | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
Api/src/main/java/picasso/server/api/auction/scheduler/StartAuctionScheduler.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,29 @@ | ||
package picasso.server.api.auction.scheduler; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.scheduling.annotation.EnableAsync; | ||
import org.springframework.scheduling.annotation.Scheduled; | ||
import org.springframework.stereotype.Component; | ||
import picasso.server.common.util.DateStaticConstants; | ||
|
||
import java.time.LocalDate; | ||
|
||
/** | ||
* 9시에 경매 전 상태인 게시물들을 처리하는 스케쥴러 | ||
*/ | ||
|
||
@Slf4j | ||
@Component | ||
@EnableAsync | ||
@RequiredArgsConstructor | ||
public class StartAuctionScheduler { | ||
|
||
@Scheduled(cron = "0 0 9 * * *", zone = DateStaticConstants.ZONE_SEOUL) | ||
public void startAuction() { | ||
log.info("Starting Todays Auctions Open : TodayDate >>> {}", LocalDate.now()); | ||
// TODO : 관리자 승인된 게시물 경매 시작 상태로 Status 변경 로직 추가 | ||
|
||
// TODO : 관리자 승인이 되지 않은 게시물 유찰상태로 변경Status로직 추가 및 메일발송 로직 추가 | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
Common/src/main/java/picasso/server/common/util/DateStaticConstants.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,5 @@ | ||
package picasso.server.common.util; | ||
|
||
public class DateStaticConstants { | ||
public static final String ZONE_SEOUL = "Asia/Seoul"; | ||
} |