Commit cab447ba authored by clone's avatar clone

bug

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