| 
...
 | 
...
 | 
@@ -179,8 +179,10 @@ class MailListV2 extends Base { | 
| 
 | 
 | 
         $where['deleted'] = 0;
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         $filed = '`id`,`uid`,`subject`,`from`,`from_name`,`flagged`,`seen`,`udate`,`folder_id`,`is_file`,`description`,`'.$this->getTable().'`.`email_id`,`to_name`';
 | 
| 
 | 
 | 
         $filedhot = '`id`,`uid`,`subject`,`from`,`from_name`,`flagged`,`seen`,`udate`,`folder_id`,`is_file`,`description`,`lists_hot`.`email_id`,`to_name`';
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         $sql = "select %s from `".$this->getTable()."` where ".dbWhere($where);
 | 
| 
 | 
 | 
         $sqlhot = "select %s from `lists_hot` where ".dbWhere($where);
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         /************ 2024-09-02 *************/
 | 
| 
 | 
 | 
         if($folder=='收件箱' && empty($where['flagged']) && !$ids) {
 | 
| 
...
 | 
...
 | 
@@ -222,7 +224,7 @@ class MailListV2 extends Base { | 
| 
 | 
 | 
         /************ 2024-09-02 *************/
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         // 查询列表数据
 | 
| 
 | 
 | 
         $lists = db()->all(sprintf($sql,$filed).(empty($where['flagged'])?'':' group by `udate`')." order by `udate` desc limit {$limit} offset ".(($page-1)*$limit));
 | 
| 
 | 
 | 
         $lists = db()->all(sprintf(empty($where['is_hots'])?$sql:$sqlhot,empty($where['is_hots'])?$filed:$filedhot).(empty($where['flagged'])?'':' group by `udate`')." order by `udate` desc limit {$limit} offset ".(($page-1)*$limit));
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         // map
 | 
| 
 | 
 | 
         $lists = array_map(function ($v){
 | 
| 
...
 | 
...
 | 
@@ -247,7 +249,7 @@ class MailListV2 extends Base { | 
| 
 | 
 | 
         if($lists){
 | 
| 
 | 
 | 
             // 总数
 | 
| 
 | 
 | 
             if(empty($where['flagged'])){
 | 
| 
 | 
 | 
                 $total  = db()->cache($this->cache)->count(sprintf($sql,"count(*)"));
 | 
| 
 | 
 | 
                 $total  = db()->cache($this->cache)->count(sprintf(empty($where['is_hots'])?$sql:$sqlhot,"count(*)"));
 | 
| 
 | 
 | 
             }else{
 | 
| 
 | 
 | 
                 $total  = db()->cache($this->cache)->count("select count(*) from (".sprintf($sql,"`id`").' group by `udate`) as t');
 | 
| 
 | 
 | 
             }
 | 
...
 | 
...
 | 
 |