代码调整
This commit is contained in:
parent
d47f785669
commit
879c7b09df
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue