<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Faka\Api\Controller; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Cookie; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Input\Response; use Module\Faka\Type\ProductOrderStatus; class ProductOrderController extends Controller { public function getByUid() { goto GfuN1; h_vxD: $ysQ9d = Cookie::get('uid'); goto yzG6s; GfuN1: $MDFmY = array(); goto h_vxD; yzG6s: if ($ysQ9d) { goto I8nZV; BXpXU: if (!empty($Z_IHc)) { $MDFmY = ModelUtil::model('faka_product_stock')->whereIn('orderId', $Z_IHc)->orderBy('id', 'desc')->limit(1)->get()->toArray(); } goto GFu35; I8nZV: $zfSgN = ModelUtil::model('faka_product_order')->where('uid', $ysQ9d)->where('status', ProductOrderStatus::PAYED)->orderBy('id', 'desc')->limit(1)->get()->toArray(); goto jASqQ; jASqQ: $Z_IHc = array_map(function ($vPOhn) { return $vPOhn['id']; }, $zfSgN); goto BXpXU; GFu35: } goto cYK8G; cYK8G: return Response::generateSuccessData(array('uid' => $ysQ9d, 'stocks' => $MDFmY)); goto ak9dp; ak9dp: } }