|
@@ -88,6 +88,14 @@ class MessageService extends BaseService
|
|
|
|
|
|
|
|
if ($type != 9) {
|
|
if ($type != 9) {
|
|
|
$query->where('a.to_uid', $userId);
|
|
$query->where('a.to_uid', $userId);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ $query->where(function ($query) use ($userId) {
|
|
|
|
|
+ $query->where(function($query) use($userId){
|
|
|
|
|
+ $query->where(['a.from_uid' => $userId,'a.from_show'=>1]);
|
|
|
|
|
+ })->orWhere(function($query) use($userId){
|
|
|
|
|
+ $query->where(['a.to_uid' => $userId,'a.to_show'=>1]);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$chatType = isset($params['chat_type']) ? intval($params['chat_type']) : 0;
|
|
$chatType = isset($params['chat_type']) ? intval($params['chat_type']) : 0;
|