wesmiler 2 years ago
parent
commit
bcd3b8afbd
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/Services/Api/MessageService.php

+ 4 - 4
app/Services/Api/MessageService.php

@@ -85,7 +85,7 @@ class MessageService extends BaseService
                 if($type){
                     $query->where('a.type', $type);
                 }
-                
+
                 if($type != 9){
                     $query->where('a.to_uid', $userId);
                 }
@@ -95,9 +95,9 @@ class MessageService extends BaseService
                     $query->where('a.chat_type', $chatType);
                 }
 
-                $status = isset($params['status'])? intval($params['status']) : 0;
-                if($status){
-                    $query->where('a.status', $status);
+                $chatKey = isset($params['chat_key'])? trim($params['chat_key']) : '';
+                if($chatKey){
+                    $query->where('a.chat_key', $chatKey);
                 }
             })->select($field)
             ->orderBy('a.create_time','desc')