wugg 8 ヶ月 前
コミット
d431dfb95d
1 ファイル変更8 行追加5 行削除
  1. 8 5
      app/youzan/logic/Goodup.php

+ 8 - 5
app/youzan/logic/Goodup.php

@@ -4,6 +4,7 @@ namespace app\youzan\logic;
 
 use app\admin\common\User;
 use app\admin\model\ActionLog;
+use app\admin\model\GoodTax;
 use app\admin\model\ProcessOrder;
 use app\txx\model\YzGood;
 use app\youzan\model\PlatformYouzan;
@@ -587,11 +588,13 @@ class Goodup
         $ladder = Db::name("good_ladder")->where(['skuCode' => $data['skuCode'], "is_del" => 0])->select()->toArray();
         $data["ladderlist"] = !empty($ladder) ? $ladder : [];
         $nakelist = Db::name("good_nake")->where(['spuCode' => $data['spuCode'], "is_del" => 0])->select()->toArray();
-//        $catinfo = Db::name("cat")->where(["id"=>$data['cat_id']])->find();
-
-//        $cat_top_list = $data['yz_cat_info'];
-//        $cat_top_id = isset($cat_top_list[0]['id']) ? $cat_top_list[0]['id'] : 0;
-        // $budget = isset($catinfo['order_rate']) ? $catinfo['order_rate']/100:0;
+        $taxInfo=GoodTax::with(['tax'])->where(['spuCode'=>$data['spuCode']])->findOrEmpty();
+        $data['tax_id'] = $taxInfo['tax_id']??'';
+        $data['tax_name'] = $taxInfo['cat_name']??'';
+        $data['tax_short_name'] =$taxInfo['short_name']??'';
+        $data['tax_code'] =$taxInfo['merge_code']??'';
+        $data['tax']=$taxInfo['tax']??'';
+        $data['inv_good_name']=$taxInfo['inv_good_name']??'';
         $gold_price = 0;
         if ($data['is_gold_price'] == 1 && $data['cost_fee'] != 0 && $data['good_price'] == 0) {
             $gold_price = Db::name("gold_price1")->where(["type" => $data['noble_metal'], "status" => 1, "is_del" => 0])->order("addtime desc")->value('price', 0);