Commit cab447ba authored by clone's avatar clone

bug

parent a094c9f4
......@@ -83,15 +83,15 @@ class ChatMsg extends Model
if (isset($params["from"])) {
$where_["a.from_id"] = $params["from"];
$where_or["a.to_id"] = $params["from"];
//$where_or["a.to_id"] = $params["from"];
}
if (isset($params["target"])) {
$where_["a.to_id"] = $params["target"];
$where_or["a.from_id"] = $params["target"];
//$where_or["a.from_id"] = $params["target"];
}
if (isset($params["id"])) {
$where_["a.id"] = $params["id"];
$where_or["a.id"] = $params["id"];
// $where_or["a.id"] = $params["id"];
}
$where_["a.is_del"] = 0;
......@@ -99,9 +99,9 @@ class ChatMsg extends Model
->alias("a")
->join('chat_msg_ext b', 'a.id = b.msg_id', 'LEFT')
->where($where_)
->whereOr(function ($query) use ($where_or) {
/* ->whereOr(function ($query) use ($where_or) {
$query->where($where_or);
})
})*/
->order("a.created_at desc")
->count();
//echo $this->getLastSql();
......
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