wugg 6 months ago
parent
commit
eb5b3da8a2
2 changed files with 2 additions and 4 deletions
  1. 1 2
      app/admin/command/CheckInvoice.php
  2. 1 2
      app/admin/command/CheckTicket.php

+ 1 - 2
app/admin/command/CheckInvoice.php

@@ -76,12 +76,11 @@ class CheckInvoice extends Command
                     $this->lastUpdate($invoice['id']);
                 }else $this->faild($invoice['id'],$result['data']['cyjgxx']);
             }else $this->faild($invoice['id']);
-            Db::commit();
         }catch (\Exception $e){
             Db::rollback();
            echo $e->getMessage();
         }
-
+        Db::commit();
     }
 
     protected function changeFiled($data,$invoice){

+ 1 - 2
app/admin/command/CheckTicket.php

@@ -78,12 +78,11 @@ class CheckTicket extends Command
                 $this->lastUpdate($info['invNo']);
             }else $this->faild($invoice['id'],$result['data']['cyjgxx']);
         }else $this->faild($info['invNo']);
-        Db::commit();
        }catch (\Exception $e){
             Db::rollback();
             echo $e->getMessage()."\r\n";
        }
-
+        Db::commit();
     }
     protected function changeFiled($data,$info){
         $item = $this->itemFiled($data['detailList']);