|
@@ -7,6 +7,7 @@ namespace Controller\fob_ai; |
|
@@ -7,6 +7,7 @@ namespace Controller\fob_ai; |
7
|
use Controller\Base;
|
7
|
use Controller\Base;
|
8
|
use Lib\Verify;
|
8
|
use Lib\Verify;
|
9
|
use Model\folderSql;
|
9
|
use Model\folderSql;
|
|
|
10
|
+use function Swoole\Coroutine\Http\request;
|
10
|
|
11
|
|
11
|
/**
|
12
|
/**
|
12
|
* 黑格 fob 那边专用 业务
|
13
|
* 黑格 fob 那边专用 业务
|
|
@@ -188,7 +189,7 @@ class MailList extends Base { |
|
@@ -188,7 +189,7 @@ class MailList extends Base { |
188
|
},$lists?:[]);
|
189
|
},$lists?:[]);
|
189
|
|
190
|
|
190
|
// 总数
|
191
|
// 总数
|
191
|
- $total = db()->count(sprintf($sql,"count(*)"));
|
192
|
+ $total = db()->cache(600)->count(sprintf($sql,"count(*)"));
|
192
|
|
193
|
|
193
|
app()->_json(listsPage($lists,$total,$page,$limit));
|
194
|
app()->_json(listsPage($lists,$total,$page,$limit));
|
194
|
|
195
|
|
|
@@ -220,42 +221,42 @@ class MailList extends Base { |
|
@@ -220,42 +221,42 @@ class MailList extends Base { |
220
|
$where['lists|folder_id'] = $this->getFolderId('发件箱');
|
221
|
$where['lists|folder_id'] = $this->getFolderId('发件箱');
|
221
|
// 预热发件箱
|
222
|
// 预热发件箱
|
222
|
$where['fob_hot_mail|folder'] = 'f';
|
223
|
$where['fob_hot_mail|folder'] = 'f';
|
223
|
- $fCount = db()->count($sql.dbWhere($where));
|
224
|
+ $fCount = db()->cache(600)->count($sql.dbWhere($where));
|
224
|
}
|
225
|
}
|
225
|
|
226
|
|
226
|
// 预热收件箱
|
227
|
// 预热收件箱
|
227
|
if(in_array('hot_inbox',$show_count_filed)) {
|
228
|
if(in_array('hot_inbox',$show_count_filed)) {
|
228
|
$where['lists|folder_id'] = $this->getFolderId('收件箱');
|
229
|
$where['lists|folder_id'] = $this->getFolderId('收件箱');
|
229
|
$where['fob_hot_mail|folder'] = 's';
|
230
|
$where['fob_hot_mail|folder'] = 's';
|
230
|
- $sCount = db()->count($sql . dbWhere($where));
|
231
|
+ $sCount = db()->cache(600)->count($sql . dbWhere($where));
|
231
|
}
|
232
|
}
|
232
|
unset($where['fob_hot_mail|folder']);
|
233
|
unset($where['fob_hot_mail|folder']);
|
233
|
|
234
|
|
234
|
$sql = $sql." ISNULL(`lists_id`) and ";
|
235
|
$sql = $sql." ISNULL(`lists_id`) and ";
|
235
|
if(in_array('send',$show_count_filed)) {
|
236
|
if(in_array('send',$show_count_filed)) {
|
236
|
$where['lists|folder_id'] = $this->getFolderId('发件箱');
|
237
|
$where['lists|folder_id'] = $this->getFolderId('发件箱');
|
237
|
- $faCount = db()->count($sql . dbWhere($where));
|
238
|
+ $faCount = db()->cache(600)->count($sql . dbWhere($where));
|
238
|
}
|
239
|
}
|
239
|
// 垃圾箱
|
240
|
// 垃圾箱
|
240
|
if(in_array('junk',$show_count_filed)) {
|
241
|
if(in_array('junk',$show_count_filed)) {
|
241
|
$where['lists|folder_id'] = $this->getFolderId('垃圾箱');
|
242
|
$where['lists|folder_id'] = $this->getFolderId('垃圾箱');
|
242
|
- $lajiCount = db()->count($sql . dbWhere($where));
|
243
|
+ $lajiCount = db()->cache(600)->count($sql . dbWhere($where));
|
243
|
}
|
244
|
}
|
244
|
// 收件箱
|
245
|
// 收件箱
|
245
|
if(in_array('inbox',$show_count_filed)) {
|
246
|
if(in_array('inbox',$show_count_filed)) {
|
246
|
$where['lists|folder_id'] = $this->getFolderId('收件箱');
|
247
|
$where['lists|folder_id'] = $this->getFolderId('收件箱');
|
247
|
- $shouCount = db()->count($sql . dbWhere($where));
|
248
|
+ $shouCount = db()->cache(600)->count($sql . dbWhere($where));
|
248
|
}
|
249
|
}
|
249
|
// 未读
|
250
|
// 未读
|
250
|
if(in_array('unseen',$show_count_filed)) {
|
251
|
if(in_array('unseen',$show_count_filed)) {
|
251
|
$where['seen'] = 0;
|
252
|
$where['seen'] = 0;
|
252
|
- $seenCount = db()->count($sql . dbWhere($where));
|
253
|
+ $seenCount = db()->cache(600)->count($sql . dbWhere($where));
|
253
|
unset($where['seen']);
|
254
|
unset($where['seen']);
|
254
|
}
|
255
|
}
|
255
|
// 星标
|
256
|
// 星标
|
256
|
if(in_array('flagged',$show_count_filed)) {
|
257
|
if(in_array('flagged',$show_count_filed)) {
|
257
|
$where['flagged'] = 1;
|
258
|
$where['flagged'] = 1;
|
258
|
- $flaggedCount = db()->count($sql . dbWhere($where));
|
259
|
+ $flaggedCount = db()->cache(600)->count($sql . dbWhere($where));
|
259
|
}
|
260
|
}
|
260
|
$data = [];
|
261
|
$data = [];
|
261
|
if(isset($shouCount)) $data['inbox'] = $shouCount;
|
262
|
if(isset($shouCount)) $data['inbox'] = $shouCount;
|