src/AppBundle/Controller/My/OrderRefundController.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Controller\My;
use AppBundle\Common\ArrayToolkit;
use AppBundle\Common\Paginator;
use AppBundle\Controller\BaseController;
use Biz\Order\OrderException;
use Biz\User\UserException;
use Codeages\Biz\Order\Service\OrderRefundService;
use Biz\OrderFacade\Service\OrderRefundService as LocalOrderRefundService;
use Codeages\Biz\Order\Service\OrderService;
use Symfony\Component\HttpFoundation\Request;
class OrderRefundController extends BaseController
{
public function indexAction(Request $request)
{
$user = $this->getCurrentUser();
$keyWord = $request->query->get('q');
$conditions = array(
'user_id' => $user['id'],
);
if (!empty($keyWord)) {
$conditions['titleLike'] = $keyWord;
}
$paginator = new Paginator(
$request,
$this->getOrderRefundService()->countRefunds($conditions),
20
);
$orderRefunds = $this->getOrderRefundService()->searchRefunds(
$conditions,
array('created_time' => 'DESC'),
$paginator->getOffsetCount(),
$paginator->getPerPageCount()
);
$orderIds = ArrayToolkit::column($orderRefunds, 'order_id');
$orders = ArrayToolkit::index($this->getOrderService()->findOrdersByIds($orderIds), 'id');
return $this->render('my-order/order-refund/index.html.twig', array(
'paginator' => $paginator,
'orders' => $orders,
'orderRefunds' => $orderRefunds,
));
}
public function detailAction(Request $request, $id)
{
$user = $this->getCurrentUser();
$orderRefund = $this->getOrderRefundService()->getOrderRefundById($id);
if ($user->getId() != $orderRefund['user_id']) {
$this->createNewException(UserException::PERMISSION_DENIED());
}
$order = $this->getOrderService()->getOrder($orderRefund['order_id']);
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。