Просмотр исходного кода

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

sunxbiao месяцев назад: 11
Родитель
Сommit
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 705
             $billEndTime = $this->userThird->getSettleTime($createTime);
706 706
 
707 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 716
             $formatList[] = [
709 717
                 'uid' => $userId,
710
-                'commission' => $order['actualFee'] ?: $order['estimateFee'],//佣金
718
+                'commission' => $commission,//佣金
711 719
                 'commission_share' => $order['finalRate'],
712 720
                 'order_sn' => $order['orderId'],
713 721
                 'pay_money' => $order['actualCosPrice'] ?: $order['estimateCosPrice'],