作者 邓超

预热邮件

... ... @@ -47,12 +47,22 @@ class HotMailArchive {
private function run($id):int {
$floder = $this->db->first(\Model\folderSql::first(['id.>'=>$id]));
$list = $this->db->all(\Model\listsSql::first(dbWhere(['id.>'=>$id,'is_hots'=>1])).'00');
if(!$list){
if($floder){
$this->move($floder['id']);
return $floder['id'];
}else{
return 0;
}
_echo('正在移动 '.$id);
}
public function move($fid){
_echo('正在移动 '.$fid);
$list = $this->db->all(\Model\listsSql::first(dbWhere(['folder_id'=>$fid,'is_hots'=>1])).'000');
if($list){
foreach ($list as $item){
try {
$ret = $this->db->throw()->insert('lists_hot',$item,false);
... ... @@ -68,8 +78,9 @@ class HotMailArchive {
$id = $item['id'];
}
}
$this->move($fid);
}
return $id;
}
... ...