| @@ 316-338 (lines=23) @@ | ||
| 313 | $page_count = $this->appConfig['default_page_count']; |
|
| 314 | $session = $this->session; |
|
| 315 | ||
| 316 | if ('POST' === $request->getMethod()) { |
|
| 317 | ||
| 318 | $page_no = 1; |
|
| 319 | ||
| 320 | $searchData = array( |
|
| 321 | 'id' => $request->get('id'), |
|
| 322 | ); |
|
| 323 | ||
| 324 | if ($categoryId = $request->get('category_id')) { |
|
| 325 | $Category = $this->categoryRepository->find($categoryId); |
|
| 326 | $searchData['category_id'] = $Category; |
|
| 327 | } |
|
| 328 | ||
| 329 | $session->set('eccube.admin.order.product.search', $searchData); |
|
| 330 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
|
| 331 | } else { |
|
| 332 | $searchData = (array)$session->get('eccube.admin.order.product.search'); |
|
| 333 | if (is_null($page_no)) { |
|
| 334 | $page_no = intval($session->get('eccube.admin.order.product.search.page_no')); |
|
| 335 | } else { |
|
| 336 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
|
| 337 | } |
|
| 338 | } |
|
| 339 | // TODO OrderItemRepository に移動 |
|
| 340 | $qb = $this->orderItemRepository->createQueryBuilder('s') |
|
| 341 | ->where('s.Shipping is null AND s.Order is not null') |
|
| @@ 590-612 (lines=23) @@ | ||
| 587 | $page_count = $this->appConfig['default_page_count']; |
|
| 588 | $session = $this->session; |
|
| 589 | ||
| 590 | if ('POST' === $request->getMethod()) { |
|
| 591 | ||
| 592 | $page_no = 1; |
|
| 593 | ||
| 594 | $searchData = array( |
|
| 595 | 'id' => $request->get('id'), |
|
| 596 | ); |
|
| 597 | ||
| 598 | if ($categoryId = $request->get('category_id')) { |
|
| 599 | $Category = $this->categoryRepository->find($categoryId); |
|
| 600 | $searchData['category_id'] = $Category; |
|
| 601 | } |
|
| 602 | ||
| 603 | $session->set('eccube.admin.order.product.search', $searchData); |
|
| 604 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
|
| 605 | } else { |
|
| 606 | $searchData = (array)$session->get('eccube.admin.order.product.search'); |
|
| 607 | if (is_null($page_no)) { |
|
| 608 | $page_no = intval($session->get('eccube.admin.order.product.search.page_no')); |
|
| 609 | } else { |
|
| 610 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
|
| 611 | } |
|
| 612 | } |
|
| 613 | ||
| 614 | $qb = $this->productRepository |
|
| 615 | ->getQueryBuilderBySearchDataForAdmin($searchData); |
|