Sfoglia il codice sorgente

拼多多商品分类问题、成本价入订单ç™表

hefei 1 anno fa
parent
commit
96f723b100

+ 1 - 2
app/common/repositories/store/order/StoreOrderRepository.php

@@ -633,7 +633,6 @@ class StoreOrderRepository extends BaseRepository
633 633
                 //         if (!$flag) throw new ValidateException('请选择正确的优惠券');
634 634
                 //     }
635 635
                 // }
636
-                $cost = 0;
637 636
                 $total_extension_one = 0;
638 637
                 $total_extension_two = 0;
639 638
                 $mer_money = 0;
@@ -738,7 +737,7 @@ class StoreOrderRepository extends BaseRepository
738 737
 
739 738
                 $product_attr_unique_datas = Db::name("store_product_attr_value")->where("unique", $cartId_datas['product_attr_unique'])->find();
740 739
 
741
-
740
+                $cost = bcsub($cartInfo['order']['total_price'],$product_attr_unique_datas['plate_mer_profit'],2);
742 741
                 //TODO 生成订单
743 742
                 $_order = [
744 743
                     'commission_rate' => (float)$merchantRepository->get($cartInfo['mer_id'])->mer_commission_rate,

+ 4 - 0
app/controller/api/store/product/TaoKe.php

@@ -385,6 +385,10 @@ class TaoKe extends BaseController
385 385
      */
386 386
     public function pdd_cat()
387 387
     {
388
+        $data = Db::name('system_config_value')->where('config_key','pdd_category_list')->value('value');
389
+        if($data){
390
+            return app('json')->success('获取拼多多商品分类成功', json_decode($data,true));
391
+        }
388 392
         $parentId = $this->request->param('parentId') ?? 0;
389 393
         $result = DaTaoKe::pddCatList($parentId);
390 394
         if ($result['code'] == 0) {