Commit c6cd1fd5 authored by clone's avatar clone

撤回 聊天msg_id为0判断 标记----------------------

parent 3d8453b8
......@@ -441,15 +441,11 @@ class ChatService
}
try {
if ($relation_list[$item["id"]][0]["msg_id"] > 0) {
$where_["id"] = array( "between", array( $relation_list[$item["id"]][0]["msg_id"], $chat_info[0]["id"] ) );
//计算未读消息个数
$unread_count = $msgModel->getTotalUnread($where_, "id");
$result[$key]["unread"] = $unread_count > 0 ? $unread_count - 1 : 0;
//dump($unread_count);
} else {
$result[$key]["unread"] = 0;
}
$where_["id"] = array( "between", array( $relation_list[$item["id"]][0]["msg_id"], $chat_info[0]["id"] ) );
//计算未读消息个数
$unread_count = $msgModel->getTotalUnread($where_, "id");
//dump($unread_count);
$result[$key]["unread"] = $unread_count > 0 ? $unread_count - 1 : 0;
} catch (Exception $exception) {
$result[$key]["unread"] = 0;
}
......
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