作者 邓超

预热邮件

@@ -53,7 +53,13 @@ class HotMailArchive { @@ -53,7 +53,13 @@ class HotMailArchive {
53 return 0; 53 return 0;
54 } 54 }
55 _echo('正在移动 '.$list['id']); 55 _echo('正在移动 '.$list['id']);
56 - $ret = $this->db->throw()->insert('lists_hot',$list,false); 56 + try {
  57 + $ret = $this->db->throw()->insert('lists_hot',$list,false);
  58 + }catch (Throwable $e){
  59 + $this->db->delete('lists_hot',['id'=>$list['id']]);
  60 +
  61 + $ret = $this->db->throw()->insert('lists_hot',$list,false);
  62 + }
57 if($ret){ 63 if($ret){
58 $this->db->delete(listsSql::$table,['id'=>$list['id']]); 64 $this->db->delete(listsSql::$table,['id'=>$list['id']]);
59 } 65 }