Преглед изворни кода

客户端-京东服务商从京推推换成官方

sunxbiao пре 11 месеци
родитељ
комит
59559d8a64
1 измењених фајлова са 9 додато и 1 уклоњено
  1. 9 1
      app/controller/api/store/product/Jd.php

+ 9 - 1
app/controller/api/store/product/Jd.php

@@ -705,9 +705,17 @@ class Jd extends BaseController
705
             $billEndTime = $this->userThird->getSettleTime($createTime);
705
             $billEndTime = $this->userThird->getSettleTime($createTime);
706
 
706
 
707
             $address = Db::name('user_address')->field('code_list,village_id')->where('uid', $userId)->where('is_default', 1)->find();
707
             $address = Db::name('user_address')->field('code_list,village_id')->where('uid', $userId)->where('is_default', 1)->find();
708
+
709
+            $commission = $order['actualFee'] ?: $order['estimateFee'];
710
+            if (!empty($order['subUnionId'])) {
711
+                $subUnionIdList = explode('_', $order['subUnionId']);
712
+                if (!empty($subUnionIdList[0])) {
713
+                    $commission = $subUnionIdList[0];
714
+                }
715
+            }
708
             $formatList[] = [
716
             $formatList[] = [
709
                 'uid' => $userId,
717
                 'uid' => $userId,
710
-                'commission' => $order['actualFee'] ?: $order['estimateFee'],//佣金
718
+                'commission' => $commission,//佣金
711
                 'commission_share' => $order['finalRate'],
719
                 'commission_share' => $order['finalRate'],
712
                 'order_sn' => $order['orderId'],
720
                 'order_sn' => $order['orderId'],
713
                 'pay_money' => $order['actualCosPrice'] ?: $order['estimateCosPrice'],
721
                 'pay_money' => $order['actualCosPrice'] ?: $order['estimateCosPrice'],