Browse Source

goodupprice接口添加分类id==6的判断条件

wufeng 2 years ago
parent
commit
71c8f873f3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/admin/controller/Goodup.php

+ 3 - 1
app/admin/controller/Goodup.php

@@ -1785,9 +1785,11 @@ class Goodup extends Base
         }
         $catinfo = Db::name("cat")->where(["id"=>$good['cat_id']])->find();
         $budget = isset($catinfo['sale_rate']) ? $catinfo['sale_rate']/100:0;
+        $top_cat_id = made($catinfo['id']);//获取所有分类
+        $top_cat_id = isset($top_cat_id[0]['id']) ? $top_cat_id[0]['id'] : 0;//获取顶级分类id
 
         $sale_cost_fee = 0;
-        if($good['is_gold_price']==1){
+        if ($good['is_gold_price'] == 1 && $top_cat_id == 6) {
 //            $saleprice =  $good['noble_weight']*$good["cgd_gold_price"] + $nakelist['cost_fee']/(1-$budget)*$good['noble_weight']+$nakelist['mark_fee']+$nakelist['package_fee']+$nakelist['cert_fee']+$nakelist['nake_fee']+$nakelist['delivery_fee'];
 
             //系统售价=(贵金属重量*供应商采购金价 + 工艺费*贵金属重量+加标费+包装费+证书费+成本裸价+运费+其他费用)/(1-成本售价/100)