Explorar o código

Merge branch 'dev' of http://git.bocai108.com:10180/Ethan/Customer-Service into dev

vali %!s(int64=6) %!d(string=hai) anos
pai
achega
227f1c6f61
Modificáronse 1 ficheiros con 11 adicións e 6 borrados
  1. 11 6
      vendor/GatewayWorker_windows/Applications/whisper/Events.php

+ 11 - 6
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -634,10 +634,18 @@ class Events
      */
     public static function serverClose($servicelogId)
     {
+        // 获取当前工单数据.
+        $data = json_decode(self::$redis->HGET('SERVICELOG', $servicelogId), true);
+        // 获取当前工单数据.
+        $kfInfo = json_decode(self::$redis->HGET('KFINFO', 'KF'.$data['kf_id']), true);
         // 删除当前工单.
         //self::$redis->hdel('SERVICELOG', $servicelogId);
-        $data = json_decode(self::$redis->HGET('SERVICELOG', $servicelogId), true);
-        print_r($data);
+        $kfUserList = self::ArrayDataopt($kfInfo['user_info'], $kfInfo['client_id'], 0);
+        print_r([$kfInfo,$servicelogId,$kfUserList]);die;
+        $kfInfo[''] = 1;
+        //$redis->HSET('SERVICELOG', $message['conversationId'], $data);
+
+        //print_r($data);
 
     }
 
@@ -1056,8 +1064,6 @@ class Events
                 $configOvertime = $v;
             } elseif ($v['systemconfig_enName'] == 'unoperated') {
                 $configUnoperated = $v;
-            } elseif ($v['systemconfig_enName'] == 'noResponse') {
-                $configNoResponse = $v;
             }
         }
         // 查询未断开的工单.
@@ -1066,11 +1072,10 @@ class Events
         $overtime = strtotime('-' . ($configOvertime['systemconfig_data']) . ' second');
         $setUnoperated = strtotime('-' . ($configUnoperated['systemconfig_data'] - 60) . ' second');
         $unoperated = strtotime('-' . ($configUnoperated['systemconfig_data']) . ' second');
-        $noResponse = strtotime('-' . ($configNoResponse['systemconfig_data']) . ' second');
         foreach ($serviceLog as $k => $v) {
             // 无效会话关闭.如果没有说一句话.
             $data = json_decode($v, true);
-            if (!$data['userLastTime']) {
+            if (!isset($data['userLastTime'])) {
                 if ($data['start_time'] <= $unoperated) {
                     self::serverClose($k);
                     // 如果小于设定时间前一分钟则给出提示.