|
|
@@ -41,6 +41,7 @@ class Events
|
|
|
public static function onWorkerStart($worker)
|
|
|
{
|
|
|
if (empty(self::$db)) {
|
|
|
+ //self::$db = new \Workerman\MySQL\Connection('192.168.2.168', '3306', 'vali', '123456', 'customer_service');
|
|
|
self::$db = new \Workerman\MySQL\Connection('192.168.2.200', '3306', 'vali', '1234', 'customer_service');
|
|
|
}
|
|
|
|
|
|
@@ -557,10 +558,11 @@ class Events
|
|
|
}
|
|
|
self::$db->update('ws_service_log')->cols(['status' => 2, 'end_time' => time()])->where('servicelog_id=' . $oldlog['servicelog_id'])->query();
|
|
|
$tmp_old_service_logid = $oldlog['servicelog_id'];
|
|
|
+ $oldservicelog_id = $oldlog['servicelog_id'];
|
|
|
unset($oldlog['servicelog_id']);
|
|
|
|
|
|
// 修改会话时长
|
|
|
- $servicelog_id = $oldlog['servicelog_id'];
|
|
|
+ $servicelog_id = $oldservicelog_id;
|
|
|
$serviceLog = self::$db->query("select `start_time`,`intime` from `ws_service_log` where `servicelog_id`= '$servicelog_id'");
|
|
|
$logCount = self::$db->query("select count(*) as `count` from `ws_chat_log` where `servicelog_id`= '$servicelog_id'");
|
|
|
$alarmCount = $logCount[0]['count'];
|
|
|
@@ -1490,7 +1492,10 @@ class Events
|
|
|
//客服工单转单
|
|
|
private static function servicetrutoother($type, $owen, $otherkfid, $serverid, $clientuid)
|
|
|
{
|
|
|
- $db->insert('ws_serviceturn_log')->cols(array(
|
|
|
+ $owen = intval(substr($owen, 2));
|
|
|
+ $otherkfid = intval(substr($otherkfid, 2));
|
|
|
+
|
|
|
+ self::$db->insert('ws_serviceturn_log')->cols(array(
|
|
|
'stype' => $type,
|
|
|
'uid' => $owen,
|
|
|
'tuid' => $otherkfid,
|
|
|
@@ -1915,7 +1920,7 @@ class Events
|
|
|
}
|
|
|
$serviceLog[$k]['allCount'] = $allCount;
|
|
|
}
|
|
|
- print_r([$serviceLog,$csdTime,$verifyReturnTime]);
|
|
|
+ print_r([$serviceLog, $csdTime, $verifyReturnTime]);
|
|
|
// 查询对话时效设置.
|
|
|
foreach ($adminList as $v) {
|
|
|
$chat_message = [
|