...
|
...
|
@@ -37,6 +37,8 @@ class Home extends Base { |
|
|
|
|
|
$folder_ids = app()->request('folder_ids',[],['intval','abs']);
|
|
|
|
|
|
$udate = app()->request('udate',0,'intval');
|
|
|
|
|
|
$where = ['email_id' => $this->getEmail('id')];
|
|
|
|
|
|
foreach ($folder_ids as $k=>$folder_id){
|
...
|
...
|
@@ -60,11 +62,17 @@ class Home extends Base { |
|
|
//目录
|
|
|
$where['folder_id'] = $folder_ids;
|
|
|
|
|
|
|
|
|
$sql = "`id` > ".$last_id;
|
|
|
if(!$last_id && $udate){
|
|
|
$sql = "`udate` >= ".$udate;
|
|
|
}
|
|
|
|
|
|
$lists = db()->all(
|
|
|
sprintf(
|
|
|
"select `id`,`subject`,`from`,`from_name`,`seen`,`udate`,`email_id` from `%s` where `id` > %d and %s order by `id` asc limit %d"
|
|
|
"select `id`,`subject`,`from`,`from_name`,`seen`,`udate`,`email_id` from `%s` where %s and %s order by `id` asc limit %d"
|
|
|
,listsSql::$table
|
|
|
,$last_id
|
|
|
,$sql
|
|
|
,dbWhere($where)
|
|
|
,$limit
|
|
|
)
|
...
|
...
|
|