diff --git a/domain/model/cp_m/anniversary.go b/domain/model/cp_m/anniversary.go index 673cf9c5fbfa0258279fdc92d24eb51cd8b659f9..1f6071d0227d5a6ac8e1d945f5a4ba6d22fed512 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]) } }