timeSliceQueryPush

This commit is contained in:
ziming 2025-06-12 11:04:07 +08:00
parent 8996df0279
commit 1d8862ab7b
1 changed files with 4 additions and 3 deletions

View File

@ -21,13 +21,14 @@ func (v *VoucherBiz) Notice(ctx context.Context) error {
now := time.Now()
// 获取天前的日期
// 获取 NoticeStartDays 天前的日期
noticeStartDay := now.AddDate(0, 0, int(-v.bc.Cmb.NoticeStartDays))
// 获取天前 00:00:00 的时间
// 获取 NoticeStartDays 天前 00:00:00 的时间
startTime := time.Date(noticeStartDay.Year(), noticeStartDay.Month(), noticeStartDay.Day(), 0, 0, 0, 0, noticeStartDay.Location())
// 获取 NoticeEndDays 天前的日期
noticeEndDay := now.AddDate(0, 0, int(-v.bc.Cmb.NoticeEndDays))
// 获取天 23:59:59 的时间
// 获取 NoticeEndDays 天 23:59:59 的时间
endTime := time.Date(noticeEndDay.Year(), noticeEndDay.Month(), noticeEndDay.Day(), 23, 59, 59, 0, noticeEndDay.Location())
return v.timeSliceQuery(ctx, startTime, endTime)