Ver código fonte

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

Jonlin 6 anos atrás
pai
commit
c0b45915a5

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

@@ -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 [];
     }
 
     //用户排队数据  按组