作者 邓超

fob

... ... @@ -90,9 +90,9 @@ class MailList extends Base {
$where['folder_id'] = $folder_id;
if($ids) $where['id'] = $ids;
if(paramHas('attachment')){
if(app()->request('attachment',0,'bool_Val')){
// 附件
$where['is_file'] = app()->request('attachment',0,'bool_Val') ? 1 : 0; //附件
$where['is_file'] = 1; //附件
}
// 软删
... ... @@ -129,7 +129,12 @@ class MailList extends Base {
if($extSql){
$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);
}else{
$sql = "select %s from `lists` where ".dbWhere($where);
if($folder == '收件箱' || $folder == '发件箱'){
$sql = "select %s from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where ISNULL(`lists_id`) ".dbWhere($where);
}else{
$sql = "select %s from `lists` where ".dbWhere($where);
}
}
// 查询列表数据
... ... @@ -174,12 +179,15 @@ class MailList extends Base {
$sql = "select count(*) from `fob_hot_mail` where ";
$where = ['email_id'=>$emails];
// 收件箱
// 预热收件箱
$where['folder'] = 's';
$sCount = db()->count($sql.dbWhere($where));
// 发件箱
// 预热发件箱
$where['folder'] = 'f';
$fCount = db()->count($sql.dbWhere($where));
// 发件箱
// 收件箱
app()->_json([
's_count'=> $sCount,
... ...