Skip to content

Commit

Permalink
fix: ExcelDownloadCache.from 매개변수 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
dradnats1012 committed Dec 15, 2024
1 parent eb831c1 commit 2200ac9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package in.koreatech.koin.domain.coop.model;

import java.time.LocalDate;
import java.util.concurrent.TimeUnit;

import org.springframework.data.redis.core.RedisHash;
Expand Down Expand Up @@ -27,9 +28,9 @@ private ExcelDownloadCache(String id, Long expiration) {
this.expiration = expiration;
}

public static ExcelDownloadCache from(String id) {
public static ExcelDownloadCache from(LocalDate startDate, LocalDate endDate) {
return ExcelDownloadCache.builder()
.id(id)
.id(startDate.toString() + endDate.toString())
.expiration(CACHE_EXPIRE_SECONDS)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,6 @@ private void checkDuplicateExcelRequest(LocalDate startDate, LocalDate endDate)
if (isCacheExist) {
throw DuplicateExcelRequestException.withDetail(startDate, endDate);
}
excelDownloadCacheRepository.save(ExcelDownloadCache.from(startDate.toString() + endDate.toString()));
excelDownloadCacheRepository.save(ExcelDownloadCache.from(startDate, endDate));
}
}

0 comments on commit 2200ac9

Please sign in to comment.