From 1ac78307abb1b079c54eef72492cb2ed074c45fc 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 10:36:20 +0900 Subject: [PATCH] dbms_primeidc_init...1 --- extdbms/lib/Configs/Route.php | 1 - .../lib/Controllers/DBMS/Client/PaymentController.php | 7 +++---- extdbms/lib/Core/App.php | 2 +- extdbms/lib/Http/Http.php | 10 +--------- extdbms/lib/Http/Request.php | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/extdbms/lib/Configs/Route.php b/extdbms/lib/Configs/Route.php index a5dfed2..8562b8e 100644 --- a/extdbms/lib/Configs/Route.php +++ b/extdbms/lib/Configs/Route.php @@ -2,7 +2,6 @@ namespace lib\Configs; -use extra; use lib\Controllers\DBMS\Client\MemoController; use lib\Controllers\DBMS\Client\OnetimeController; use lib\Controllers\DBMS\Client\PaymentController; diff --git a/extdbms/lib/Controllers/DBMS/Client/PaymentController.php b/extdbms/lib/Controllers/DBMS/Client/PaymentController.php index 30711d8..aa5de89 100644 --- a/extdbms/lib/Controllers/DBMS/Client/PaymentController.php +++ b/extdbms/lib/Controllers/DBMS/Client/PaymentController.php @@ -50,9 +50,8 @@ class PaymentController extends ClientController $exclude_clients = ['C116', 'C219']; //mode 당일,1일전,2일전,3일전,custom $today = date("Y-m-d");; - echo var_dump($this->getRequest()->get()); - exit; - switch ($this->getRequest()->get('mode')) { + $mode = $params['mode'] ?? $this->getRequest()->get('mode') ?? 'all'; + switch ($mode) { case 'today': $this->getServiceService()->getModel()->where("service_payment_date = CURDATE()"); $this->message = "[{$today} 기준 당일 "; @@ -87,7 +86,7 @@ class PaymentController extends ClientController $this->getServiceService()->getModel()->whereNotIn("{$addDbTable}.addDB_accountStatus", ["complete"]); $this->getServiceService()->getModel()->orderBy("service_payment_date", "DESC"); - $this->mode = $params['mode']; + $this->mode = $mode; //Query문 Rest여부 -> 같은조건에 Count 받고, 결과값을 받고 싶을때는 continue() $this->getServiceService()->getModel()->setContinue(true); $this->total = $this->getServiceService()->getCount(); diff --git a/extdbms/lib/Core/App.php b/extdbms/lib/Core/App.php index a362f1a..666b9c9 100644 --- a/extdbms/lib/Core/App.php +++ b/extdbms/lib/Core/App.php @@ -3,7 +3,7 @@ namespace lib\Core; use lib\Core\Router; -use lib\Core\Response; +use lib\Http\Response; abstract class App { diff --git a/extdbms/lib/Http/Http.php b/extdbms/lib/Http/Http.php index 77e1ae3..cb50c20 100644 --- a/extdbms/lib/Http/Http.php +++ b/extdbms/lib/Http/Http.php @@ -6,15 +6,7 @@ class HTTP { protected array $headers = []; - public function __construct() - { - $this->headers = foreach ($_SERVER as $name => $value) { - if (str_starts_with($name, 'HTTP_')) { - $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))); - $headers[$key] = $value; - } - } - } + public function __construct() {} public function getHeaders(): array { diff --git a/extdbms/lib/Http/Request.php b/extdbms/lib/Http/Request.php index 7f45837..a4fb331 100644 --- a/extdbms/lib/Http/Request.php +++ b/extdbms/lib/Http/Request.php @@ -14,7 +14,7 @@ class Request extends HTTP $this->get = $_GET; $this->post = $_POST; - $this->data = array_merge($_GET, $_POST, json_decode(file_get_contents('php://data'), true) ?? []); + $this->data = array_merge($_GET, $_POST); } public function all(): array