fix(test): keep lucky draw history receipts inside today

The history test placed receipts one and two hours before now, so
between 00:00 and 02:00 they fell on yesterday and the controller's
today filter dropped them. Pin them to just after midnight instead.
Reproduced with -Duser.timezone=Etc/GMT+7 at 00:02 local time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-12-02 15:05:59 +08:00
1 parent 05344d848d
commit 2eb05f1953
1 file changed
+3 -2
@@ -152,13 +152,14 @@ class EventControllerLuckyDrawTest {
EventReceipt pendingOlder = new EventReceipt();
pendingOlder.setUuid(1L);
pendingOlder.setUploadDateTime(java.time.LocalDateTime.now().minusHours(2));
// Pinned to just after midnight so both stay "today" whatever time the test runs.
pendingOlder.setUploadDateTime(java.time.LocalDate.now().atStartOfDay().plusMinutes(1));
pendingOlder.setReviewStatus(OrderEnum.EventReceiptReviewStatus.P);
pendingOlder.setUploadPath(List.of("r/1a.png"));
EventReceipt approvedNewer = new EventReceipt();
approvedNewer.setUuid(2L);
approvedNewer.setUploadDateTime(java.time.LocalDateTime.now().minusHours(1));
approvedNewer.setUploadDateTime(java.time.LocalDate.now().atStartOfDay().plusMinutes(2));
approvedNewer.setReviewStatus(OrderEnum.EventReceiptReviewStatus.A);
approvedNewer.setUploadPath(List.of("r/2a.png", "r/2b.png"));