<?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($pXrNS, $ng0a9) { goto FmHjc; Velxz: return view('module::Vendor.View.superSearch.admin.index', array('provider' => $pXrNS, 'bizList' => $ng0a9)); goto e6OWD; alPcr: $ng0a9 = array_filter($ng0a9); goto MkgSz; FmHjc: $ng0a9 = array_map(function ($zPmUw) { return SuperSearchBiz::get($zPmUw); }, $ng0a9); goto alPcr; MkgSz: if (Request::isPost()) { goto eGiYK; eGiYK: $i3uTh = InputPackage::buildFromInput(); goto t8jXh; yX7Je: BizException::throwsIfEmpty('Bucket错误', $zPmUw); goto LX4k7; zcojv: $zPmUw = SuperSearchBiz::get($N3atr); goto yX7Je; LX4k7: switch ($cgUTY) { case 'refresh': return Response::generateSuccessData(array('count' => $pXrNS->bucketCount($N3atr))); case 'sync': goto wV5nI; wV5nI: $rUEvo = $i3uTh->getInteger('nextId', 0); goto zN4hU; d9PKU: $GpXwG = array(); goto BmImq; eAHYt: $GpXwG['nextId'] = $gMg9x['nextId']; goto MhNNX; zN4hU: if (0 === $rUEvo) { $pXrNS->bucketDelete($N3atr); $pXrNS->bucketCreate($N3atr, $zPmUw->fields()); } goto cNGs3; BmImq: $GpXwG['count'] = $gMg9x['count']; goto eAHYt; cNGs3: $gMg9x = $zPmUw->syncBatch($pXrNS, $rUEvo); goto d9PKU; MhNNX: return Response::generateSuccessData($GpXwG); goto D8Dk5; D8Dk5: } goto m2Ndw; cjgoo: $cgUTY = $i3uTh->getTrimString('action'); goto zcojv; t8jXh: $N3atr = $i3uTh->getTrimString('bucket'); goto cjgoo; m2Ndw: } goto Velxz; e6OWD: } }