浏览代码

推送优化

zealerChina 1 年之前
父节点
当前提交
9fa626828d
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      application/common/service/ZopOrderService.php

+ 9 - 0
application/common/service/ZopOrderService.php

@@ -64,6 +64,10 @@ class ZopOrderService extends ZopBaseService
         $channel = $produce->contact_code ?? '';
         $images = $produce->images ?? '';
         $resourceId = $produce->resource_id ?? 0;
+        // 发展人编码
+        $developingNo = $produce->developing_no ?? '';
+        // 合约ID
+        $contractId = $produce->contract_id ?? '';
 
         // if (empty($resourceId)) {
             if (empty($goodsId)) {
@@ -190,6 +194,7 @@ class ZopOrderService extends ZopBaseService
                 'orderTotalFee' => $orderTotalFee,
                 'pageUrl' => $pageUrl,
                 'resourceId' => $resourceId,
+                'referrerCode' => $developingNo,
             ];
 
             $orderResult = self::autoNumSync($autoOrderParams, $order);
@@ -222,7 +227,11 @@ class ZopOrderService extends ZopBaseService
                 'orderTotalFee' => $orderTotalFee,
                 'pageUrl' => $pageUrl,
                 'resourceId' => $resourceId,
+                'referrerCode' => $developingNo,
             ];
+            if (!empty($contractId)) {
+                $preOrderParams['contractId'] = $contractId;
+            }
     
             $preOrderResult = self::preOrdersync($preOrderParams, $order);
             if ($preOrderResult['code'] != 0) {