Ver Fonte

订单逻辑中的事物回滚未加

whitefang há 1 ano atrás
pai
commit
dffb8b6384
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      app/api/logic/ServiceOrderLogic.php

+ 6 - 0
app/api/logic/ServiceOrderLogic.php

@@ -758,6 +758,7 @@ class ServiceOrderLogic extends BaseLogic
             }
             }
         }
         }
         catch (\Exception $e) {
         catch (\Exception $e) {
+            Db::rollback();
             self::setError($e->getMessage());
             self::setError($e->getMessage());
             return false;
             return false;
         }
         }
@@ -799,6 +800,7 @@ class ServiceOrderLogic extends BaseLogic
             Db::commit();
             Db::commit();
         }
         }
         catch (\Exception $e) {
         catch (\Exception $e) {
+            Db::rollback();
             self::setError($e->getMessage());
             self::setError($e->getMessage());
             return false;
             return false;
         }
         }
@@ -854,6 +856,7 @@ class ServiceOrderLogic extends BaseLogic
             Db::commit();
             Db::commit();
         }
         }
         catch (\Exception $e) {
         catch (\Exception $e) {
+            Db::rollback();
             self::setError($e->getMessage());
             self::setError($e->getMessage());
             return false;
             return false;
         }
         }
@@ -878,6 +881,7 @@ class ServiceOrderLogic extends BaseLogic
             Db::commit();
             Db::commit();
         }
         }
         catch (\Exception $e) {
         catch (\Exception $e) {
+            Db::rollback();
             self::setError($e->getMessage());
             self::setError($e->getMessage());
             return false;
             return false;
         }
         }
@@ -913,6 +917,7 @@ class ServiceOrderLogic extends BaseLogic
             Db::commit();
             Db::commit();
         }
         }
         catch (\Exception $e) {
         catch (\Exception $e) {
+            Db::rollback();
             self::setError($e->getMessage());
             self::setError($e->getMessage());
             return false;
             return false;
         }
         }
@@ -971,6 +976,7 @@ class ServiceOrderLogic extends BaseLogic
             Db::commit();
             Db::commit();
         }
         }
         catch (\Exception $e) {
         catch (\Exception $e) {
+            Db::rollback();
             self::setError($e->getMessage());
             self::setError($e->getMessage());
             return false;
             return false;
         }
         }