Browse Source

修改创建购物车的接口

15313670163 1 month ago
parent
commit
f9504fafc5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/JsonRpc/OrderService.php

+ 3 - 1
app/JsonRpc/OrderService.php

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