Bladeren bron

加桌日志增加时间

zqwang 2 jaren geleden
bovenliggende
commit
54e51c8e95
1 gewijzigde bestanden met toevoegingen van 9 en 2 verwijderingen
  1. 9 2
      app/Modules/User/Services/UserService.php

+ 9 - 2
app/Modules/User/Services/UserService.php

@@ -56,12 +56,15 @@ class UserService
 
     public static function qappAddDesktop(int $uid, int $status)
     {
-        myLog('incrAddDeskTop')->info('qappAddDesktop', compact('uid', 'status'));
+        $time = getMillisecond();
+        myLog('incrAddDeskTop')->info('qappAddDesktop', compact('uid', 'status','time'));
         $log = QappUserAddDestop::where('uid', $uid)->orderBy('id', 'desc')->first();
 
         if($status == 1){
-            myLog('incrAddDeskTop')->info('qappAddDesktopTask', compact('uid', 'status'));
+
             UserTaskService::addUserTaskQueue($uid, BaseTask::add_desk, UserTaskService::add_trigger);
+            $time = getMillisecond();
+            myLog('incrAddDeskTop')->info('qappAddDesktop', compact('uid', 'status','time'));
         }
 
         if (!$log) {
@@ -90,6 +93,8 @@ class UserService
 
                 $job = new UserAddDeskJob($uid);
                 dispatch($job)->onConnection('rabbitmq')->onQueue('qapp_user_add_desk')->delay(now()->addMinutes(3));
+                $time = getMillisecond();
+                myLog('incrAddDeskTop')->info('qappAddDesktop', compact('uid', 'status','time'));
                 return false;
             }
 
@@ -102,6 +107,8 @@ class UserService
                 ]);
             }
             //相等 不做处理
+            $time = getMillisecond();
+            myLog('incrAddDeskTop')->info('qappAddDesktop', compact('uid', 'status','time'));
             return false;
         }
     }