作者 邓超

es

@@ -77,9 +77,9 @@ class SyncMailToEs { @@ -77,9 +77,9 @@ class SyncMailToEs {
77 $this->es->create($this->getData($this->data),$id); 77 $this->es->create($this->getData($this->data),$id);
78 } 78 }
79 else if($this->table == 'lists_auto'){ 79 else if($this->table == 'lists_auto'){
80 - $id = db()->first(listsSql::first($this->data['list_id'],'`email_id`,`folder_id`,`uid`'));  
81 - $id = $id['email_id'].'_'.$id['folder_id'].'_'.$id['uid'];  
82 - $this->es->update($id,['is_auto'=>1]); 80 + $data = db()->first(listsSql::first('`id` = '.$this->data['list_id']));
  81 + $id = $data['email_id'].'_'.$data['folder_id'].'_'.$data['uid'];
  82 + $this->es->update($id,$this->getData($data));
83 } 83 }
84 84
85 } 85 }
@@ -106,6 +106,10 @@ class SyncMailToEs { @@ -106,6 +106,10 @@ class SyncMailToEs {
106 106
107 107
108 public function getData($data){ 108 public function getData($data){
  109 + if(!empty($data['id'])){
  110 + $data['uuid'] = $data['id'];
  111 + unset($data['id']);
  112 + }
109 if(!empty($data['from'])){ 113 if(!empty($data['from'])){
110 $data['from'] = [ 114 $data['from'] = [
111 'email' => $data['from'], 115 'email' => $data['from'],
@@ -18,7 +18,7 @@ class Es { @@ -18,7 +18,7 @@ class Es {
18 // private $host = 'https://es-az664rii.public.tencentelasticsearch.com:9200'; // aicc 服务器 18 // private $host = 'https://es-az664rii.public.tencentelasticsearch.com:9200'; // aicc 服务器
19 private $host = [ 19 private $host = [
20 // 'http://elastic:1qOtfZhqy4B7IXdIpl_W@192.168.80.129:9200', 20 // 'http://elastic:1qOtfZhqy4B7IXdIpl_W@192.168.80.129:9200',
21 - 'https://elastic:rEHsd8xf4xGJKHdD@es.hagro.cn:80' 21 + 'http://hagro_pro:l7E7hf5mzv2B7JOleQ@hges.waimaoq.com:80'
22 ]; //内网地址 公网要加ip白名单 22 ]; //内网地址 公网要加ip白名单
23 23
24 24