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.

33 lines
996 B

  1. <?php
  2. namespace App\Service\v3\Implementations;
  3. use App\Service\v3\Interfaces\WithdrawalListServiceInterface;
  4. use App\Model\v3\StoreWithdrawal;
  5. class WithdrawalListService implements WithdrawalListServiceInterface
  6. {
  7. public function do()
  8. {
  9. // TODO: Implement do() method.
  10. }
  11. public function check()
  12. {
  13. // TODO: Implement check() method.
  14. }
  15. public function undo()
  16. {
  17. // TODO: Implement undo() method.
  18. }
  19. public function getListByStore($storeId, $page=1, $pagesize=10 ,$startTime = '',$endTime = '')
  20. {
  21. $builder = StoreWithdrawal::query()->where('store_id',$storeId);
  22. if(!empty($startTime) && !empty($endTime)){
  23. $builder->whereBetween('created_at',[$startTime,$endTime]);
  24. }
  25. $paginate = $builder->orderBy('created_at', 'desc')->paginate($pagesize);
  26. $orders = $paginate->toArray();
  27. return ['has_more_pages' => $paginate->hasMorePages(), 'orders' => $orders['data']];
  28. }
  29. }