作者 邓超

x

@@ -44,14 +44,17 @@ class HotMail { @@ -44,14 +44,17 @@ class HotMail {
44 $db = db(); 44 $db = db();
45 foreach ($this->shopkHotEmail as $e=>$i){ 45 foreach ($this->shopkHotEmail as $e=>$i){
46 try { 46 try {
47 - $db->throw()->insert('hot_mail',['email'=>$e],false); 47 + if(!$db->count("select count(*) from `hot_mail` where ".dbWhere(['email'=>$e]))){
  48 + $db->throw()->insert('hot_mail',['email'=>$e],false);
  49 + }
  50 +
48 }catch (Throwable $e){} 51 }catch (Throwable $e){}
49 } 52 }
50 53
51 54
52 - if($this->shopkHotEmail){  
53 - array_map([$this,'moveMail'],$fob);  
54 - } 55 +// if($this->shopkHotEmail){
  56 +// array_map([$this,'moveMail'],$fob);
  57 +// }
55 58
56 echo '已执行完成'.PHP_EOL; 59 echo '已执行完成'.PHP_EOL;
57 } 60 }