Browse Source

金额为0的订单不再回传

shensong00 3 months ago
parent
commit
5087c688a4
1 changed files with 4 additions and 10 deletions
  1. 4 10
      app/Console/Commands/ECommerceUserActionsDataUpload.php

+ 4 - 10
app/Console/Commands/ECommerceUserActionsDataUpload.php

@@ -93,7 +93,6 @@ class ECommerceUserActionsDataUpload extends Command
93 93
 
94 94
     public function getReportRules($data)
95 95
     {
96
-        # 验证关键参数是否为空
97 96
         if ( !isset($data['order_id']) || empty($data['account_id']) || empty($data['app_id']) ||
98 97
             (empty($data['order_pay_time']) || empty($data['pay_money']))
99 98
         ) {
@@ -104,7 +103,10 @@ class ECommerceUserActionsDataUpload extends Command
104 103
             ];
105 104
 
106 105
             $this->updateOrderReportStatus($data['order_id'], $updateData);
107
-            EmailQueue::rPush('电商直投数据回传异常 - 关键参数为空', json_encode($data), self::NOTICE_EMAIL, '电商直投');
106
+            if(!empty($data['pay_money'])) {// 订单金额为0的订单不回传
107
+                EmailQueue::rPush('电商直投数据回传异常 - 关键参数为空', json_encode($data), self::NOTICE_EMAIL, '电商直投');
108
+            }
109
+
108 110
             return false;
109 111
         }
110 112
 
@@ -222,14 +224,6 @@ class ECommerceUserActionsDataUpload extends Command
222 224
         $clickId = $clickData['id'];
223 225
 
224 226
         # 根据投放账号查询数据源ID
225
-        $bindUserActionSetIdArr = [
226
-            '50801286' => '1207494989',
227
-            '50801285' => '1207490596',
228
-            '50801284' => '1207494945',
229
-            '50801283' => '1207498559',
230
-            '50801282' => '1207500249'
231
-        ];
232
-//        $data['bind_user_action_set_id'] = $bindUserActionSetIdArr[$data['account_id']] ?? null;
233 227
         $data['bind_user_action_set_id'] = OfficialWebUserActionSetId::getAccountBindUserActionSetId($data['sys_group_id'], $data['account_id']);
234 228
         if(empty($data['bind_user_action_set_id'])) {
235 229
             EmailQueue::rPush('电商直投订单回传数据源ID查询异常', json_encode([$data], 256), ['song.shen@kuxuan-inc.com'], '电商直投');