src/ApiBundle/Api/Resource/Trade/Factory/BaseTrade.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace ApiBundle\Api\Resource\Trade\Factory;
use AppBundle\Common\MathToolkit;
use Biz\OrderFacade\Service\OrderFacadeService;
use Biz\System\Service\SettingService;
use Biz\User\CurrentUser;
use Codeages\Biz\Framework\Context\Biz;
use Codeages\Biz\Order\Service\OrderService;
use Codeages\Biz\Pay\Service\PayService;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
abstract class BaseTrade
{
/**
* @var ContainerInterface
*/
protected $container;
/**
* @var Biz
*/
protected $biz;
protected $payment = '';
protected $platformType = '';
public function setContainer($container)
{
$this->container = $container;
}
public function setBiz($biz)
{
$this->biz = $biz;
}
protected function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
{
return $this->container->get('router')->generate($route, $parameters, $referenceType);
}
public function renderView($view, array $parameters = array())
{
return $this->container->get('templating')->render($view, $parameters);
}
public function create($params)
{
$tradeFields = array(
'type' => $params['type'],
'goods_detail' => '',
'price_type' => 'money',
'user_id' => $params['userId'],
'create_ip' => $params['clientIp'],
'attach' => array(
'user_id' => $params['userId'],
),
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。