Commit 210a48e5 authored by zw's avatar zw

优化下

parent abf736bb
......@@ -558,7 +558,7 @@ class AppChat extends Basic
{
$params = $this->params;
/* $params = array(
"agent_id" => 1
"agent_id" => 5739
);*/
if (empty($params['agent_id'])) {
return $this->response("101", "请求参数错误");
......@@ -580,6 +580,7 @@ class AppChat extends Basic
}
$where["to_id"] = "agent_" . $params["agent_id"];
$where["is_read"] = 0;
$chatModel = new ChatMsg();
$msg_count = $chatModel->getTotalByToId($where);
if ($msg_count > 0) {
......
......@@ -142,6 +142,7 @@ class ChatMsg extends Model
$data = $this->db
->where($params)
->count();
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