Browse Source

分销商

shensong 5 years ago
parent
commit
52fee503be
1 changed files with 1 additions and 5 deletions
  1. 1 5
      app/Console/Commands/SyncGoods.php

+ 1 - 5
app/Console/Commands/SyncGoods.php

@@ -40,7 +40,6 @@ class SyncGoods extends Command {
40 40
     public function handleGoodsList($list) {
41 41
         foreach($list as $key=>$goods){
42 42
             //查询现在商品表中是否有该商品
43
-            Log::errorLog(1,[],"order/syncGoods",0,'');
44 43
             $info = DB::table('seafood_fx.goods')->where('productCode',$goods['productCode'])->first();
45 44
             if($info){
46 45
                 Log::errorLog(2,[],"order/syncGoods",0,'');
@@ -79,7 +78,6 @@ class SyncGoods extends Command {
79 78
                             die;
80 79
                         }
81 80
                         //更新商品信息以及添加库存
82
-                        Log::errorLog(3,[],"order/syncGoods",0,'');
83 81
                         $sku['goodsCode'] = $info->id;
84 82
                         $skus_ad = DB::table('seafood_fx.goods_skus')->insert($sku);
85 83
                     } else {
@@ -95,14 +93,13 @@ class SyncGoods extends Command {
95 93
                             Log::errorLog(json_encode($shopArr),[],"order/syncGoods",0,'');
96 94
                             die;
97 95
                         }
98
-                        Log::errorLog(4,[],"order/syncGoods",0,'');
99 96
 
100 97
                         $code = $sku['code'];
101 98
                         unset($sku['id']);
102 99
                         unset($sku['code']);
103 100
                         $sku_update = DB::table('seafood_fx.goods_skus')->where('code',$code)->update($sku);
104 101
                     }
105
-                    $productCode = $goods['productCode'];
102
+                    $productCode = $info->productCode;
106 103
                     unset($goods['id']);
107 104
                     unset($goods['productCode']);
108 105
                     $goods_up = DB::table('seafood_fx.goods')->where('productCode',$productCode)->update($goods);
@@ -127,7 +124,6 @@ class SyncGoods extends Command {
127 124
                 $mjArr['name'] = $goods['name'];
128 125
                 $mjArr['description'] = $goods['description'];
129 126
                 $mjArr['eshopCode'] = config('constants.ESHOP_CODE');
130
-                Log::errorLog(5,[],"order/syncGoods",0,'');
131 127
                 $mjArr['productCode'] = $goods['productCode'];
132 128
                 $mjArr['goodsCategoryName'] = $goods['goodsCategoryName'];
133 129
                 $mjArr['picUrl'] = $goods['picUrl'];