| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\controller\merchant;
- use app\extra\basic\Base;
- use app\middleware\AuthMiddleware;
- use app\service\saas\ExpressService;
- 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/express"),Middleware(AuthMiddleware::class)]
- class Express extends Base
- {
- #[Inject]
- protected ExpressService $service;
- #[GetMapping('list')]
- public function getDataList(Request $request): Response
- {
- try {
- $param = $request->all();
- if ($request->user['type'] == 2) {
- $param['poi_id'] = $request->user['store_id'];
- } else {
- $param['uid'] = $request->user['id'];
- }
- $data = $this->service->setModel()->getList($param);
- return successTrans(100010,pageFormat($data),200);
- } catch (\Throwable $th) {
- return error($th->getMessage());
- }
- }
- }
|