You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Controller\v3;
  3. use App\Controller\BaseController;
  4. use Hyperf\Di\Annotation\Inject;
  5. use App\Service\v3\Interfaces\RevenueListServiceInterface;
  6. use App\Service\v3\Interfaces\WithdrawalListServiceInterface;
  7. class BalanceStatementController extends BaseController
  8. {
  9. /**
  10. * @Inject
  11. * @var RevenueListServiceInterface
  12. */
  13. protected $revenueListService;
  14. /**
  15. * @Inject
  16. * @var WithdrawalListServiceInterface
  17. */
  18. protected $withdrawalListService;
  19. public function getRevenueListByUser()
  20. {
  21. $userId = $this->request->input('user_id',0);
  22. $page = $this->request->input('page',0);
  23. $pagesize = $this->request->input('pagesize',0);
  24. $startTime = $this->request->input('start_time','');
  25. $endTime = $this->request->input('end_time','');
  26. return $this->success($this->revenueListService->getListByUser($userId, $page, $pagesize ,$startTime,$endTime));
  27. }
  28. public function getWithdrawalListByStore()
  29. {
  30. $storeId = $this->request->input('store_id',0);
  31. $page = $this->request->input('page',0);
  32. $pagesize = $this->request->input('pagesize',0);
  33. $startTime = $this->request->input('start_time','');
  34. $endTime = $this->request->input('end_time','');
  35. $res = $this->withdrawalListService->getListByStore($storeId,$page,$pagesize,$startTime,$endTime);
  36. return $this->success($res);
  37. }
  38. }