From 1b4382eafe9cbd97048971185421c00a1f00185b Mon Sep 17 00:00:00 2001 From: hujiebin Date: Fri, 16 Jun 2023 15:14:11 +0800 Subject: [PATCH] feat: --- domain/model/cp_m/anniversary.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/domain/model/cp_m/anniversary.go b/domain/model/cp_m/anniversary.go index 673cf9c..1f6071d 100644 --- a/domain/model/cp_m/anniversary.go +++ b/domain/model/cp_m/anniversary.go @@ -122,7 +122,7 @@ func GetNeedRemindCpAnniversary(model *domain.Model) []CpAnniversary { now := time.Now().Unix() for i, v := range rows { ts := CalcNextAnniversary(v.Timestamp) - if now > ts { + if now > ts && now-ts <= 86400 { res = append(res, rows[i]) } } @@ -142,7 +142,7 @@ func GetUserTodayCpAnniversary(model *domain.Model, cpId mysql.ID) []CpAnniversa now := time.Now().Unix() for i, v := range rows { ts := CalcNextAnniversary(v.Timestamp) - if now > ts { + if now > ts && now-ts <= 86400 { res = append(res, rows[i]) } } -- 2.22.0