Browse Source

修复直接支付导致的问题

chenxiqiang 6 years ago
parent
commit
b7afdbc8da
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      manage-server/app/Http/Controllers/ProductOrderController.php

+ 3
- 2
manage-server/app/Http/Controllers/ProductOrderController.php View File

63
                         "product_photo" => $product->photo
63
                         "product_photo" => $product->photo
64
                     ]);
64
                     ]);
65
                 $shopcar = Shopcar::where("wechat_id", $wechat_id)->where("product_id", $id)->first();
65
                 $shopcar = Shopcar::where("wechat_id", $wechat_id)->where("product_id", $id)->first();
66
-                $shopcar->delete();
67
-
66
+                if ($shopcar) {
67
+                    $shopcar->delete();
68
+                }
68
             }
69
             }
69
             $productOrder->price = $total;
70
             $productOrder->price = $total;
70
             $productOrder->save();
71
             $productOrder->save();

Loading…
Cancel
Save