正在显示
1 个修改的文件
包含
11 行增加
和
10 行删除
| @@ -84,6 +84,7 @@ class MailListV2Es2 extends Base { | @@ -84,6 +84,7 @@ class MailListV2Es2 extends Base { | ||
| 84 | else if($folder=='星标邮件'||$folder=='Starred'){ | 84 | else if($folder=='星标邮件'||$folder=='Starred'){ |
| 85 | $where['flagged'] = 1; // 星标 | 85 | $where['flagged'] = 1; // 星标 |
| 86 | $where['folder_as_int'] = [1,2,3,4,5]; // 所有 | 86 | $where['folder_as_int'] = [1,2,3,4,5]; // 所有 |
| 87 | + unset($where['is_hots'],$where['is_auto']); | ||
| 87 | }elseif ($folder=='预热收件箱'){ | 88 | }elseif ($folder=='预热收件箱'){ |
| 88 | $where['is_hots'] = 1; | 89 | $where['is_hots'] = 1; |
| 89 | $where['folder_as_int'] = folder2int('收件箱'); | 90 | $where['folder_as_int'] = folder2int('收件箱'); |
| @@ -505,7 +506,7 @@ class MailListV2Es2 extends Base { | @@ -505,7 +506,7 @@ class MailListV2Es2 extends Base { | ||
| 505 | $body['query']['bool']['must'][] = ['term'=>['folder_as_int'=>folder2int($folder)]]; | 506 | $body['query']['bool']['must'][] = ['term'=>['folder_as_int'=>folder2int($folder)]]; |
| 506 | if($this->assignSql($folder)) $body['query']['bool']['must'][] = $this->assignSql($folder); | 507 | if($this->assignSql($folder)) $body['query']['bool']['must'][] = $this->assignSql($folder); |
| 507 | // logs('count :'.json_encode($body)); | 508 | // logs('count :'.json_encode($body)); |
| 508 | - if(app()->request('nocache')!='web' || $folder=='垃圾箱' || $folder == '发件箱'){ | 509 | + if($folder=='垃圾箱' ){ |
| 509 | $key = 'count:'.date('Ymd').md5(json_encode($body)); | 510 | $key = 'count:'.date('Ymd').md5(json_encode($body)); |
| 510 | $a = redis()->get($key); | 511 | $a = redis()->get($key); |
| 511 | if(!is_numeric($a)){ | 512 | if(!is_numeric($a)){ |
| @@ -531,15 +532,15 @@ class MailListV2Es2 extends Base { | @@ -531,15 +532,15 @@ class MailListV2Es2 extends Base { | ||
| 531 | if($this->assignSql('收件箱')) | 532 | if($this->assignSql('收件箱')) |
| 532 | $body['query']['bool']['must'][] = $this->assignSql('收件箱'); | 533 | $body['query']['bool']['must'][] = $this->assignSql('收件箱'); |
| 533 | 534 | ||
| 534 | - if(app()->request('nocache')!='web'){ | ||
| 535 | - $key = 'flagged_count:'.md5(json_encode($body)); | ||
| 536 | - $a = redis()->get($key); | ||
| 537 | - if(!is_numeric($a)){ | ||
| 538 | - $a = $this->es->count($body); | ||
| 539 | - redis()->set($key,$a,3600); | ||
| 540 | - } | ||
| 541 | - return $a; | ||
| 542 | - } | 535 | + |
| 536 | + // $key = 'flagged_count:'.md5(json_encode($body)); | ||
| 537 | + // $a = redis()->get($key); | ||
| 538 | + // if(!is_numeric($a)){ | ||
| 539 | + // $a = $this->es->count($body); | ||
| 540 | + // redis()->set($key,$a,3600); | ||
| 541 | + // } | ||
| 542 | + // return $a; | ||
| 543 | + | ||
| 543 | 544 | ||
| 544 | return $this->es->count($body); | 545 | return $this->es->count($body); |
| 545 | } | 546 | } |
-
请 注册 或 登录 后发表评论