diff --git a/app/controller/admin/InvoiceFinalReport.php b/app/controller/admin/InvoiceFinalReport.php index 9db09dc..b905596 100644 --- a/app/controller/admin/InvoiceFinalReport.php +++ b/app/controller/admin/InvoiceFinalReport.php @@ -47,9 +47,14 @@ class InvoiceFinalReport extends Base if (empty($frd_id)) { throw new \Exception('缺少请求参数'); } + $limit = $this->request->get('size', config('apiadmin.ADMIN_LIST_DEFAULT')); + $start = $this->request->get('page', 1); $FinalReportData = new FinalReportData(); - $data = $FinalReportData->where('frd_id', $frd_id)->select()->toArray(); - return $this->buildSuccess($data); + $data = $FinalReportData->where('frd_id', $frd_id)->paginate(['page' => $start, 'list_rows' => $limit])->toArray(); + return $this->buildSuccess([ + 'list' => $data['data'], + 'total' => $data['total'] + ]); } catch (\Exception $e) { return $this->buildFailed(ReturnCode::EMPTY_PARAMS, $e->getMessage()); }