master
elf 3 years ago
parent 7e0c26c68f
commit eeb2e640ac

@ -1681,7 +1681,7 @@ class QueryController extends BaseController
return $levelPromote;
}
private function getQueryPromote($levelPromote)
private function getQueryPromote($levelPromote, \Closure $whenNotSearch = null)
{
$queryPromote = null;
$promote = $this->getLoginPromote();
@ -1693,6 +1693,11 @@ class QueryController extends BaseController
}
if ($queryPromoteId == 0) {
$queryPromote = $this->getLoginPromote();
if ($whenNotSearch) {
$queryPromote = $whenNotSearch();
} else {
$queryPromote = $this->getLoginPromote();
}
} else {
$queryPromote = M('promote', 'tab_')->where(['id' => $queryPromoteId])->find();
}

Loading…
Cancel
Save