<?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($O9Vtg, $D6ZSW) { goto C3xZM; C3xZM: $D6ZSW = array_map(function ($i9_MK) { return SuperSearchBiz::get($i9_MK); }, $D6ZSW); goto vz3bH; MSJHe: if (Request::isPost()) { goto ORgEN; L5KK7: switch ($uNY85) { case 'refresh': return Response::generateSuccessData(array('count' => $O9Vtg->bucketCount($uOeYb))); case 'sync': goto E4Nos; E4Nos: $JcA1a = $Nw6ws->getInteger('nextId', 0); goto Txliz; I6xo_: $Pg57y = array(); goto ty7dW; PnZkS: $Pg57y['nextId'] = $Ecj99['nextId']; goto mPG3d; Txliz: if (0 === $JcA1a) { $O9Vtg->bucketDelete($uOeYb); $O9Vtg->bucketCreate($uOeYb, $i9_MK->fields()); } goto x9AFm; mPG3d: return Response::generateSuccessData($Pg57y); goto pylqb; ty7dW: $Pg57y['count'] = $Ecj99['count']; goto PnZkS; x9AFm: $Ecj99 = $i9_MK->syncBatch($O9Vtg, $JcA1a); goto I6xo_; pylqb: } goto v2Fny; ORgEN: $Nw6ws = InputPackage::buildFromInput(); goto phZfj; BwYZ8: $uNY85 = $Nw6ws->getTrimString('action'); goto Oxqvv; phZfj: $uOeYb = $Nw6ws->getTrimString('bucket'); goto BwYZ8; rLNZ1: BizException::throwsIfEmpty('Bucket错误', $i9_MK); goto L5KK7; Oxqvv: $i9_MK = SuperSearchBiz::get($uOeYb); goto rLNZ1; v2Fny: } goto rRsIm; vz3bH: $D6ZSW = array_filter($D6ZSW); goto MSJHe; rRsIm: return view('module::Vendor.View.superSearch.admin.index', array('provider' => $O9Vtg, 'bizList' => $D6ZSW)); goto HcUcG; HcUcG: } }