orderNotice定时任务

This commit is contained in:
李子铭 2025-03-19 09:46:26 +08:00
parent ccd3157649
commit 4f9caac1b0
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@ func (s *VoucherService) CronNotice(ctx context.Context) error {
return nil return nil
} }
if len(c.Command) == 0 {
log.Error("orderNotice定时任务 command is empty")
return nil
}
return s.cron.AddFunc(c.Command, func() { return s.cron.AddFunc(c.Command, func() {
if err := s.Notice(ctx); err != nil { if err := s.Notice(ctx); err != nil {