Ver Fonte

Merge branch '20241029_fl_order'

15313670163 há 1 mês atrás
pai
commit
f0839d4031
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      app/JsonRpc/OrderService.php

+ 3 - 1
app/JsonRpc/OrderService.php

@@ -895,7 +895,9 @@ class OrderService implements OrderServiceInterface
             if (!empty($shop)) {
                 $del_shop = ShoppingCart::where('user_id', $data['user_id'])->delete();
                 if (empty($del_shop)) {
-                    return Result::error("删除失败");
+                    Db::rollBack();
+                    return Result::error("删除购物车失败");
+                    // throw new \Exception("删除购物车失败");
                 }
             }
             $shop = [