From 75ea3e237020dd1b915a0871a85aa13518496f6e Mon Sep 17 00:00:00 2001
From: hgc <paul@bestfulfill.com>
Date: Thu, 24 Apr 2025 20:32:47 +0800
Subject: [PATCH] =?UTF-8?q?Analytics=20purchases=5Fvalue=E5=8F=A3=E5=BE=84?=
 =?UTF-8?q?=E6=94=B9=E6=88=90platform=5Fpurchase=5Fvalue?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/service/AdsInsightService.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/service/AdsInsightService.php b/app/service/AdsInsightService.php
index f854155..4e0249b 100644
--- a/app/service/AdsInsightService.php
+++ b/app/service/AdsInsightService.php
@@ -208,7 +208,7 @@ class AdsInsightService
              COALESCE(SUM(d.purchases), 0) as purchases,
              COALESCE(SUM(d.platform_purchase), 0) as platform_purchase,
              COALESCE(SUM(d.pixel_purchase), 0) as pixel_purchase,
-             COALESCE(SUM(d.purchases_value / 1000000), 0) as purchases_value,
+             COALESCE(SUM(d.platform_purchase_value / 1000000), 0) as purchases_value,
              COALESCE(SUM(d.platform_purchase_value / 1000000), 0) as revenue,
              COALESCE(SUM(d.total_cost / 1000000), 0) as total_cost,
              -1 as conversion_rate, -1 as roas, -1 as ctr,-1 as net_profit,-1 as net_profit_margin,-1 as net_profit_on_ad_spend')
@@ -920,7 +920,7 @@ class AdsInsightService
             COALESCE(SUM(d.purchases), 0) as purchases,
             COALESCE(SUM(d.platform_purchase), 0) as platform_purchase,
             COALESCE(SUM(d.pixel_purchase), 0) as pixel_purchase,
-            COALESCE(SUM(d.purchases_value / 1000000), 0) as purchases_value,
+            COALESCE(SUM(d.platform_purchase_value / 1000000), 0) as purchases_value,
             COALESCE(SUM(d.platform_purchase_value / 1000000), 0) as revenue,
             COALESCE(SUM(d.total_cost / 1000000), 0) as total_cost,
             -1 as conversion_rate, -1 as roas, -1 as ctr,-1 as net_profit,-1 as net_profit_margin,-1 as net_profit_on_ad_spend')
@@ -1227,7 +1227,7 @@ class AdsInsightService
         COALESCE(SUM(d.purchases), 0) as purchases,
         COALESCE(SUM(d.platform_purchase), 0) as platform_purchase,
         COALESCE(SUM(d.pixel_purchase), 0) as pixel_purchase,
-        COALESCE(SUM(d.purchases_value) / 1000000, 0) as purchases_value,
+        COALESCE(SUM(d.platform_purchase_value) / 1000000, 0) as purchases_value,
         COALESCE(SUM(d.platform_purchase_value) / 1000000, 0) as revenue,
         COALESCE(SUM(d.total_cost) / 1000000, 0) as total_cost,
         -1 as conversion_rate, -1 as roas, -1 as ctr, -1 as net_profit, -1 as net_profit_margin, -1 as net_profit_on_ad_spend')
@@ -1404,7 +1404,7 @@ class AdsInsightService
         COALESCE(SUM(d.purchases), 0) as purchases,
         COALESCE(SUM(d.platform_purchase), 0) as platform_purchase,
         COALESCE(SUM(d.pixel_purchase), 0) as pixel_purchase,
-        COALESCE(SUM(d.purchases_value) / 1000000, 0) as purchases_value,
+        COALESCE(SUM(d.platform_purchase_value) / 1000000, 0) as purchases_value,
         COALESCE(SUM(d.platform_purchase_value / 1000000), 0) as revenue,
         COALESCE(SUM(d.total_cost) / 1000000, 0) as total_cost,
         -1 as conversion_rate, -1 as roas, -1 as ctr, -1 as net_profit, -1 as net_profit_margin, -1 as net_profit_on_ad_spend')