Browse Source

平台订单导入,优化

wufeng 2 years ago
parent
commit
ea45a32316
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/command/ImportOrderFromCHandleData.php

+ 2 - 2
app/command/ImportOrderFromCHandleData.php

@@ -150,7 +150,7 @@ class ImportOrderFromCHandleData extends Command
                             //$saleprice(最终售价) = (打样费/购买数量 + 开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价+物流费)/(1-成本售价/100);
                             $gold_sale_price = $ct['demo_fee'] / $good_num + $ct['open_fee'] / $good_num + $ct['noble_weight'] * $gold["price"] + $good['cost_fee'] * $ct['noble_weight'] + $origin['package_fee'] + $origin['mark_fee'] + $origin['cert_fee'] + $origin['nake_fee'] + $origin['delivery_fee'];
                             if ($sale_price < $gold_sale_price) throw new Exception('价格不符合根据实时金价计算出的最终售价');
-                            
+
                             $ct['cgd_gold_price'] = $gold['price'];
 
 //                $order_rate = Db::name("cat")->where(["id" => $ct['cat_id']])->value('order_rate');
@@ -544,7 +544,7 @@ class ImportOrderFromCHandleData extends Command
                     return false;
                 }
                 $good_data[] = ['good_log_code' => $cgdCode, "stock_id" => isset($stoc['id']) ? $stoc['id'] : Db::name("good_stock")->getLastInsID(), "type" => 1, 'stock' => $data['good_num'], "stock_name" => "wait_in_stock"];
-                GoodLog::LogAdd($this->post['token'], $good_data, "CGD");
+                GoodLog::LogAdd(['id' => 0, 'nickname' => 'system'], $good_data, "CGD");
 
                 return true;
             }