diff --git a/app/Constants/v3/Withdrawal.php b/app/Constants/v3/Withdrawal.php new file mode 100644 index 0000000..53da40e --- /dev/null +++ b/app/Constants/v3/Withdrawal.php @@ -0,0 +1,28 @@ +request->all(); - return $this->success($this->revenueListService->check(46)); + return $this->success($this->revenueListService->getListByUser(46)); + } + + public function getWithdrawalListByStore() + { + $params = $this->request->all(); + return $this->success($this->withdrawalListService->getListByStore(7)); } } \ No newline at end of file diff --git a/app/Model/v3/StoreWithdrawal.php b/app/Model/v3/StoreWithdrawal.php new file mode 100644 index 0000000..72d1654 --- /dev/null +++ b/app/Model/v3/StoreWithdrawal.php @@ -0,0 +1,19 @@ +attributes['state']); + } +} \ No newline at end of file diff --git a/app/Service/v3/Implementations/RevenueListService.php b/app/Service/v3/Implementations/RevenueListService.php index aefe342..563f8dc 100644 --- a/app/Service/v3/Implementations/RevenueListService.php +++ b/app/Service/v3/Implementations/RevenueListService.php @@ -15,14 +15,19 @@ class RevenueListService implements RevenueListServiceInterface public function check($userId) { - $financialRecord = new FinancialRecord(); - $mod = bcmod((string)$userId, '5', 0); - $financialRecord->suffix($mod); - return $financialRecord::query()->get(); + } public function undo() { // TODO: Implement undo() method. } + + public function getListByUser($userId) + { + $financialRecord = new FinancialRecord(); + $mod = bcmod((string)$userId, '5', 0); + $financialRecord->suffix($mod); + return $financialRecord::query()->get(); + } } \ No newline at end of file diff --git a/app/Service/v3/Implementations/WithdrawalListService.php b/app/Service/v3/Implementations/WithdrawalListService.php new file mode 100644 index 0000000..5dd2d1a --- /dev/null +++ b/app/Service/v3/Implementations/WithdrawalListService.php @@ -0,0 +1,29 @@ +where('store_id',$storeId)->get(); + return $res; + } +} \ No newline at end of file diff --git a/app/Service/v3/Interfaces/RevenueListServiceInterface.php b/app/Service/v3/Interfaces/RevenueListServiceInterface.php index 0dfc696..e3b3132 100644 --- a/app/Service/v3/Interfaces/RevenueListServiceInterface.php +++ b/app/Service/v3/Interfaces/RevenueListServiceInterface.php @@ -11,4 +11,6 @@ interface RevenueListServiceInterface public function check($userId); public function undo(); + + public function getListByUser($userId); } \ No newline at end of file diff --git a/app/Service/v3/Interfaces/WithdrawalListServiceInterface.php b/app/Service/v3/Interfaces/WithdrawalListServiceInterface.php new file mode 100644 index 0000000..9b68af4 --- /dev/null +++ b/app/Service/v3/Interfaces/WithdrawalListServiceInterface.php @@ -0,0 +1,13 @@ + \App\Service\v3\Implementations\GoodsActivityService::class, \App\Service\v3\Interfaces\DeliveryMoneyServiceInterface::class => \App\Service\v3\Implementations\DeliveryMoneyService::class, \App\Service\v3\Interfaces\RevenueListServiceInterface::class => \App\Service\v3\Implementations\RevenueListService::class, + \App\Service\v3\Interfaces\WithdrawalListServiceInterface::class => \App\Service\v3\Implementations\WithdrawalListService::class, ]; diff --git a/config/routes.php b/config/routes.php index e3418b5..c853a65 100644 --- a/config/routes.php +++ b/config/routes.php @@ -115,4 +115,5 @@ Router::addGroup('/v3/', function () { Router::post('collectStore/getListByUser', 'App\Controller\v3\CollectStoreController@getListByUser'); Router::post('balanceStatement/getRevenueListByUser', 'App\Controller\v3\BalanceStatementController@getRevenueListByUser'); Router::post('orderOnline/add', 'App\Controller\v3\OrderOnlineController@add'); + Router::post('store/storeWithdrawalList', 'App\Controller\v3\BalanceStatementController@getWithdrawalListByStore'); },['middleware' => [\App\Middleware\Auth\ApiMiddleware::class, \App\Middleware\Auth\UserMiddleware::class]]); \ No newline at end of file