Browse Source

20221014 重新存取 utm 參數

LuluFJ.Ho 2 years ago
parent
commit
380003188e

+ 1
- 1
app/Http/Controllers/Api/SeminarSignUpController.php View File

@@ -224,7 +224,7 @@ class SeminarSignUpController extends ApiController
224 224
     public function restoreUTMData()
225 225
     {
226 226
         
227
-        $list = $this->seminarSignUpSv->getUTMData();
227
+        $list = $this->seminarSignUpSv->getUTMData2();
228 228
         \Log::info(print_r($list, true));
229 229
 return;
230 230
         $returnData = array();

+ 15
- 5
app/Http/Services/Api/SeminarSignUpService.php View File

@@ -135,20 +135,30 @@ class SeminarSignUpService
135 135
 
136 136
     public function getUTMData()
137 137
     {
138
-        // \DB::enableQueryLog(); 
139 138
         
140 139
         $res = $this->signupDb
141 140
             ->select(['id', 'media'])
142
-            ->where('id', '>', '526')
143
-            // ->where('id', '<', '100')
141
+            ->where('id', '>', '2168')
142
+
143
+            ->get()
144
+            ->toArray();
145
+        
146
+        // 整理返回值並返回
147
+        return $res;
148
+
149
+    }
150
+
151
+    public function getUTMData2()
152
+    {
153
+
154
+        $res = $this->signupDb
155
+            ->select(['id', 'media'])
144 156
             ->whereNotNull('media')
145 157
             ->whereNull('utm_source')
146 158
 
147 159
             ->get()
148 160
             ->toArray();
149 161
         
150
-        // \Log::debug(print_r(DB::getQueryLog(), true));
151
-        
152 162
         // 整理返回值並返回
153 163
         return $res;
154 164