|
|
@@ -874,7 +874,7 @@ class Events
|
|
|
$now = time();
|
|
|
if (!empty($user_info)) {
|
|
|
foreach ($user_info as $val) {
|
|
|
- Gateway::sendToClient($val, json_encode(['type' => 'serviceoffline', 'msg' => '客户人员下线!'], 256));
|
|
|
+ Gateway::sendToClient($val, json_encode(['message_type' => 'serviceoffline', 'msg' => '客户人员下线!'], 256));
|
|
|
if (isset($simpliUsersID_UID_Arr[$val])) {
|
|
|
// 修改会话时长
|
|
|
$serviceLog = self::$db->query("select `start_time`,`servicelog_id`,`intime` from `ws_service_log` where `user_id`= '$simpliUsersID_UID_Arr[$val]' and kf_id='$uid' and group_id=$group and `status`!=2");
|
|
|
@@ -1840,7 +1840,7 @@ class Events
|
|
|
//$chatLog = self::$db->query("SELECT `servicelog_id`,MAX(`time_line`) FROM `ws_chat_log` WHERE ".$whereOr." group by `servicelog_id`");
|
|
|
$chatLog = self::$db->query("
|
|
|
select * from ws_chat_log as a where time_line=(
|
|
|
- select max(b.time_line) from ws_chat_log as b where a.servicelog_id = b.servicelog_id and (" . $whereOr . ") group by servicelog_id
|
|
|
+ select max(b.time_line) from ws_chat_log as b where a.servicelog_id = b.servicelog_id and from_id not like 'KF%' and (" . $whereOr . ") group by servicelog_id
|
|
|
)
|
|
|
");
|
|
|
$setOvertime = strtotime('-' . (self::$global->overtime['systemconfig_data'] - 60) . ' second');
|