From 30cc37fcdc505f52290ee8a48ddc328df62c1f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Thu, 10 Apr 2025 11:13:54 +0900 Subject: [PATCH] dbms_primeidc_init...1 --- .../Controllers/DBMS/Client/PaymentController.php | 12 +++++++----- extdbms/lib/Views/dbms/client/payment/nonpayment.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/extdbms/lib/Controllers/DBMS/Client/PaymentController.php b/extdbms/lib/Controllers/DBMS/Client/PaymentController.php index ecea63e..cc7d6ba 100644 --- a/extdbms/lib/Controllers/DBMS/Client/PaymentController.php +++ b/extdbms/lib/Controllers/DBMS/Client/PaymentController.php @@ -51,6 +51,8 @@ class PaymentController extends ClientController //mode 당일,1일전,2일전,3일전,custom $today = date("Y-m-d");; $mode = $params['mode'] ?? $this->getRequest()->get('mode') ?? 'all'; + $curPage = intval($params['curPage'] ?? $this->getRequest()->get('mode') ?? 1); + $perPage = intval($params['perPage'] ?? $this->getRequest()->get('mode') ?? VIEW_LIST_PERPAGE); switch ($mode) { case 'today': $this->getServiceService()->getModel()->where("service_payment_date = CURDATE()"); @@ -85,15 +87,15 @@ class PaymentController extends ClientController $this->getServiceService()->getModel()->whereNotIn("{$addDbTable}.client_code", $exclude_clients); $this->getServiceService()->getModel()->whereNotIn("{$addDbTable}.addDB_accountStatus", ["complete"]); $this->getServiceService()->getModel()->orderBy("service_payment_date", "DESC"); - - $this->mode = $mode; + $this->getServiceService()->getModel()->limit($perPage); + $this->getServiceService()->getModel()->offset(($curPage - 1) * $perPage); //Query문 Rest여부 -> 같은조건에 Count 받고, 결과값을 받고 싶을때는 continue() $this->getServiceService()->getModel()->setContinue(true); $this->total = $this->getServiceService()->getCount(); $this->entities = $this->getServiceService()->getEntities(); - $this->page = $parmas['curPage'] ?? 1; - $this->perPage = $parmas['perPage'] ?? VIEW_LIST_PERPAGE; - $this->pagination = new Pagination($this->total, (int)$this->page, (int)$this->perPage); + $this->curPage = $curPage; + $this->perPage = $perPage; + $this->pagination = new Pagination($this->total, (int)$curPage, (int)$this->perPage); return $this->render(path: __FUNCTION__); } } //Class diff --git a/extdbms/lib/Views/dbms/client/payment/nonpayment.php b/extdbms/lib/Views/dbms/client/payment/nonpayment.php index ceb5638..9663891 100644 --- a/extdbms/lib/Views/dbms/client/payment/nonpayment.php +++ b/extdbms/lib/Views/dbms/client/payment/nonpayment.php @@ -45,4 +45,4 @@ -
pagination->render(DBMS_SITE_URL . "/IdcDepositNonPaymentListMK.dep", ['mode' => "{$this->mode}", 'ea' => "{$this->total}"]) ?>
\ No newline at end of file +
pagination->render(DBMS_SITE_URL . "/IdcDepositNonPaymentListMK.dep", ['mode' => $this->mode, 'curPage' => $this->curPage, 'perPage' => $this->perPage]) ?>
\ No newline at end of file