...
|
...
|
@@ -63,18 +63,21 @@ class HotMailArchive { |
|
|
_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);
|
|
|
}catch (Throwable $e){
|
|
|
$this->db->delete('lists_hot',['id'=>$item['id']]);
|
|
|
unset($item['updated_at']);
|
|
|
$ret = $this->db->throw()->insert('lists_hot',$item,false);
|
|
|
$this->db->transaction(function () use ($list){
|
|
|
foreach ($list as $item){
|
|
|
try {
|
|
|
$ret = $this->db->throw()->insert('lists_hot',$item,false);
|
|
|
}catch (Throwable $e){
|
|
|
$this->db->delete('lists_hot',['id'=>$item['id']]);
|
|
|
unset($item['updated_at']);
|
|
|
$ret = $this->db->throw()->insert('lists_hot',$item,false);
|
|
|
}
|
|
|
if($ret){
|
|
|
$this->db->delete(listsSql::$table,['id'=>$item['id']]);
|
|
|
}
|
|
|
}
|
|
|
if($ret){
|
|
|
$this->db->delete(listsSql::$table,['id'=>$item['id']]);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$this->move($fid);
|
|
|
}
|
|
|
|
...
|
...
|
|