代码调整

This commit is contained in:
李子铭 2025-03-24 09:10:36 +08:00
parent d47f785669
commit 879c7b09df
1 changed files with 4 additions and 4 deletions

View File

@ -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,