Commit d61f6c6d authored by hujun's avatar hujun

获取推送记录

parent 276ad11d
...@@ -63,7 +63,7 @@ class ChatUserExt extends BaseModel ...@@ -63,7 +63,7 @@ class ChatUserExt extends BaseModel
* @throws \think\Exception * @throws \think\Exception
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getChatUserExtByUserId($params, $field) public function getChatUserExtByUserId($params, $field, $limit = 1)
{ {
$where_ = []; $where_ = [];
if (isset($params['only_id'])) { if (isset($params['only_id'])) {
...@@ -79,6 +79,8 @@ class ChatUserExt extends BaseModel ...@@ -79,6 +79,8 @@ class ChatUserExt extends BaseModel
->alias("a") ->alias("a")
->join("chat_user b", "a.ext_id = b.id", "right") ->join("chat_user b", "a.ext_id = b.id", "right")
->where($where_) ->where($where_)
->order('update_time DESC')
->limit($limit)
->select(); ->select();
//echo $this->getLastSql(); //echo $this->getLastSql();
return $data; return $data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment