Commit 8f5d7358 authored by zw's avatar zw

chat bug

parent bac8e12f
...@@ -91,11 +91,11 @@ class ChatMsg extends Model ...@@ -91,11 +91,11 @@ class ChatMsg extends Model
$where_ = $where_or = []; $where_ = $where_or = [];
if (isset($where_arr["from"])) { if (isset($where_arr["from"])) {
$where_["from_id"] = $where_arr["from"]; $where_["from_id"] = $where_arr["from"];
$where_or["to_id"] = $where_arr["from"]; //$where_or["to_id"] = $where_arr["from"];
} }
if (isset($where_arr["target"])) { if (isset($where_arr["target"])) {
$where_["to_id"] = $where_arr["target"]; $where_["to_id"] = $where_arr["target"];
$where_or["from_id"] = $where_arr["target"]; // $where_or["from_id"] = $where_arr["target"];
} }
$where_["is_read"] = 0; $where_["is_read"] = 0;
if(empty($where_) || empty($where_or)){ if(empty($where_) || empty($where_or)){
...@@ -103,9 +103,9 @@ class ChatMsg extends Model ...@@ -103,9 +103,9 @@ class ChatMsg extends Model
} }
try { try {
$this->db->where($where_) $this->db->where($where_)
->whereOr(function ($query) use ($where_or) { /* ->whereOr(function ($query) use ($where_or) {
$query->where($where_or); $query->where($where_or);
}) })*/
->update($update_arr); ->update($update_arr);
return true; return true;
} catch (\Exception $e) { } catch (\Exception $e) {
......
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