<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Provider\SuperSearch\Controller; use Illuminate\Routing\Controller; use ModStart\Core\Exception\BizException; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use Module\Vendor\Provider\SuperSearch\AbstractSuperSearchProvider; use Module\Vendor\Provider\SuperSearch\SuperSearchBiz; abstract class AbstractAdminSuperSearchController extends Controller { public function renderIndex($kHDkQ, $YgXoq) { goto Qwb3C; ZOiqo: if (Request::isPost()) { goto lAG4U; Wgr4p: switch ($S6sAJ) { case 'refresh': return Response::generateSuccessData(array('count' => $kHDkQ->bucketCount($X3xSB))); case 'sync': goto udk3J; uNEqh: if (0 === $vjXvz) { $kHDkQ->bucketDelete($X3xSB); $kHDkQ->bucketCreate($X3xSB, $rqlzz->fields()); } goto esFt5; esFt5: $ZrjxR = $rqlzz->syncBatch($kHDkQ, $vjXvz); goto Izhz0; ccqd1: $cwaKT['nextId'] = $ZrjxR['nextId']; goto MpF7b; MpF7b: return Response::generateSuccessData($cwaKT); goto Cx0Fk; NTE4c: $cwaKT['count'] = $ZrjxR['count']; goto ccqd1; udk3J: $vjXvz = $tBuXm->getInteger('nextId', 0); goto uNEqh; Izhz0: $cwaKT = array(); goto NTE4c; Cx0Fk: } goto W5nSL; lAG4U: $tBuXm = InputPackage::buildFromInput(); goto RaMxa; rEALN: BizException::throwsIfEmpty('Bucket错误', $rqlzz); goto Wgr4p; RaMxa: $X3xSB = $tBuXm->getTrimString('bucket'); goto HfEPs; mEBQM: $rqlzz = SuperSearchBiz::get($X3xSB); goto rEALN; HfEPs: $S6sAJ = $tBuXm->getTrimString('action'); goto mEBQM; W5nSL: } goto aFmjQ; aFmjQ: return view('module::Vendor.View.superSearch.admin.index', array('provider' => $kHDkQ, 'bizList' => $YgXoq)); goto Famg5; Fa9TM: $YgXoq = array_filter($YgXoq); goto ZOiqo; Qwb3C: $YgXoq = array_map(function ($rqlzz) { return SuperSearchBiz::get($rqlzz); }, $YgXoq); goto Fa9TM; Famg5: } }