作者 邓超

x

@@ -255,7 +255,12 @@ class MailListV2 extends Base { @@ -255,7 +255,12 @@ class MailListV2 extends Base {
255 },$lists?:[]); 255 },$lists?:[]);
256 256
257 // 总数 257 // 总数
258 - $total = db()->cache($this->cache)->count(sprintf($sql,"count(*)").(empty($where['flagged'])?'':' group by `udate`')); 258 + if(empty($where['flagged'])){
  259 + $total = db()->cache($this->cache)->count(sprintf($sql,"count(*)"));
  260 + }else{
  261 + $total = db()->cache($this->cache)->count("select count(*) from (".sprintf($sql,"`id`").' group by `udate`) as t');
  262 + }
  263 +
259 264
260 app()->_json(listsPage($lists,$total,$page,$limit)); 265 app()->_json(listsPage($lists,$total,$page,$limit));
261 266