From 879c7b09dfa2970cbe8eb286d60d4b193eff4da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Mon, 24 Mar 2025 09:10:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/cron_notice.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/biz/cron_notice.go b/internal/biz/cron_notice.go index ab2d3aa..62a1bba 100644 --- a/internal/biz/cron_notice.go +++ b/internal/biz/cron_notice.go @@ -26,13 +26,13 @@ func (v *VoucherBiz) ExecuteNotice(ctx context.Context) error { now := time.Now() // 获取七天前的日期 - sevenDaysAgo := now.AddDate(0, 0, int(-v.bc.Cmb.NoticeStartDays)) + noticeStartDay := now.AddDate(0, 0, int(-v.bc.Cmb.NoticeStartDays)) // 获取七天前 00:00:00 的时间 - startTime := time.Date(sevenDaysAgo.Year(), sevenDaysAgo.Month(), sevenDaysAgo.Day(), 0, 0, 0, 0, sevenDaysAgo.Location()) + startTime := time.Date(noticeStartDay.Year(), noticeStartDay.Month(), noticeStartDay.Day(), 0, 0, 0, 0, noticeStartDay.Location()) - sevenDaysAgoEnd := now.AddDate(0, 0, int(-v.bc.Cmb.NoticeEndDays)) + noticeEndDay := now.AddDate(0, 0, int(-v.bc.Cmb.NoticeEndDays)) // 获取昨天 23:59:59 的时间 - endTime := time.Date(sevenDaysAgoEnd.Year(), sevenDaysAgoEnd.Month(), sevenDaysAgoEnd.Day(), 23, 59, 59, 0, sevenDaysAgoEnd.Location()) + endTime := time.Date(noticeEndDay.Year(), noticeEndDay.Month(), noticeEndDay.Day(), 23, 59, 59, 0, noticeEndDay.Location()) req := &bo.FindInBatchesUseBo{ Type: vo.OrderTypeCmb,