|
@@ -634,10 +634,18 @@ class Events
|
|
|
*/
|
|
*/
|
|
|
public static function serverClose($servicelogId)
|
|
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);
|
|
//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;
|
|
$configOvertime = $v;
|
|
|
} elseif ($v['systemconfig_enName'] == 'unoperated') {
|
|
} elseif ($v['systemconfig_enName'] == 'unoperated') {
|
|
|
$configUnoperated = $v;
|
|
$configUnoperated = $v;
|
|
|
- } elseif ($v['systemconfig_enName'] == 'noResponse') {
|
|
|
|
|
- $configNoResponse = $v;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 查询未断开的工单.
|
|
// 查询未断开的工单.
|
|
@@ -1066,11 +1072,10 @@ class Events
|
|
|
$overtime = strtotime('-' . ($configOvertime['systemconfig_data']) . ' second');
|
|
$overtime = strtotime('-' . ($configOvertime['systemconfig_data']) . ' second');
|
|
|
$setUnoperated = strtotime('-' . ($configUnoperated['systemconfig_data'] - 60) . ' second');
|
|
$setUnoperated = strtotime('-' . ($configUnoperated['systemconfig_data'] - 60) . ' second');
|
|
|
$unoperated = strtotime('-' . ($configUnoperated['systemconfig_data']) . ' second');
|
|
$unoperated = strtotime('-' . ($configUnoperated['systemconfig_data']) . ' second');
|
|
|
- $noResponse = strtotime('-' . ($configNoResponse['systemconfig_data']) . ' second');
|
|
|
|
|
foreach ($serviceLog as $k => $v) {
|
|
foreach ($serviceLog as $k => $v) {
|
|
|
// 无效会话关闭.如果没有说一句话.
|
|
// 无效会话关闭.如果没有说一句话.
|
|
|
$data = json_decode($v, true);
|
|
$data = json_decode($v, true);
|
|
|
- if (!$data['userLastTime']) {
|
|
|
|
|
|
|
+ if (!isset($data['userLastTime'])) {
|
|
|
if ($data['start_time'] <= $unoperated) {
|
|
if ($data['start_time'] <= $unoperated) {
|
|
|
self::serverClose($k);
|
|
self::serverClose($k);
|
|
|
// 如果小于设定时间前一分钟则给出提示.
|
|
// 如果小于设定时间前一分钟则给出提示.
|