作者 邓超

x

@@ -85,10 +85,16 @@ class AutoMail { @@ -85,10 +85,16 @@ class AutoMail {
85 if(in_array($item['folder_id'],$this->fids)){ 85 if(in_array($item['folder_id'],$this->fids)){
86 // 是否在黑名单中 86 // 是否在黑名单中
87 if(in_array($item['from'],$this->black_emails)){ 87 if(in_array($item['from'],$this->black_emails)){
  88 + if (!isset($this->filter[$item['email_id']])){
  89 + // 找到邮箱
  90 + $e = $this->db->value(listsSql::first(dbWhere(['id'=>$item['email_id']]),'email'));
88 // 是否是ai邮件 91 // 是否是ai邮件
89 - if($this->db->count("select count(*) from `hot_mail` where ".dbWhere([  
90 - 'email'=> $this->db->value(listsSql::first(dbWhere(['id'=>$item['email_id']]),'email'))  
91 - ]))){ 92 + $this->filter[$item['email_id']] =
  93 + $this->db->count("select count(*) from `hot_mail` where ".dbWhere(['email'=> $e]));
  94 + }
  95 +
  96 + // 是否是ai邮件
  97 + if($this->filter[$item['email_id']]){
92 98
93 echo '删除 '.$item['id'].'===>'.$this->db->update(listsSql::$table,['deleted'=>1],dbWhere(['id'=>$item['id']])); 99 echo '删除 '.$item['id'].'===>'.$this->db->update(listsSql::$table,['deleted'=>1],dbWhere(['id'=>$item['id']]));
94 100