瀏覽代碼

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

# Conflicts:
#	vendor/GatewayWorker_windows/Applications/whisper/Events.php
vali 6 年之前
父節點
當前提交
97380431ee
共有 1 個文件被更改,包括 16 次插入7 次删除
  1. 16 7
      vendor/GatewayWorker_windows/Applications/whisper/Events.php

+ 16 - 7
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -221,7 +221,7 @@ class Events
             Gateway::sendToClient($data['kf_client_id'], json_encode($chat_message));
         }
         // 保存修改后的工单信息.
-        $redis->HSET('SERVICELOG', $message['conversationId'], $data);
+        self::$redis->HSET('SERVICELOG', $message['conversationId'], $data);
 
         // 聊天信息入库
         $insertChatData = [
@@ -643,13 +643,22 @@ class Events
         $kfInfo = json_decode(self::$redis->HGET('KFINFO', 'KF' . $data['kf_id']), true);
         // 删除当前工单.
         //self::$redis->hdel('SERVICELOG', $servicelogId);
-        $kfUserList = self::ArrayDataopt($kfInfo['user_info'], $kfInfo['client_id'], 0);
-        print_r([$kfInfo, $servicelogId, $kfUserList]);
-        die;
-        $kfInfo[''] = 1;
-        //$redis->HSET('SERVICELOG', $message['conversationId'], $data);
+        // 当前服务客服删除当前人员.
+        $kfUserList = self::ArrayDataopt($kfInfo['user_info'], $data['client_id'], 0);
+
+        return;
+
+        if (isset($kfInfo)) {
+            print_r([$kfInfo, $servicelogId]);
+            die;
+        }
+        // 当前客服所接待人员.
+        $kfInfo['user_info'] = $kfUserList;
+        $kfInfo['task'] = count($kfUserList);
+        // 存入客服信息.
+        $redis->HSET('KFINFO', 'KF' . $data['kf_id'], $kfInfo);
+        // 将数据存入数据库.
 
-        //print_r($data);
 
     }