作者 邓超

预热邮件

@@ -63,6 +63,7 @@ class HotMailArchive { @@ -63,6 +63,7 @@ class HotMailArchive {
63 _echo('正在移动 '.$fid); 63 _echo('正在移动 '.$fid);
64 $list = $this->db->all(\Model\listsSql::first(dbWhere(['folder_id'=>$fid,'is_hots'=>1])).'000'); 64 $list = $this->db->all(\Model\listsSql::first(dbWhere(['folder_id'=>$fid,'is_hots'=>1])).'000');
65 if($list){ 65 if($list){
  66 + $this->db->transaction(function () use ($list){
66 foreach ($list as $item){ 67 foreach ($list as $item){
67 try { 68 try {
68 $ret = $this->db->throw()->insert('lists_hot',$item,false); 69 $ret = $this->db->throw()->insert('lists_hot',$item,false);
@@ -75,6 +76,8 @@ class HotMailArchive { @@ -75,6 +76,8 @@ class HotMailArchive {
75 $this->db->delete(listsSql::$table,['id'=>$item['id']]); 76 $this->db->delete(listsSql::$table,['id'=>$item['id']]);
76 } 77 }
77 } 78 }
  79 + });
  80 +
78 $this->move($fid); 81 $this->move($fid);
79 } 82 }
80 83