|
|
@@ -1243,11 +1243,15 @@ class Events
|
|
|
//获取工单最后20条聊天记录
|
|
|
private static function getServerChagLog($sericeId, $limit = 20)
|
|
|
{
|
|
|
- $ret = self::$db->select('from_id,from_name,to_id,to_name,content,time_line')->from('ws_chat_log')->where('servicelog_id=:sid')->bindValues(array('sid' => $sericeId))->orderByDESC(['id'])->limit($limit)->query();
|
|
|
+ $ret = self::$db->select('id,from_id,from_name,to_id,to_name,content,time_line')->from('ws_chat_log')->where('servicelog_id=:sid')->bindValues(array('sid' => $sericeId))->orderByDESC(['id'])->limit($limit)->query();
|
|
|
if ($ret) {
|
|
|
- rsort($ret);
|
|
|
+ $tmp = [];
|
|
|
+ foreach ($ret as $val) {
|
|
|
+ array_unshift($tmp, $val);
|
|
|
+ }
|
|
|
+ return $tmp;
|
|
|
}
|
|
|
- return $ret;
|
|
|
+ return [];
|
|
|
}
|
|
|
|
|
|
//用户排队数据 按组
|