From 7d8e3c10a6a2892942a3cb7c1ff7145550d87bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Thu, 13 Mar 2025 15:58:43 +0900 Subject: [PATCH] cfmgrv4 init...10 --- app/Controllers/Admin/AdminController.php | 50 +++++--------- .../Admin/Cloudflare/CloudflareController.php | 67 +------------------ 2 files changed, 17 insertions(+), 100 deletions(-) diff --git a/app/Controllers/Admin/AdminController.php b/app/Controllers/Admin/AdminController.php index 43330ac..b4f6728 100644 --- a/app/Controllers/Admin/AdminController.php +++ b/app/Controllers/Admin/AdminController.php @@ -20,88 +20,70 @@ abstract class AdminController extends CommonController $this->view_path = "admin/"; } - + //생성 protected function create_process_result($message): RedirectResponse|string { - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, $message, $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); return parent::create_process_result($message); - // $this->init(__FUNCTION__); - // helper(['form']); - // $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; - // return view( - // strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"), - // data: ['viewDatas' => $this->getViewDatas()] - // ); } protected function create_process_failed($message): RedirectResponse|string { - MyLogService::add("error", $message); - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, MESSAGES["FAILED"], $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message); return parent::create_process_failed($message); } - - //수정관련 + //수정 protected function modify_process_result($message): RedirectResponse|string { - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, $message, $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); return parent::modify_process_result($message); } protected function modify_process_failed($message): RedirectResponse|string { - MyLogService::add("error", $message); - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, MESSAGES["FAILED"], $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message); return parent::modify_process_failed($message); } - //단일필드작업 protected function toggle_process_result($message): RedirectResponse|string { - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, $message, $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); return parent::toggle_process_result($message); } protected function toggle_process_failed($message): RedirectResponse|string { - MyLogService::add("error", $message); - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, MESSAGES["FAILED"], $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message); return parent::toggle_process_failed($message); } - //일괄처리작업 protected function batchjob_process_result($message): RedirectResponse|string { - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, $message, $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); return parent::batchjob_process_result($message); } protected function batchjob_process_failed($message): RedirectResponse|string { - MyLogService::add("error", $message); - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, MESSAGES["FAILED"], $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message); return parent::batchjob_process_failed($message); } - - //Delete관련 + //삭제 delete,batchjob_delete 공통사용 protected function delete_process_result($message): RedirectResponse|string { - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, $message, $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); return parent::delete_process_result($message); } protected function delete_process_failed($message): RedirectResponse|string { - MyLogService::add("error", $message); - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, MESSAGES["FAILED"], $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message); return parent::delete_process_failed($message); } - - //일괄삭제관련 + //일괄삭제 protected function batchjob_delete_process_result($message): RedirectResponse|string { - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, $message, $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); return parent::batchjob_delete_process_result($message); } protected function batchjob_delete_process_failed($message): RedirectResponse|string { - MyLogService::add("error", $message); - MyLogService::save($this->getService()->getClassName(), __FUNCTION__, MESSAGES["FAILED"], $this->myauth->getUIDByAuthInfo()); + MyLogService::save($this->getService(), $this->myauth, $message); return parent::batchjob_delete_process_failed($message); } } diff --git a/app/Controllers/Admin/Cloudflare/CloudflareController.php b/app/Controllers/Admin/Cloudflare/CloudflareController.php index c20cd79..50b8d79 100644 --- a/app/Controllers/Admin/Cloudflare/CloudflareController.php +++ b/app/Controllers/Admin/Cloudflare/CloudflareController.php @@ -54,72 +54,7 @@ abstract class CloudflareController extends AdminController } return $this->_recordModel; } - //생성 - protected function create_process_result($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); - return parent::create_process_result($message); - } - protected function create_process_failed($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message); - return parent::create_process_failed($message); - } - //수정 - protected function modify_process_result($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); - return parent::modify_process_result($message); - } - protected function modify_process_failed($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message); - return parent::modify_process_failed($message); - } - //단일필드작업 - protected function toggle_process_result($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); - return parent::toggle_process_result($message); - } - protected function toggle_process_failed($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message); - return parent::toggle_process_failed($message); - } - //일괄처리작업 - protected function batchjob_process_result($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); - return parent::batchjob_process_result($message); - } - protected function batchjob_process_failed($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message); - return parent::batchjob_process_failed($message); - } - //삭제 delete,batchjob_delete 공통사용 - protected function delete_process_result($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); - return parent::delete_process_result($message); - } - protected function delete_process_failed($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message); - return parent::delete_process_failed($message); - } - //일괄삭제 - protected function batchjob_delete_process_result($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message, DEFAULTS['STATUS']); - return parent::batchjob_delete_process_result($message); - } - protected function batchjob_delete_process_failed($message): RedirectResponse|string - { - MyLogService::save($this->getService(), $this->myauth, $message); - return parent::batchjob_delete_process_failed($message); - } + //Sync관련 protected function sync_process_result($message): RedirectResponse|string {