「検索機能がおかしいです」
このコミットが含まれているのは:
コミット
770fe6e6fd
|
@ -486,7 +486,10 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
foreach ($list as $i => $l) {
|
||||
if (null === (FatherRelation::select('id')->where('father_id', (int)$l->father_id)->where('child_id', (int)$r->child_id)->first())) {
|
||||
if (null === ($rel = FatherRelation::select('id')->where('father_id', (int)$l->father_id)->where('child_id', (int)$r->child_id)->first())) {
|
||||
continue;
|
||||
}
|
||||
if ($rel->child_id != (int)$rel->child_id) {
|
||||
continue;
|
||||
}
|
||||
if (null === ($ma = MeetingApprovals::select('id')->where('child_id', (int)$r->child_id)->where('meeting_id', (int)$l->id)->whereNotNull('approval_at')->first())) {
|
||||
|
@ -520,7 +523,10 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
foreach ($list as $i => $l) {
|
||||
if (null === (FatherRelation::select('id')->where('father_id', (int)$l->father_id)->where('child_id', (int)$r->child_id)->first())) {
|
||||
if (null === ($rel = FatherRelation::select('id')->where('father_id', (int)$l->father_id)->where('child_id', (int)$r->child_id)->first())) {
|
||||
continue;
|
||||
}
|
||||
if ($rel->child_id != (int)$rel->child_id) {
|
||||
continue;
|
||||
}
|
||||
if (null === ($ma = MeetingApprovals::select('id')->where('child_id', (int)$r->child_id)->where('meeting_id', (int)$l->id)->whereNull('approval_at')->first())) {
|
||||
|
@ -549,11 +555,15 @@ class MeetingsController extends Controller {
|
|||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->where('father_id', (int)$r->father_id)->orderBy('updated_at', 'desc')->get())) {
|
||||
$list = [];
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 200, 'params' => $result];
|
||||
}
|
||||
|
||||
foreach ($list as $i => $l) {
|
||||
if ($l->father_id != (int)$r->father_id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (null === ($l->approvals = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->get())) {
|
||||
continue;
|
||||
}
|
||||
|
@ -596,11 +606,15 @@ class MeetingsController extends Controller {
|
|||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->where('father_id', (int)$r->father_id)->orderBy('updated_at', 'desc')->get())) {
|
||||
$list = [];
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 200, 'params' => $result];
|
||||
}
|
||||
|
||||
foreach ($list as $i => $l) {
|
||||
if ($l->father_id != (int)$r->father_id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (null === ($l->approvals = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$l->id)->get())) {
|
||||
continue;
|
||||
}
|
||||
|
|
新しいイシューから参照