master
elf 3 years ago
parent 7e0c26c68f
commit eeb2e640ac

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

Loading…
Cancel
Save