正在显示
1 个修改的文件
包含
10 行增加
和
2 行删除
@@ -37,6 +37,8 @@ class Home extends Base { | @@ -37,6 +37,8 @@ class Home extends Base { | ||
37 | 37 | ||
38 | $folder_ids = app()->request('folder_ids',[],['intval','abs']); | 38 | $folder_ids = app()->request('folder_ids',[],['intval','abs']); |
39 | 39 | ||
40 | + $udate = app()->request('udate',0,'intval'); | ||
41 | + | ||
40 | $where = ['email_id' => $this->getEmail('id')]; | 42 | $where = ['email_id' => $this->getEmail('id')]; |
41 | 43 | ||
42 | foreach ($folder_ids as $k=>$folder_id){ | 44 | foreach ($folder_ids as $k=>$folder_id){ |
@@ -60,11 +62,17 @@ class Home extends Base { | @@ -60,11 +62,17 @@ class Home extends Base { | ||
60 | //目录 | 62 | //目录 |
61 | $where['folder_id'] = $folder_ids; | 63 | $where['folder_id'] = $folder_ids; |
62 | 64 | ||
65 | + | ||
66 | + $sql = "`id` > ".$last_id; | ||
67 | + if(!$last_id && $udate){ | ||
68 | + $sql = "`udate` >= ".$udate; | ||
69 | + } | ||
70 | + | ||
63 | $lists = db()->all( | 71 | $lists = db()->all( |
64 | sprintf( | 72 | sprintf( |
65 | - "select `id`,`subject`,`from`,`from_name`,`seen`,`udate`,`email_id` from `%s` where `id` > %d and %s order by `id` asc limit %d" | 73 | + "select `id`,`subject`,`from`,`from_name`,`seen`,`udate`,`email_id` from `%s` where %s and %s order by `id` asc limit %d" |
66 | ,listsSql::$table | 74 | ,listsSql::$table |
67 | - ,$last_id | 75 | + ,$sql |
68 | ,dbWhere($where) | 76 | ,dbWhere($where) |
69 | ,$limit | 77 | ,$limit |
70 | ) | 78 | ) |
-
请 注册 或 登录 后发表评论