get(); if (empty($param['shop'])) { $param['shop'] = $request->user['agent_id']; } if (empty($param['status'])) $param['statusGt'] = 1; $list = $this->service->getList($param); return successTrans("success.data",pageFormat($list),200); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } /** * 返回统计结果 * @param Request $request * @return Response */ #[Route(path: "total",methods: "get")] public function getTotalData(Request $request): Response { try { $param = $request->get(); if (empty($param['shop'])) { $param['shop'] = $request->user['agent_id']; } $total = $this->service->getTotal($param); return successTrans("success.data",compact("total")); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } }