正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -232,7 +232,7 @@ class MailListV2 extends Base { | @@ -232,7 +232,7 @@ class MailListV2 extends Base { | ||
232 | /************ 2024-09-02 *************/ | 232 | /************ 2024-09-02 *************/ |
233 | 233 | ||
234 | // 查询列表数据 | 234 | // 查询列表数据 |
235 | - $lists = db()->all(sprintf($sql,$filed)." order by `udate` desc limit {$limit} offset ".(($page-1)*$limit)); | 235 | + $lists = db()->all(sprintf($sql,$filed).(empty($where['flagged'])?'':' group by `udate`')." order by `udate` desc limit {$limit} offset ".(($page-1)*$limit)); |
236 | 236 | ||
237 | // map | 237 | // map |
238 | $lists = array_map(function ($v){ | 238 | $lists = array_map(function ($v){ |
@@ -255,7 +255,7 @@ class MailListV2 extends Base { | @@ -255,7 +255,7 @@ class MailListV2 extends Base { | ||
255 | },$lists?:[]); | 255 | },$lists?:[]); |
256 | 256 | ||
257 | // 总数 | 257 | // 总数 |
258 | - $total = db()->cache($this->cache)->count(sprintf($sql,"count(*)")); | 258 | + $total = db()->cache($this->cache)->count(sprintf($sql,"count(*)").(empty($where['flagged'])?'':' group by `udate`')); |
259 | 259 | ||
260 | app()->_json(listsPage($lists,$total,$page,$limit)); | 260 | app()->_json(listsPage($lists,$total,$page,$limit)); |
261 | 261 | ||
@@ -357,7 +357,7 @@ class MailListV2 extends Base { | @@ -357,7 +357,7 @@ class MailListV2 extends Base { | ||
357 | unset($where['folder_id']); | 357 | unset($where['folder_id']); |
358 | $where['email_id'] = $emails; | 358 | $where['email_id'] = $emails; |
359 | unset($where['is_hots']); | 359 | unset($where['is_hots']); |
360 | - $flaggedCount = db()->cache($this->cache)->count("select count(*) from `lists` where " . dbWhere($where)); | 360 | + $flaggedCount = db()->cache($this->cache)->count("select count(*) from `lists` where " . dbWhere($where).' group by `udate`'); |
361 | } | 361 | } |
362 | 362 | ||
363 | $data = []; | 363 | $data = []; |
-
请 注册 或 登录 后发表评论