<?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($sefXk, $O_8Eu) { goto UBhsy; UBhsy: $O_8Eu = array_map(function ($Dnlri) { return SuperSearchBiz::get($Dnlri); }, $O_8Eu); goto knRVv; PsbWb: return view('module::Vendor.View.superSearch.admin.index', array('provider' => $sefXk, 'bizList' => $O_8Eu)); goto njRkw; knRVv: $O_8Eu = array_filter($O_8Eu); goto dZlu4; dZlu4: if (Request::isPost()) { goto F4Xfm; F4Xfm: $Ylazq = InputPackage::buildFromInput(); goto U8pxr; eLioG: $OL4ef = $Ylazq->getTrimString('action'); goto MhSaq; fFFOk: switch ($OL4ef) { case 'refresh': return Response::generateSuccessData(array('count' => $sefXk->bucketCount($RdiuE))); case 'sync': goto UbPUQ; LEdsr: $smBDO['nextId'] = $Gs3Xd['nextId']; goto dV77j; LK8om: $smBDO = array(); goto raM9_; UbPUQ: $jB5K7 = $Ylazq->getInteger('nextId', 0); goto LMfQ8; tbSI6: $Gs3Xd = $Dnlri->syncBatch($sefXk, $jB5K7); goto LK8om; raM9_: $smBDO['count'] = $Gs3Xd['count']; goto LEdsr; LMfQ8: if (0 === $jB5K7) { $sefXk->bucketDelete($RdiuE); $sefXk->bucketCreate($RdiuE, $Dnlri->fields()); } goto tbSI6; dV77j: return Response::generateSuccessData($smBDO); goto bQSzH; bQSzH: } goto ZQ3rr; BeIws: BizException::throwsIfEmpty('Bucket错误', $Dnlri); goto fFFOk; MhSaq: $Dnlri = SuperSearchBiz::get($RdiuE); goto BeIws; U8pxr: $RdiuE = $Ylazq->getTrimString('bucket'); goto eLioG; ZQ3rr: } goto PsbWb; njRkw: } }