作者 邓超

x

@@ -34,6 +34,7 @@ class HotMail { @@ -34,6 +34,7 @@ class HotMail {
34 34
35 // 把黑格自己的也算进去 35 // 把黑格自己的也算进去
36 $this->shopkHotEmail = array_merge($this->getHotEmail(),$fob); 36 $this->shopkHotEmail = array_merge($this->getHotEmail(),$fob);
  37 + $this->shopkHotEmail = array_map('strtolower',$this->shopkHotEmail);
37 if($this->shopkHotEmail){ 38 if($this->shopkHotEmail){
38 array_map([$this,'moveMail'],$fob); 39 array_map([$this,'moveMail'],$fob);
39 } 40 }
@@ -92,7 +93,7 @@ class HotMail { @@ -92,7 +93,7 @@ class HotMail {
92 $lists = db()->all( 93 $lists = db()->all(
93 sprintf( 94 sprintf(
94 "select `id`,`folder_id`,`lists`.`email_id`,`%s` from `lists` left join `fob_hot_mail` on `fob_hot_mail`.`lists_id` = `lists`.`id` where `lists`.`email_id` = %d and `folder_id` = %d and `fob_hot_mail`.`lists_id` is null order by `id` asc limit 1000 offset ".(($p-1)*1000), 95 "select `id`,`folder_id`,`lists`.`email_id`,`%s` from `lists` left join `fob_hot_mail` on `fob_hot_mail`.`lists_id` = `lists`.`id` where `lists`.`email_id` = %d and `folder_id` = %d and `fob_hot_mail`.`lists_id` is null order by `id` asc limit 1000 offset ".(($p-1)*1000),
95 - $data->type=='s' ? 'from':'to_name', // 收件箱查询 from字段 发件箱 查询 to_name字段 96 + $data->type=='f' ? 'to_name':'from', // 收件箱查询 from字段 发件箱 查询 to_name字段
96 $data->email_id, 97 $data->email_id,
97 $data->folder_id 98 $data->folder_id
98 ) 99 )
@@ -122,7 +123,7 @@ class HotMail { @@ -122,7 +123,7 @@ class HotMail {
122 private function insertData(array $data){ 123 private function insertData(array $data){
123 124
124 $isInsert = false; 125 $isInsert = false;
125 - if($data['folder'] == 's'){ 126 + if($data['folder'] != 'f'){
126 // 收件箱 匹配 from 字段 127 // 收件箱 匹配 from 字段
127 $isInsert = in_array(strtolower($data['from']),$this->shopkHotEmail); 128 $isInsert = in_array(strtolower($data['from']),$this->shopkHotEmail);
128 }else{ 129 }else{