正在显示
1 个修改的文件
包含
8 行增加
和
3 行删除
@@ -28,8 +28,13 @@ class AutoMail { | @@ -28,8 +28,13 @@ class AutoMail { | ||
28 | 28 | ||
29 | redis()->set('prev_auto_mail_keyword',$filter,86400); | 29 | redis()->set('prev_auto_mail_keyword',$filter,86400); |
30 | 30 | ||
31 | - $q = array_diff($filter,$old); | ||
32 | - // 差集 | 31 | + $t = function ($vs){ |
32 | + return array_map(function ($v){ | ||
33 | + return $v[0].":".$v[1]; | ||
34 | + },$vs); | ||
35 | + }; | ||
36 | + // 找到新增的 | ||
37 | + $q = array_diff($t($filter),$t($old)); | ||
33 | if(!$q){ | 38 | if(!$q){ |
34 | return 0; | 39 | return 0; |
35 | } | 40 | } |
@@ -38,7 +43,7 @@ class AutoMail { | @@ -38,7 +43,7 @@ class AutoMail { | ||
38 | 43 | ||
39 | $not_must = []; | 44 | $not_must = []; |
40 | foreach ($q as $f){ | 45 | foreach ($q as $f){ |
41 | - list($t,$str) = $f; | 46 | + list($t,$str) = explode(':',$f,2); |
42 | if($t==2){ | 47 | if($t==2){ |
43 | $not_must[] = ["match_phrase"=>["subject"=>$str]]; | 48 | $not_must[] = ["match_phrase"=>["subject"=>$str]]; |
44 | 49 |
-
请 注册 或 登录 后发表评论