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.
43 lines
1.2 KiB
43 lines
1.2 KiB
<?php
|
|
|
|
|
|
namespace App\Service\v3\Implementations;
|
|
use App\Service\v3\Interfaces\WithdrawalListServiceInterface;
|
|
use App\Model\v3\StoreWithdrawal;
|
|
class WithdrawalListService implements WithdrawalListServiceInterface
|
|
{
|
|
public function do()
|
|
{
|
|
// TODO: Implement do() method.
|
|
}
|
|
|
|
public function check()
|
|
{
|
|
// TODO: Implement check() method.
|
|
}
|
|
|
|
public function undo()
|
|
{
|
|
// TODO: Implement undo() method.
|
|
}
|
|
|
|
public function getListByStore($storeId, $page=1, $pagesize=10 ,$startTime = '',$endTime = '')
|
|
{
|
|
$builder = StoreWithdrawal::query()->where('store_id',$storeId);
|
|
// if(!empty($startTime) && !empty($endTime)){
|
|
// $builder->whereBetween('created_at',[$startTime,$endTime]);
|
|
// }
|
|
|
|
if (!empty($start_time)) {
|
|
$builder->where('created_at', '>=', $start_time);
|
|
}
|
|
|
|
if (!empty($end_time)) {
|
|
$builder->where('created_at', '<=', $end_time);
|
|
}
|
|
|
|
$paginate = $builder->orderBy('created_at', 'desc')->paginate($pagesize);
|
|
$orders = $paginate->toArray();
|
|
return ['has_more_pages' => $paginate->hasMorePages(), 'orders' => $orders['data']];
|
|
}
|
|
}
|