正在显示
1 个修改的文件
包含
15 行增加
和
4 行删除
| @@ -47,12 +47,22 @@ class HotMailArchive { | @@ -47,12 +47,22 @@ class HotMailArchive { | ||
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | private function run($id):int { | 49 | private function run($id):int { |
| 50 | + $floder = $this->db->first(\Model\folderSql::first(['id.>'=>$id])); | ||
| 50 | 51 | ||
| 51 | - $list = $this->db->all(\Model\listsSql::first(dbWhere(['id.>'=>$id,'is_hots'=>1])).'00'); | ||
| 52 | - if(!$list){ | 52 | + if($floder){ |
| 53 | + $this->move($floder['id']); | ||
| 54 | + return $floder['id']; | ||
| 55 | + }else{ | ||
| 53 | return 0; | 56 | return 0; |
| 54 | } | 57 | } |
| 55 | - _echo('正在移动 '.$id); | 58 | + |
| 59 | + | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public function move($fid){ | ||
| 63 | + _echo('正在移动 '.$fid); | ||
| 64 | + $list = $this->db->all(\Model\listsSql::first(dbWhere(['folder_id'=>$fid,'is_hots'=>1])).'000'); | ||
| 65 | + if($list){ | ||
| 56 | foreach ($list as $item){ | 66 | foreach ($list as $item){ |
| 57 | try { | 67 | try { |
| 58 | $ret = $this->db->throw()->insert('lists_hot',$item,false); | 68 | $ret = $this->db->throw()->insert('lists_hot',$item,false); |
| @@ -68,8 +78,9 @@ class HotMailArchive { | @@ -68,8 +78,9 @@ class HotMailArchive { | ||
| 68 | $id = $item['id']; | 78 | $id = $item['id']; |
| 69 | } | 79 | } |
| 70 | } | 80 | } |
| 81 | + $this->move($fid); | ||
| 82 | + } | ||
| 71 | 83 | ||
| 72 | - return $id; | ||
| 73 | 84 | ||
| 74 | } | 85 | } |
| 75 | 86 |
-
请 注册 或 登录 后发表评论