Explorar el Código

修复直接支付导致的问题

chenxiqiang hace 6 años
padre
commit
b7afdbc8da
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3
    2
      manage-server/app/Http/Controllers/ProductOrderController.php

+ 3
- 2
manage-server/app/Http/Controllers/ProductOrderController.php Ver fichero

@@ -63,8 +63,9 @@ class ProductOrderController extends Controller
63 63
                         "product_photo" => $product->photo
64 64
                     ]);
65 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 70
             $productOrder->price = $total;
70 71
             $productOrder->save();

Loading…
Cancelar
Guardar