From 934c9fe09bb17fa3193c68d69e615941ae543c1d Mon Sep 17 00:00:00 2001 From: hujiebin Date: Fri, 16 Jun 2023 10:38:51 +0800 Subject: [PATCH] Update anniversary.go --- cron/cp_cron/anniversary.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cron/cp_cron/anniversary.go b/cron/cp_cron/anniversary.go index 7b54887..a8a1fa9 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) -- 2.22.0