diff --git a/cron/cp_cron/anniversary.go b/cron/cp_cron/anniversary.go index 7b54887e85e9397f9835c641dcbbefcf3327833f..a8a1fa94e06b5f094b9dc3541f366c6da8ce98e5 100644 --- a/cron/cp_cron/anniversary.go +++ b/cron/cp_cron/anniversary.go @@ -28,6 +28,9 @@ func CpAnniversaryNotice() { _ = c.AddFunc(spec, func() { var model = domain.CreateModelNil() anniversary := cp_m.GetNeedRemindCpAnniversary(model) + if len(anniversary) <= 0 { + return + } var userIds []uint64 for _, v := range anniversary { userIds = append(userIds, v.UserId1)