Bladeren bron

20221014 重新存取 utm 參數

LuluFJ.Ho 2 jaren geleden
bovenliggende
commit
380003188e

+ 1
- 1
app/Http/Controllers/Api/SeminarSignUpController.php Bestand weergeven

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

+ 15
- 5
app/Http/Services/Api/SeminarSignUpService.php Bestand weergeven

135
 
135
 
136
     public function getUTMData()
136
     public function getUTMData()
137
     {
137
     {
138
-        // \DB::enableQueryLog(); 
139
         
138
         
140
         $res = $this->signupDb
139
         $res = $this->signupDb
141
             ->select(['id', 'media'])
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
             ->whereNotNull('media')
156
             ->whereNotNull('media')
145
             ->whereNull('utm_source')
157
             ->whereNull('utm_source')
146
 
158
 
147
             ->get()
159
             ->get()
148
             ->toArray();
160
             ->toArray();
149
         
161
         
150
-        // \Log::debug(print_r(DB::getQueryLog(), true));
151
-        
152
         // 整理返回值並返回
162
         // 整理返回值並返回
153
         return $res;
163
         return $res;
154
 
164