Browse Source

结报管理接口优化3

master
wanghongjun 11 months ago
parent
commit
4d0168d10b
  1. 9
      app/controller/admin/InvoiceFinalReport.php

9
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());
}

Loading…
Cancel
Save