瀏覽代碼

分销商

shensong 5 年之前
父節點
當前提交
26ba1e9e7b
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      app/Console/Commands/FxSyncMjOrderStatus.php

+ 6 - 2
app/Console/Commands/FxSyncMjOrderStatus.php

@@ -23,8 +23,12 @@ class FxSyncMjOrderStatus extends Command {
23 23
 
24 24
     public function handle()
25 25
     {
26
-        $this->SyncMjOrderStatus();
26
+        try {
27
+            $this->SyncMjOrderStatus();
27 28
 //        $this->SyncFxOrderStatus();
29
+        }catch (\Exception $exception){
30
+            echo $exception->getLine();
31
+        }
28 32
     }
29 33
     public function SyncMjOrderStatus(){
30 34
 
@@ -50,7 +54,7 @@ class FxSyncMjOrderStatus extends Command {
50 54
                         $skuCode = $sku['skuCode'];
51 55
                         $code_arr = explode('|', $skuCode);
52 56
                         $sku_id = $code_arr[1];
53
-                        $cost = GoodsSkus::select('referenceCost', 'is_weigh')->where('id', $sku_id)->first(); //获取规格成本/是否称重
57
+                        $cost = GoodsSkus::select('referenceCost', 'is_weigh', 'outPrice')->where('id', $sku_id)->first(); //获取规格成本/是否称重
54 58
                         $quantity = $cost->is_weigh == 1 ? $sku['quantity']/2 : $sku['quantity']; //对应规格数量
55 59
 
56 60
 //                        $order_sku_cost = $cost->outPrice * $quantity; //对应规格总成本