作者 邓超

fob

@@ -90,9 +90,9 @@ class MailList extends Base { @@ -90,9 +90,9 @@ class MailList extends Base {
90 $where['folder_id'] = $folder_id; 90 $where['folder_id'] = $folder_id;
91 if($ids) $where['id'] = $ids; 91 if($ids) $where['id'] = $ids;
92 92
93 - if(paramHas('attachment')){ 93 + if(app()->request('attachment',0,'bool_Val')){
94 // 附件 94 // 附件
95 - $where['is_file'] = app()->request('attachment',0,'bool_Val') ? 1 : 0; //附件 95 + $where['is_file'] = 1; //附件
96 } 96 }
97 97
98 // 软删 98 // 软删
@@ -129,7 +129,12 @@ class MailList extends Base { @@ -129,7 +129,12 @@ class MailList extends Base {
129 if($extSql){ 129 if($extSql){
130 $sql = "select %s from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where `fob_hot_mail`.`folder` = '{$extSql}' and ".dbWhere($where); 130 $sql = "select %s from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where `fob_hot_mail`.`folder` = '{$extSql}' and ".dbWhere($where);
131 }else{ 131 }else{
132 - $sql = "select %s from `lists` where ".dbWhere($where); 132 + if($folder == '收件箱' || $folder == '发件箱'){
  133 + $sql = "select %s from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where ISNULL(`lists_id`) ".dbWhere($where);
  134 + }else{
  135 + $sql = "select %s from `lists` where ".dbWhere($where);
  136 + }
  137 +
133 } 138 }
134 139
135 // 查询列表数据 140 // 查询列表数据
@@ -174,12 +179,15 @@ class MailList extends Base { @@ -174,12 +179,15 @@ class MailList extends Base {
174 $sql = "select count(*) from `fob_hot_mail` where "; 179 $sql = "select count(*) from `fob_hot_mail` where ";
175 180
176 $where = ['email_id'=>$emails]; 181 $where = ['email_id'=>$emails];
177 - // 收件箱 182 + // 预热收件箱
178 $where['folder'] = 's'; 183 $where['folder'] = 's';
179 $sCount = db()->count($sql.dbWhere($where)); 184 $sCount = db()->count($sql.dbWhere($where));
180 - // 发件箱 185 + // 预热发件箱
181 $where['folder'] = 'f'; 186 $where['folder'] = 'f';
182 $fCount = db()->count($sql.dbWhere($where)); 187 $fCount = db()->count($sql.dbWhere($where));
  188 + // 发件箱
  189 +
  190 + // 收件箱
183 191
184 app()->_json([ 192 app()->_json([
185 's_count'=> $sCount, 193 's_count'=> $sCount,