Ver Fonte

创意字段

tgz há 2 anos atrás
pai
commit
a25c38d401

+ 2 - 0
src/Controllers/LandingPage/LinkController.php

@@ -206,6 +206,7 @@ class LinkController extends Controller
             $temp['config_percent']= $value['config_percent'];
             $temp['adid']= $value['adid'];
             $temp['promotion_id'] = $value['promotion_id'];
+            $temp['creativeid'] = $value['creativeid'];
             $data[] = $temp;
         }
         $headers = [
@@ -224,6 +225,7 @@ class LinkController extends Controller
             '回传配置百分比',
             '广告计划id',
             '广告id2.0',
+            '创意id',
         ];
         ExcelHelper::exportWebFileCsv($headers, $data, "回传日志");
     }

+ 2 - 1
src/Controllers/LandingPage/Transformers/ReportOrderTramsformer.php

@@ -76,7 +76,8 @@ class ReportOrderTramsformer
             'config_percent' => ($item->reportOrder ? $item->reportOrder->config_percent * 100 : 0) . '%',
             'send_order_id' => $item->send_order_id,
             'nickname' => $item->nickname,
-            'promotion_id' => $item->reportUser ? $item->reportUser->promotion_id : 0,
+            'promotion_id' => $item->reportUser ? $item->reportUser->promotion_id : '',
+            'creativeid'   => $item->reportUser ? $item->reportUser->creativeid : '',
         ];
     }
 

+ 8 - 0
src/Services/LandingPage/LandingPageLinkService.php

@@ -251,6 +251,14 @@ class LandingPageLinkService
                     ->where('report_user_bind_records.promotion_id', $params['promotion_id']);
             });
         }
+        if (isset($params['creativeid']) && $params['creativeid']) {
+            $sql->whereExists(function ($query) use ($params) {
+                $query->select(DB::raw(1))
+                    ->from('report_user_bind_records')
+                    ->whereRaw('report_user_bind_records.uid = orders.uid')
+                    ->where('report_user_bind_records.creativeid', $params['creativeid']);
+            });
+        }
         if (isset($params['link_source']) && $params['link_source']) {
             $sql->whereExists(function ($query) use ($params) {
                 $query->select(DB::raw(1))