vali пре 6 година
родитељ
комит
a8cbad6ef5
1 измењених фајлова са 12 додато и 2 уклоњено
  1. 12 2
      vendor/GatewayWorker_windows/Applications/whisper/Events.php

+ 12 - 2
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -1993,10 +1993,20 @@ class Events
     }
 
 
-    public static function resetServiceLog()
+    public static function resetServiceLog($kfid = 0)
     {
         $t = time() - 24 * 3600;
-        self::$db->query("update ws_service_log set status=2 where  start_time>=$t and  status!=2");
+
+        if ($kfid) {
+            if ((substr($kfid, 0, 2) == 'KF')) {
+                $kfid = intval(substr($kfid, 2));
+            }
+            $kfid = intval($kfid);
+            self::$db->query("update ws_service_log set status=2 where kf_id=$kfid and  start_time>=$t and  status!=2");
+        } else {
+            self::$db->query("update ws_service_log set status=2 where  start_time>=$t and  status!=2");
+        }
+
     }
 
     public static function onWorkerStop($businessWorker)