zhangzengfei
2025-02-07 17f45fcc0a062a15372883de8909953071c51b3c
models/disappear.go
@@ -68,7 +68,6 @@
            m.LastDirection = val
         }
      }
   }
   logger.Debugf("DisappearModel init finish ...task id:%s, name:%s, rule:%+v", task.ID, task.Name, m)
@@ -231,7 +230,7 @@
      if isOlderThanGivenHours(p.LastAppearanceTime, m.DisappearTime) {
         result := &db.ModelTaskResults{
            Title:         m.Task.Name,
            Event:         eventFormat(p.LastAppearanceTime, p.LastDirection),
            Event:         m.eventFormat(p.LastAppearanceTime, p.LastDirection),
            ModelID:       m.Task.ModelID,
            ModelTaskID:   m.Task.ID,
            CommunityId:   p.CommunityId,
@@ -305,7 +304,7 @@
   return timestampTime.Before(timeThreshold)
}
func eventFormat(lastAppearTime int64, lastDirection string) string {
func (m *DisappearModel) eventFormat(lastAppearTime int64, lastDirection string) string {
   lastTime := time.Unix(lastAppearTime, 0)
   currentTime := time.Now()