<?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($ugwYT, $xJsoK) { goto LwweI; LwweI: $xJsoK = array_map(function ($uYy4k) { return SuperSearchBiz::get($uYy4k); }, $xJsoK); goto DhJBJ; DhJBJ: if (Request::isPost()) { goto ATPfv; wQXZM: $D3Ig1 = $OPo_x->getTrimString('bucket'); goto L5yGT; ZSvOf: BizException::throwsIfEmpty('Bucket错误', $uYy4k); goto UbrXb; ATPfv: $OPo_x = InputPackage::buildFromInput(); goto wQXZM; L5yGT: $jruZn = $OPo_x->getTrimString('action'); goto u_4Ds; u_4Ds: $uYy4k = SuperSearchBiz::get($D3Ig1); goto ZSvOf; UbrXb: switch ($jruZn) { case 'refresh': return Response::generateSuccessData(array('count' => $ugwYT->bucketCount($D3Ig1))); case 'sync': goto aWDpF; J_xqK: return Response::generateSuccessData($xJzrK); goto hu8Rr; aWDpF: $uRzxH = $OPo_x->getInteger('nextId', 0); goto LbsaM; bqx5w: $xJzrK = array(); goto L2Pbo; L2Pbo: $xJzrK['count'] = $yCUD1['count']; goto REBpY; REBpY: $xJzrK['nextId'] = $yCUD1['nextId']; goto J_xqK; myEpN: $yCUD1 = $uYy4k->syncBatch($ugwYT, $uRzxH); goto bqx5w; LbsaM: if (0 === $uRzxH) { $ugwYT->bucketDelete($D3Ig1); $ugwYT->bucketCreate($D3Ig1, $uYy4k->fields()); } goto myEpN; hu8Rr: } goto AwMLo; AwMLo: } goto qdkKR; qdkKR: return view('module::Vendor.View.superSearch.admin.index', array('provider' => $ugwYT, 'bizList' => $xJsoK)); goto ujFxf; ujFxf: } }