timeSliceQueryPush
This commit is contained in:
parent
8996df0279
commit
1d8862ab7b
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue