| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\controller\merchant;
- use app\extra\basic\Base;
- use app\middleware\AuthMiddleware;
- use app\model\saas\SaasStoreAccount;
- use app\service\saas\BankService;
- use DI\Attribute\Inject;
- use LinFly\Annotation\Attributes\Route\Controller;
- use LinFly\Annotation\Attributes\Route\GetMapping;
- use LinFly\Annotation\Attributes\Route\Middleware;
- use support\Request;
- use support\Response;
- /**
- * 收款帐号
- */
- #[Controller("/api/merchant/bank"),Middleware(AuthMiddleware::class)]
- class BankAccount extends Base
- {
- #[Inject]
- protected BankService $service;
- #[Inject]
- protected SaasStoreAccount $model;
- #[GetMapping('list')]
- public function getDataList(Request $request): Response
- {
- try {
- $param = $request->all();
- $param['poi_id'] = $request->user['store_id'];
- $data = $this->service->setModel()->getList($param,['store' => function($query){
- $query->field("poi_id,poi_name,poi_address,poi_city");
- }]);
- return successTrans("success.data",pageFormat($data),200);
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- }
|