tgz 2 years ago
parent
commit
7404bf18ac
3 changed files with 22 additions and 23 deletions
  1. 4 4
      app/command/FixTrackLog.php
  2. 6 6
      app/controller/Track.php
  3. 12 13
      app/services/TrackService.php

+ 4 - 4
app/command/FixTrackLog.php

@@ -48,10 +48,10 @@ class FixTrackLog extends Command
             if (!is_array($params)) {
                 $output->writeln('不是json:'.$params);
             }
-            $res = TrackService::confirm($params);
-            if ($res) {
-                continue;
-            }
+            // $res = TrackService::confirm($params);
+            // if ($res) {
+            //     continue;
+            // }
             TrackService::TiktokRedisDeal([$paramsc]);
         }
         return 1;

+ 6 - 6
app/controller/Track.php

@@ -19,12 +19,12 @@ class Track
         if (empty($params['ua']) || $params['ua'] == '__UA__') {
             $params['ua'] = get_client_ua();
         }
-        if (getProp($params,'is_confirm')) {
-            $res = TrackService::confirm($params);
-            if ($res) {
-                return 'success1' ;
-            }
-        }
+        // if (getProp($params,'is_confirm')) {
+        //     $res = TrackService::confirm($params);
+        //     if ($res) {
+        //         return 'success1' ;
+        //     }
+        // }
         TrackService::push($params);
         return 'success' ;
     }

+ 12 - 13
app/services/TrackService.php

@@ -127,19 +127,18 @@ class TrackService
        $dycallback = getProp($params,'dycallback');
        $channel_id = getProp($params,'channel_id');
        $ip = getProp($params,'ip');
-       // if ($dycallback == 1) {
-       //     $clickid = getProp($params,'clickid');
-       //     if (!$clickid) {
-       //         return false;
-       //     }
-       //     $model =  DouyinTrack::model();
-       //     $id =$model->where('ip',$ip)->where('distribution_channel_id',$channel_id)->where('callback',$clickid)->value('id');
-       //     if(empty($id)){
-       //         return false;
-       //     }
-       //     return $id;
-       // }
-       return 1;
+       if ($dycallback == 1) {
+           $clickid = getProp($params,'clickid');
+           if (!$clickid) {
+               return false;
+           }
+           $model =  DouyinTrack::model();
+           $id =$model->where('ip',$ip)->where('distribution_channel_id',$channel_id)->where('callback',$clickid)->value('id');
+           if(empty($id)){
+               return false;
+           }
+           return $id;
+       }
        
     }