feat:修改数据库迁移文件

main
gzydong 2021-11-07 22:40:52 +08:00
parent cc7d1eaf71
commit fce5569a74
1 changed files with 5 additions and 5 deletions

View File

@ -159,6 +159,11 @@ class TalkService extends BaseService
->orWhere([['user_id', '=', $receiver_id], ['receiver_id', '=', $user_id]]); ->orWhere([['user_id', '=', $receiver_id], ['receiver_id', '=', $user_id]]);
})->where('talk_type', $talk_type)->pluck('id'); })->where('talk_type', $talk_type)->pluck('id');
} else {// 群聊信息 } else {// 群聊信息
// 判读是否属于群消息并且判断是否是群成员
if ($talk_type == TalkModeConstant::GROUP_CHAT && !di()->get(GroupMemberService::class)->isMember($receiver_id, $user_id)) {
return false;
}
$ids = TalkRecords::whereIn('id', $record_ids)->where('talk_type', TalkModeConstant::GROUP_CHAT)->pluck('id'); $ids = TalkRecords::whereIn('id', $record_ids)->where('talk_type', TalkModeConstant::GROUP_CHAT)->pluck('id');
} }
@ -167,11 +172,6 @@ class TalkService extends BaseService
return false; return false;
} }
// 判读是否属于群消息并且判断是否是群成员
if ($talk_type == TalkModeConstant::GROUP_CHAT && !di()->get(GroupMemberService::class)->isMember($receiver_id, $user_id)) {
return false;
}
$data = array_map(function ($record_id) use ($user_id) { $data = array_map(function ($record_id) use ($user_id) {
return [ return [
'record_id' => $record_id, 'record_id' => $record_id,