From 212e7a3cf9ae73e6e6cb150bec028b24c2f49e50 Mon Sep 17 00:00:00 2001 From: Jo YoHan Date: Tue, 4 Jun 2024 00:14:31 +0900 Subject: [PATCH] fix: update Newsletter Scheduling Func --- cmd/server/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 2db8017..397badf 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -76,6 +76,9 @@ func publish(conf *Config, db *gorm.DB, subscription entity.Subscription) { param = make([]interface{}, 0) ) + where = append(where, "? <= item_published") + param = append(param, subscription.Published) + if len(subscription.PreferredCompanyArr) > 0 { where = append(where, "feed_id IN ?") param = append(param, []int64(subscription.PreferredCompanyArr))