Эх сурвалжийг харах

Merge branch 'zzd' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 5 жил өмнө
parent
commit
0f16181fe6

+ 4 - 2
app/Http/Controllers/TestController.php

@@ -174,8 +174,10 @@ class TestController extends Controller
 
     public function test()
     {
-        dd(json_encode(false));
-        return view("test");
+        Cache::flush();
+        $service = new OrderService();
+        $order = Order::query()->find(2748314);
+        dd($service->createInstantBill($order));
     }
     public function a(int $c)
     {

+ 2 - 1
app/Services/OrderService.php

@@ -1287,8 +1287,9 @@ sql
         $logistic_fee = 0;
         $volume = 0;
         $weight = 0;
+        $isBunched = false;
         if (!$order->logistic || $order->logistic->type != "快递")$logistic_fee = null;
-        $isBunched = $order->logistic->is_bunched=='Y';
+        else $isBunched = $order->logistic->is_bunched=='Y';
         $weightExceptionMark = false;
         $provinceId = null;
         $taxFee = 0;

+ 2 - 2
app/Services/OwnerPriceOperationService.php

@@ -369,8 +369,8 @@ class OwnerPriceOperationService
     private function changeUnit($ownerId,$commodity)
     {
         if (!$commodity)return -4;
-        if ($commodity->pack_spec)return $commodity->pack_spec;
-        $pack = app("CommodityService")->getPack($ownerId,$commodity->sku);
+        if ($commodity["pack_spec"])return $commodity["pack_spec"];
+        $pack = app("CommodityService")->getPack($ownerId,$commodity["sku"]);
         if (!$pack)return -6;
         return $pack;
     }