|
|
@@ -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')
|