Quellcode durchsuchen

fix bug: 滴滴跑腿也有多类型选项,要根据类型来选择生成报价(即根据 $bracketContent)

shizhongqi vor 6 Monaten
Ursprung
Commit
993c41f751

+ 8 - 1
common/components/delivery/util/DeliveryQuoteUtil.php

@@ -84,8 +84,11 @@ class DeliveryQuoteUtil
 
         // 10. 获取报价结果
         $result = null;
-        if (in_array($params['deliveryPlatform'], ['huolala', 'fengniao'])) {
+        if (in_array($params['deliveryPlatform'], ['huolala', 'fengniao', 'didi'])) {
             $bracketContent = $params['deliveryBracketContent'] ?? '';
+            if ($params['deliveryPlatform'] == 'didi') {
+                $bracketContent = "滴滴 ({$bracketContent})";
+            }
             $key = '';
             foreach ($deliveryList as $item) {
                 if ($params['deliveryPlatform'] == 'huolala') {
@@ -94,6 +97,10 @@ class DeliveryQuoteUtil
                 if ($params['deliveryPlatform'] == 'fengniao') {
                     $key = 'base_goods_id';
                 }
+                if ($params['deliveryPlatform'] == 'didi') {
+                    $key = 'name';
+                }
+
                 if ($item[$key] == $bracketContent) {
                     $result = $item;
                 }

+ 0 - 1
common/components/rabbitmq/notifyConsumer.php

@@ -57,7 +57,6 @@ class notifyConsumer implements ConsumerInterface
                     //供货商跑腿异常通知
                     $result = $this->ghsPtErrorAction($data);
                     break;
-                    break;
                 case 'hd_pt_error':
                     //花店跑腿异常通知
                     $result = $this->hdPtErrorAction($data);