diff --git a/app/Cells/Equipment/ServerCell.php b/app/Cells/Equipment/ServerCell.php index 6809b66..c68ef77 100644 --- a/app/Cells/Equipment/ServerCell.php +++ b/app/Cells/Equipment/ServerCell.php @@ -61,7 +61,7 @@ class ServerCell extends EquipmentCell { $this->getService()->action_init_process(__FUNCTION__); if (!array_key_exists('serviceEntity', $params)) { - return __METHOD__ . "에서 오류발생: 서비스 정보가 정의되지 않았습니다."; + return static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스 정보가 정의되지 않았습니다."; } $serviceEntity = $params['serviceEntity']; $entities = $this->getService()->getEntities(['serviceinfo_uid' => $params['serviceEntity']->getPK()]); diff --git a/app/Controllers/AbstractCRUDController.php b/app/Controllers/AbstractCRUDController.php index 3a5e37c..a766531 100644 --- a/app/Controllers/AbstractCRUDController.php +++ b/app/Controllers/AbstractCRUDController.php @@ -64,7 +64,7 @@ abstract class AbstractCRUDController extends AbstractWebController // 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사 $entityClass = $this->service->getEntityClass(); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); } return $this->create_result_process($entity); } catch (\Throwable $e) { @@ -87,7 +87,7 @@ abstract class AbstractCRUDController extends AbstractWebController { try { if (!$uid) { - throw new \Exception("{$this->getTitle()}에 번호가 정의 되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()}에 번호가 정의 되지 않았습니다."); } $entity = $this->modify_form_process($uid); $this->addViewDatas('entity', $entity); @@ -118,7 +118,7 @@ abstract class AbstractCRUDController extends AbstractWebController { try { if (!$uid) { - throw new \Exception("{$this->getTitle()}에 번호가 정의 되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()}에 번호가 정의 되지 않았습니다."); } $action = __FUNCTION__; $this->action_init_process($action); @@ -143,7 +143,7 @@ abstract class AbstractCRUDController extends AbstractWebController { try { if (!$uid) { - throw new \Exception("{$this->getTitle()}에 번호가 정의 되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()}에 번호가 정의 되지 않았습니다."); } $entity = $this->service->getEntity($uid); //Delete처리 @@ -167,7 +167,7 @@ abstract class AbstractCRUDController extends AbstractWebController { try { if (!$uid) { - throw new \Exception("{$this->getTitle()}에 번호가 정의 되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()}에 번호가 정의 되지 않았습니다."); } //View처리 $entity = $this->view_process($uid); diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php index d17f56f..8a06b82 100644 --- a/app/Controllers/Admin/Customer/ClientController.php +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -7,6 +7,7 @@ use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; +use RuntimeException; class ClientController extends CustomerController { @@ -31,7 +32,7 @@ class ClientController extends CustomerController //일괄작업용 Fields정의 $entity = $this->service->getEntity($uid); if (!$entity instanceof ClientEntity) { - throw new \Exception("{$uid}에 해당하는 고객정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$uid}에 해당하는 고객정보를 찾을수 없습니다."); } $this->addViewDatas('totalCounts', service('equipment_serverservice')->getTotalServiceCount(['serviceinfo.clientinfo_uid' => $entity->getPK()])); $this->addViewDatas('totalAmounts', service('customer_serviceservice')->getTotalAmounts([ diff --git a/app/Controllers/Admin/Customer/ServiceController.php b/app/Controllers/Admin/Customer/ServiceController.php index 8bacf95..4c1dafe 100644 --- a/app/Controllers/Admin/Customer/ServiceController.php +++ b/app/Controllers/Admin/Customer/ServiceController.php @@ -7,6 +7,7 @@ use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; +use RuntimeException; class ServiceController extends CustomerController { @@ -96,7 +97,7 @@ class ServiceController extends CustomerController //서버 타이틀을 서비스 타이틀로 변경하기 위함 $serverEntity = service('equipment_serverservice')->getEntity($formDatas['serverinfo_uid']); if (!$serverEntity instanceof ServerEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생: 해당하는 서버정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 해당하는 서버정보을 찾을수 없습니다."); } $formDatas['title'] = $serverEntity->getCustomTitle(); //대체서버를 메인서버로 설정 diff --git a/app/Controllers/Admin/Equipment/ServerPartController.php b/app/Controllers/Admin/Equipment/ServerPartController.php index 3b279ac..7b35d36 100644 --- a/app/Controllers/Admin/Equipment/ServerPartController.php +++ b/app/Controllers/Admin/Equipment/ServerPartController.php @@ -5,6 +5,7 @@ namespace App\Controllers\Admin\Equipment; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; +use RuntimeException; class ServerPartController extends EquipmentController { @@ -22,8 +23,8 @@ class ServerPartController extends EquipmentController { // Form Default값 설정 (오버라이드 포인트) $formDatas = parent::create_form_process($formDatas); - $formDatas['serverinfo_uid'] = $this->request->getVar('serverinfo_uid') ?? throw new \Exception("ServerPart는 반드시 서버정보가 필요합니다."); - $formDatas['type'] = $this->request->getVar('type') ?? throw new \Exception("ServerPart는 반드시 파트형식 필요합니다."); + $formDatas['serverinfo_uid'] = $this->request->getVar('serverinfo_uid') ?? throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 ServerPart는 반드시 서버정보가 필요합니다."); + $formDatas['type'] = $this->request->getVar('type') ?? throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 ServerPart는 반드시 파트형식 필요합니다."); $formDatas['cnt'] = 1; //type : CS,IP이면 월비용 기본처리 switch ($formDatas['type']) { diff --git a/app/Controllers/Admin/PaymentController.php b/app/Controllers/Admin/PaymentController.php index 37c8ba5..7579202 100644 --- a/app/Controllers/Admin/PaymentController.php +++ b/app/Controllers/Admin/PaymentController.php @@ -9,6 +9,7 @@ use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; +use RuntimeException; class PaymentController extends AdminController { @@ -39,7 +40,7 @@ class PaymentController extends AdminController $postDatas = $this->request->getPost(); $uids = $postDatas['batchjob_uids'] ?? []; if (empty($uids)) { - throw new \Exception("청구서에 적용될 리스트를 선택하셔야합니다"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 청구서에 적용될 리스트를 선택하셔야합니다"); } return $uids; } @@ -61,7 +62,7 @@ class PaymentController extends AdminController //기존 Entity 가져오기 $entity = $this->service->getEntity($uid); if (!$entity instanceof PaymentEntity) { - throw new \Exception(__METHOD__ . "에서 {$uid}에 대한 결제정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$uid}에 대한 결제정보를 찾을수 없습니다."); } //지급기한일이 오늘보다 작거나 같고 미지급인경우 if ($entity->getBillingAt() <= date("Y-m-d") && $entity->getStatus() === STATUS['UNPAID']) { @@ -71,7 +72,7 @@ class PaymentController extends AdminController } else { $clientEntity = service('customer_clientservice')->getEntity($entity->getClientInfoUID()); if (!$clientEntity instanceof ClientEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생:{$entity->getClientInfoUID()}에 대한 고객정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:{$entity->getClientInfoUID()}에 대한 고객정보를 찾을수 없습니다."); } $clientEntities[$entity->getClientInfoUID()] = $clientEntity; } @@ -81,7 +82,7 @@ class PaymentController extends AdminController } else { $serviceEntity = service('customer_serviceservice')->getEntity($entity->getServiceInfoUid()); if (!$serviceEntity instanceof ServiceEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생:{$entity->getServiceInfoUid()}에 대한 서비스정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:{$entity->getServiceInfoUid()}에 대한 서비스정보를 찾을수 없습니다."); } $serviceEntities[$entity->getServiceInfoUid()] = $serviceEntity; } @@ -100,12 +101,9 @@ class PaymentController extends AdminController { try { $entity = $this->service->paid($uid); - $action = __FUNCTION__; - //FormService에서 필요한 기존 데이터를 $entity에서 추출해서 넘김 - $this->action_init_process($action, $entity->toArray()); - return $this->modify_form_result_process($action); + return $this->action_redirect_process('info', "{$this->getTitle()}에서 {$entity->getTitle()} 결체처리가 완료되었습니다."); } catch (\Throwable $e) { - return $this->action_redirect_process('error', "{$this->getTitle()}에서 수정폼 오류:" . $e->getMessage()); + return $this->action_redirect_process('error', "{$this->getTitle()}에서 결제 오류:" . $e->getMessage()); } } } diff --git a/app/Controllers/Admin/SearchController.php b/app/Controllers/Admin/SearchController.php index b3cab2d..376cc2b 100644 --- a/app/Controllers/Admin/SearchController.php +++ b/app/Controllers/Admin/SearchController.php @@ -6,6 +6,7 @@ use App\Entities\Customer\ServiceEntity; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; +use RuntimeException; class SearchController extends AdminController { @@ -24,7 +25,7 @@ class SearchController extends AdminController { $keyword = $this->request->getGet('keyword'); // 검색어 if (!$keyword) { - throw new \Exception("[{$keyword}] 검색어가 지정되지 않았습니다. "); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 [{$keyword}] 검색어가 지정되지 않았습니다. "); } //검색어에 따른 서버정보를 검색 후 해당하는 서비스리스트를 가져온다. $rows = service('equipment_serverservice')->getSearchServices($keyword); diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index e4af2d8..dfa5178 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -7,6 +7,7 @@ use CodeIgniter\HTTP\RedirectResponse; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Reader\Html; use PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf; +use RuntimeException; /** * CommonController @@ -22,13 +23,13 @@ abstract class CommonController extends AbstractCRUDController // 1. postDatas에서 선택된 uids 정보 추출 $uids = $postDatas['batchjob_uids'] ?? []; if (empty($uids)) { - throw new \Exception("적용할 리스트을 선택하셔야합니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 적용할 리스트을 선택하셔야합니다."); } // 2. 변경할 데이터 추출 및 정리 unset($postDatas['batchjob_uids'], $postDatas['batchjob_submit']); //formDatas에 포함되지 않게하기위함 $formDatas = array_filter($postDatas, fn($value) => $value !== "" && $value !== null); if (empty($formDatas)) { - throw new \Exception("변경할 조건항목을 선택하셔야합니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 변경할 조건항목을 선택하셔야합니다."); } // 3. 데이터가 있는 필드 추출 $selectedFields = array_keys($formDatas); @@ -73,7 +74,7 @@ abstract class CommonController extends AbstractCRUDController $postDatas = $this->request->getPost(); $uids = $postDatas['batchjob_uids'] ?? []; if (empty($uids)) { - throw new \Exception("삭제할 리스트을 선택하셔야합니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 삭제할 리스트을 선택하셔야합니다."); } return $uids; } @@ -244,7 +245,7 @@ abstract class CommonController extends AbstractCRUDController $writer->save($full_path . DIRECTORY_SEPARATOR . $file_name); break; default: - throw new \Exception("지원하지 않는 다운로드 타입입니다: {$document_type}"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 지원하지 않는 다운로드 타입입니다: {$document_type}"); } return array($full_path, $file_name); } @@ -273,11 +274,11 @@ abstract class CommonController extends AbstractCRUDController default: // 개별 파일 다운로드 로직 if (!$uid) { - throw new \Exception("{$output_type}은 반드시 uid의 값이 필요합니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$output_type}은 반드시 uid의 값이 필요합니다."); } $entity = $this->service->getEntity($uid); if (!$entity) { - throw new \Exception("{$uid}에 대한 정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$uid}에 대한 정보를 찾을수 없습니다."); } $this->addViewDatas('entity', $entity); list($file_name, $uploaded_filename) = $entity->getDownlaodFile(); diff --git a/app/Database/dbmsv4_init.sql b/app/Database/dbmsv4_init.sql index 87fb6fb..0880387 100644 --- a/app/Database/dbmsv4_init.sql +++ b/app/Database/dbmsv4_init.sql @@ -450,7 +450,7 @@ CREATE TABLE `payment` ( LOCK TABLES `payment` WRITE; /*!40000 ALTER TABLE `payment` DISABLE KEYS */; -INSERT INTO `payment` VALUES (17,1,820,52,NULL,'[[2548E-M68]13.220.20.6] 2025년 9월 서비스비용',NULL,500000,'month','2025-09-25',NULL,'unpaid','2025-10-29 00:58:09','2025-09-25 06:29:25',NULL),(18,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-11-14',NULL,'unpaid','2025-10-16 00:58:10','2025-09-25 06:31:18',NULL),(19,1,820,52,NULL,'2G',NULL,40000,'onetime','2025-09-25',NULL,'unpaid','2025-09-25 08:27:17','2025-09-25 08:15:08',NULL),(20,1,1087,54,NULL,'gdidc_s68d4ff1b03fab',NULL,1800000,'month','2025-09-25',NULL,'unpaid','2025-10-16 00:58:28','2025-09-25 08:36:43',NULL),(21,1,820,52,NULL,'16G',NULL,300000,'onetime','2025-09-26',NULL,'unpaid',NULL,'2025-09-26 07:03:50',NULL),(22,1,820,52,NULL,'NVME 512G',NULL,120000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 00:56:19',NULL),(23,1,820,52,NULL,'NVME 512G',NULL,240000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 01:02:43',NULL),(24,1,820,52,NULL,'NVME 1T',NULL,150000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 01:50:08',NULL),(28,1,820,52,NULL,'SSD 256G',NULL,160000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 05:35:30',NULL),(29,1,820,56,NULL,'[[2530Z-M22]HITACH HA3000] 2025년 10월 서비스비용',NULL,1550000,'month','2025-10-01',NULL,'unpaid','2025-10-31 03:36:49','2025-10-01 00:08:02',NULL),(32,1,819,57,NULL,'[[JPN-S23]DESKTOP I5] 2025년 10월 서비스비용',NULL,650000,'month','2025-10-01',NULL,'unpaid','2025-10-31 03:36:20','2025-10-01 08:19:25',NULL),(33,1,820,52,NULL,'NVME 2T',NULL,180000,'onetime','2025-10-02',NULL,'unpaid',NULL,'2025-10-02 00:07:28',NULL),(34,1,711,58,NULL,'prime_s68ddf9a191864',NULL,1100000,'month','2025-10-02',NULL,'unpaid','2025-10-16 01:48:27','2025-10-02 04:03:45',NULL),(35,1,1185,59,NULL,'itsolution_s68e30467',NULL,900000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:30','2025-10-05 23:51:03',NULL),(36,45,1185,59,NULL,'서버비',NULL,600000,'month','2025-11-06',NULL,'paid','2025-10-05 23:54:41','2025-10-05 23:53:43',NULL),(37,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-11-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:03',NULL),(38,45,1185,59,NULL,'도메인','도메인 구매',40000,'onetime','2025-10-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:59',NULL),(39,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-10-06','account','paid','2025-10-06 00:51:24','2025-10-06 00:48:36',NULL),(40,45,1185,59,NULL,'도메인',NULL,1000000,'onetime','2025-10-06','account','paid','2025-10-06 01:02:46','2025-10-06 00:54:59',NULL),(41,1,1186,60,NULL,'prime_s68e37906ad1bd',NULL,1100000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:52','2025-10-06 08:08:38',NULL),(42,1,1186,61,NULL,'prime_s68e37b9e918a2',NULL,1300000,'month','2025-10-06','account','unpaid','2025-10-16 01:54:10','2025-10-06 08:19:42',NULL),(43,11,1186,60,NULL,'SSD 2T',NULL,600000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:25:57',NULL),(44,11,1186,60,NULL,'SSD 1T',NULL,400000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:31:15',NULL),(45,11,1186,61,NULL,'8G',NULL,50000,'onetime','2025-10-06','account','paid','2025-10-06 08:38:35','2025-10-06 08:34:46',NULL),(46,1,1186,61,NULL,'test.co.kr 도메인','test.co.kr 도메인',50000,'onetime','2025-10-14',NULL,'unpaid',NULL,'2025-10-14 02:24:26',NULL),(50,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-10-14',NULL,'unpaid',NULL,'2025-10-14 08:28:35',NULL),(51,1,819,57,NULL,'테스트','테스트\r\n테스트\r\n테스트\r\n테스트',100000,'onetime','2025-10-15',NULL,'unpaid',NULL,'2025-10-15 03:35:39',NULL),(52,1,842,62,NULL,'prime_s68ef4901c563f',NULL,800000,'month','2025-10-15',NULL,'unpaid','2025-10-16 07:52:10','2025-10-15 07:10:57',NULL),(53,1,842,63,NULL,'itsolution_s68ef4cbd',NULL,400000,'month','2025-10-15',NULL,'unpaid','2025-10-16 01:54:36','2025-10-15 07:26:53',NULL),(54,1,820,56,NULL,'fffff','ffdgdfgdf',430000,'onetime','2025-10-15',NULL,'unpaid',NULL,'2025-10-15 07:33:28',NULL),(55,1,1155,64,NULL,'[2543E-M32/13.220.20.25] 2025년 10월 서비스비용',NULL,900000,'month','2025-10-22',NULL,'unpaid','2025-10-21 00:15:04','2025-10-17 06:22:15',NULL),(56,11,1186,60,NULL,'도메인 구매','<p>test.com</p>',40000,'onetime','2025-10-21',NULL,'unpaid',NULL,'2025-10-21 05:19:26',NULL),(57,11,1186,60,NULL,'a.com','<p>도메인 구매</p>',40000,'onetime','2025-10-21','account','paid','2025-10-31 06:01:08','2025-10-21 05:20:08',NULL),(58,1,820,66,NULL,'[2549E-M65/13.220.20.4] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-22',NULL,'unpaid','2025-10-22 09:50:41','2025-10-22 09:27:56',NULL),(59,1,820,66,NULL,'8G',NULL,80000,'onetime','2025-10-22',NULL,'unpaid',NULL,'2025-10-22 09:45:01',NULL),(60,1,820,71,NULL,'[2548D-M67/13.220.20.15] 2025년 10월 서비스비용',NULL,400000,'month','2025-10-25',NULL,'unpaid',NULL,'2025-10-23 05:01:53',NULL),(61,1,820,74,NULL,'[] 2025년 10월 서비스비용',NULL,1100000,'month','2025-10-23',NULL,'unpaid','2025-10-28 08:01:13','2025-10-23 05:06:15',NULL),(64,1,820,78,NULL,'[[2547C-M26]] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-24',NULL,'unpaid','2025-10-28 08:00:15','2025-10-24 01:45:56',NULL),(65,0,1161,79,NULL,'[[KCS-M33]KCS] 2025년 10월 서비스비용',NULL,850000,'month','2025-10-25',NULL,'unpaid','2025-10-28 08:21:20','2025-10-27 02:41:33',NULL),(66,0,1161,79,NULL,'13.220.20.8',NULL,200000,'onetime','2025-10-28',NULL,'unpaid','2025-10-28 08:23:21','2025-10-28 08:22:04',NULL),(67,1,820,78,NULL,'test.co.kr 도메인추가외 5개','<p>test1.co.kr<br>test2.co.kr<br><span style="color: #e03e2d;">test3.co.kr</span><br><span style="color: #e03e2d;">test4.co.kr</span><br>test5.co.k</p>',500000,'onetime','2025-10-29',NULL,'unpaid',NULL,'2025-10-29 00:08:44',NULL),(68,0,820,80,NULL,'[[2548E-M73]13.220.20.16] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-30',NULL,'unpaid','2025-10-30 08:14:04','2025-10-30 06:36:44',NULL),(69,0,820,NULL,NULL,'NVME 1T',NULL,150000,'onetime','2025-10-30',NULL,'unpaid','2025-10-30 08:09:16','2025-10-30 06:56:29',NULL),(86,1,599,81,NULL,'[2548E-M79]23.125.207.3 2025년 12월 서비스비용',NULL,1000000,'month','2025-12-25','account','unpaid',NULL,'2025-12-02 06:28:57',NULL),(87,1,598,109,NULL,'[2548E-M106]23.125.207.6 2025년 12월 서비스비용',NULL,600000,'month','2025-12-26','account','unpaid',NULL,'2025-12-02 09:03:34',NULL),(88,1,598,109,NULL,'test.com 도메인 외 5개',NULL,500000,'onetime','2025-12-05','coupon','unpaid',NULL,'2025-12-04 23:53:44',NULL),(89,1,598,109,NULL,'[2548E-M106]23.125.207.6 2026년 03월 서비스비용',NULL,600000,'month','2026-03-05','account','unpaid',NULL,'2025-12-05 00:01:41',NULL),(90,1,598,109,NULL,'2개월 선결제처리',NULL,1200000,'prepayment','2026-01-25','account','paid',NULL,'2025-12-05 00:15:22',NULL),(91,1,598,109,NULL,'[2548E-M106]23.125.207.6 2026년 01월 서비스비용',NULL,500000,'month','2026-01-25','account','unpaid',NULL,'2025-12-05 00:33:13',NULL); +INSERT INTO `payment` VALUES (17,1,820,52,NULL,'[[2548E-M68]13.220.20.6] 2025년 9월 서비스비용',NULL,500000,'month','2025-09-25','account','unpaid','2025-10-29 00:58:09','2025-09-25 06:29:25',NULL),(18,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-11-14','account','unpaid','2025-10-16 00:58:10','2025-09-25 06:31:18',NULL),(19,1,820,52,NULL,'2G',NULL,40000,'onetime','2025-09-25','account','unpaid','2025-09-25 08:27:17','2025-09-25 08:15:08',NULL),(20,1,1087,54,NULL,'gdidc_s68d4ff1b03fab',NULL,1800000,'month','2025-09-25','account','unpaid','2025-10-16 00:58:28','2025-09-25 08:36:43',NULL),(21,1,820,52,NULL,'16G',NULL,300000,'onetime','2025-09-26','account','unpaid',NULL,'2025-09-26 07:03:50',NULL),(22,1,820,52,NULL,'NVME 512G',NULL,120000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 00:56:19',NULL),(23,1,820,52,NULL,'NVME 512G',NULL,240000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 01:02:43',NULL),(24,1,820,52,NULL,'NVME 1T',NULL,150000,'onetime','2025-09-30','account','unpaid',NULL,'2025-09-30 01:50:08',NULL),(28,1,820,52,NULL,'SSD 256G',NULL,160000,'onetime','2025-09-30','account','unpaid',NULL,'2025-09-30 05:35:30',NULL),(29,1,820,56,NULL,'[[2530Z-M22]HITACH HA3000] 2025년 10월 서비스비용',NULL,1550000,'month','2025-10-01','account','unpaid','2025-10-31 03:36:49','2025-10-01 00:08:02',NULL),(32,1,819,57,NULL,'[[JPN-S23]DESKTOP I5] 2025년 10월 서비스비용',NULL,650000,'month','2025-10-01','account','unpaid','2025-10-31 03:36:20','2025-10-01 08:19:25',NULL),(33,1,820,52,NULL,'NVME 2T',NULL,180000,'onetime','2025-10-02','account','unpaid',NULL,'2025-10-02 00:07:28',NULL),(34,1,711,58,NULL,'prime_s68ddf9a191864',NULL,1100000,'month','2025-10-02','account','unpaid','2025-10-16 01:48:27','2025-10-02 04:03:45',NULL),(35,1,1185,59,NULL,'itsolution_s68e30467',NULL,900000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:30','2025-10-05 23:51:03',NULL),(36,45,1185,59,NULL,'서버비',NULL,600000,'month','2025-11-06',NULL,'paid','2025-10-05 23:54:41','2025-10-05 23:53:43',NULL),(37,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-11-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:03',NULL),(38,45,1185,59,NULL,'도메인','도메인 구매',40000,'onetime','2025-10-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:59',NULL),(39,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-10-06','account','paid','2025-10-06 00:51:24','2025-10-06 00:48:36',NULL),(40,45,1185,59,NULL,'도메인',NULL,1000000,'onetime','2025-10-06','account','paid','2025-10-06 01:02:46','2025-10-06 00:54:59',NULL),(41,1,1186,60,NULL,'prime_s68e37906ad1bd',NULL,1100000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:52','2025-10-06 08:08:38',NULL),(42,1,1186,61,NULL,'prime_s68e37b9e918a2',NULL,1300000,'month','2025-10-06','account','unpaid','2025-10-16 01:54:10','2025-10-06 08:19:42',NULL),(43,11,1186,60,NULL,'SSD 2T',NULL,600000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:25:57',NULL),(44,11,1186,60,NULL,'SSD 1T',NULL,400000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:31:15',NULL),(45,11,1186,61,NULL,'8G',NULL,50000,'onetime','2025-10-06','account','paid','2025-10-06 08:38:35','2025-10-06 08:34:46',NULL),(46,1,1186,61,NULL,'test.co.kr 도메인','test.co.kr 도메인',50000,'onetime','2025-10-14','account','unpaid',NULL,'2025-10-14 02:24:26',NULL),(50,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-10-14','account','unpaid',NULL,'2025-10-14 08:28:35',NULL),(51,1,819,57,NULL,'테스트','테스트\r\n테스트\r\n테스트\r\n테스트',100000,'onetime','2025-10-15','account','unpaid',NULL,'2025-10-15 03:35:39',NULL),(52,1,842,62,NULL,'prime_s68ef4901c563f',NULL,800000,'month','2025-10-15','account','unpaid','2025-10-16 07:52:10','2025-10-15 07:10:57',NULL),(53,1,842,63,NULL,'itsolution_s68ef4cbd',NULL,400000,'month','2025-10-15','account','unpaid','2025-10-16 01:54:36','2025-10-15 07:26:53',NULL),(54,1,820,56,NULL,'fffff','ffdgdfgdf',430000,'onetime','2025-10-15','account','unpaid',NULL,'2025-10-15 07:33:28',NULL),(55,1,1155,64,NULL,'[2543E-M32/13.220.20.25] 2025년 10월 서비스비용',NULL,900000,'month','2025-10-22','account','unpaid','2025-10-21 00:15:04','2025-10-17 06:22:15',NULL),(56,11,1186,60,NULL,'도메인 구매','<p>test.com</p>',40000,'onetime','2025-10-21','account','unpaid',NULL,'2025-10-21 05:19:26',NULL),(57,11,1186,60,NULL,'a.com','<p>도메인 구매</p>',40000,'onetime','2025-10-21','account','paid','2025-10-31 06:01:08','2025-10-21 05:20:08',NULL),(58,1,820,66,NULL,'[2549E-M65/13.220.20.4] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-22','account','unpaid','2025-10-22 09:50:41','2025-10-22 09:27:56',NULL),(59,1,820,66,NULL,'8G',NULL,80000,'onetime','2025-10-22','account','unpaid',NULL,'2025-10-22 09:45:01',NULL),(60,1,820,71,NULL,'[2548D-M67/13.220.20.15] 2025년 10월 서비스비용',NULL,400000,'month','2025-10-25','account','unpaid',NULL,'2025-10-23 05:01:53',NULL),(61,1,820,74,NULL,'[] 2025년 10월 서비스비용',NULL,1100000,'month','2025-10-23','account','unpaid','2025-10-28 08:01:13','2025-10-23 05:06:15',NULL),(64,1,820,78,NULL,'[[2547C-M26]] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-24','account','unpaid','2025-10-28 08:00:15','2025-10-24 01:45:56',NULL),(65,0,1161,79,NULL,'[[KCS-M33]KCS] 2025년 10월 서비스비용',NULL,850000,'month','2025-10-25','account','unpaid','2025-10-28 08:21:20','2025-10-27 02:41:33',NULL),(66,0,1161,79,NULL,'13.220.20.8',NULL,200000,'onetime','2025-10-28','account','unpaid','2025-10-28 08:23:21','2025-10-28 08:22:04',NULL),(67,1,820,78,NULL,'test.co.kr 도메인추가외 5개','<p>test1.co.kr<br>test2.co.kr<br><span style="color: #e03e2d;">test3.co.kr</span><br><span style="color: #e03e2d;">test4.co.kr</span><br>test5.co.k</p>',500000,'onetime','2025-10-29','account','unpaid',NULL,'2025-10-29 00:08:44',NULL),(68,0,820,80,NULL,'[[2548E-M73]13.220.20.16] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-30','account','unpaid','2025-10-30 08:14:04','2025-10-30 06:36:44',NULL),(69,0,820,NULL,NULL,'NVME 1T',NULL,150000,'onetime','2025-10-30','account','unpaid','2025-10-30 08:09:16','2025-10-30 06:56:29',NULL),(86,1,599,81,NULL,'[2549E-M80]23.125.207.5 2025년 12월 서비스비용',NULL,1000000,'month','2025-12-25','account','unpaid',NULL,'2025-12-02 06:28:57',NULL),(87,1,598,109,NULL,'[2548E-M106]23.125.207.6 2025년 12월 서비스비용',NULL,600000,'month','2025-12-26','account','unpaid',NULL,'2025-12-02 09:03:34',NULL),(88,1,598,109,NULL,'test.com 도메인 외 5개',NULL,500000,'onetime','2025-12-05','coupon','unpaid',NULL,'2025-12-04 23:53:44',NULL),(89,1,598,109,NULL,'[2548E-M106]23.125.207.6 2026년 03월 서비스비용',NULL,600000,'month','2026-03-05','account','unpaid',NULL,'2025-12-05 00:01:41',NULL),(90,1,598,109,NULL,'2개월 선결제처리',NULL,1200000,'prepayment','2026-01-25','account','paid',NULL,'2025-12-05 00:15:22',NULL),(91,1,598,109,NULL,'[2547D-M107]23.125.207.7 2026년 01월 서비스비용',NULL,500000,'month','2026-01-25','account','unpaid',NULL,'2025-12-05 00:33:13',NULL); /*!40000 ALTER TABLE `payment` ENABLE KEYS */; UNLOCK TABLES; @@ -652,7 +652,7 @@ CREATE TABLE `serviceinfo` ( LOCK TABLES `serviceinfo` WRITE; /*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */; -INSERT INTO `serviceinfo` VALUES (52,1,820,72,'prime_s68d4e145a474d','[2548E-M68]13.220.20.6','prime','chiba',100000,300000,'2025-09-25',100000,500000,'2025-09-25',NULL,'test1234\r\ntesst2123','available','2025-10-29 00:58:09','2025-09-25 06:29:25',NULL),(53,1,1161,18,'itsolution_s68d4e1b6','[2537B-M18]HP DL360 GEN7C','itsolution','chiba',100000,300000,'2025-11-14',0,800000,'2025-09-25',NULL,NULL,'available','2025-10-16 00:58:10','2025-09-25 06:31:18',NULL),(54,1,1087,19,'gdidc_s68d4ff1b03fab','[2528C-M19]HP DL360 GEN8D','gdidc','chiba',300000,300000,'2025-09-25',100000,1800000,'2025-09-25',NULL,NULL,'available','2025-10-16 00:58:28','2025-09-25 08:36:43',NULL),(56,1,820,22,'gdidc_s68dc70e2edb68','[2530Z-M22]HITACH HA3000','gdidc','chiba',100000,300000,'2025-10-01',0,1550000,'2025-10-01',NULL,NULL,'available','2025-10-31 03:36:49','2025-10-01 00:08:02',NULL),(57,1,819,23,'prime_s68dce40dd65df','[JPN-S23]DESKTOP I5','prime','chiba',100000,300000,'2025-10-01',100000,650000,'2025-10-01',NULL,NULL,'available','2025-10-31 03:36:20','2025-10-01 08:19:25',NULL),(58,1,711,27,'prime_s68ddf9a191864','[2548D-M27]HP DL360 GEN8D','prime','chiba',100000,300000,'2025-10-02',200000,1100000,'2025-10-02',NULL,NULL,'available','2025-10-16 01:48:27','2025-10-02 04:03:45',NULL),(59,1,1185,31,'itsolution_s68e30467','[2412E-M29]HP DL360 GEN9E','itsolution','chiba',100000,300000,'2025-10-06',0,900000,'2025-10-06',NULL,NULL,'available','2025-10-16 01:53:30','2025-10-05 23:51:03',NULL),(60,1,1186,21,'prime_s68e37906ad1bd','[2520Z-M21]HP DL360 GEN10','prime','chiba',100000,300000,'2025-10-06',0,1100000,'2025-10-06',NULL,'test / test\r\n','available','2025-10-16 01:53:52','2025-10-06 08:08:38',NULL),(61,1,1186,17,'prime_s68e37b9e918a2','[2526A-M1]HP DL360 GEN6B','prime','chiba',100000,300000,'2025-10-06',100000,1300000,'2025-10-06',NULL,NULL,'available','2025-10-16 01:54:10','2025-10-06 08:19:42',NULL),(62,1,842,63,'prime_s68ef4901c563f','[254D9-M56]HP DL360 GEN9E','prime','chiba',100000,300000,'2025-10-15',0,800000,'2025-10-15',NULL,NULL,'available','2025-10-16 07:52:10','2025-10-15 07:10:57',NULL),(63,1,842,64,'itsolution_s68ef4cbd','[2549D-M64]HP DL360 GEN9E','itsolution','chiba',100000,300000,'2025-10-15',400000,400000,'2025-10-15',NULL,NULL,'available','2025-10-16 01:54:36','2025-10-15 07:26:53',NULL),(64,1,1155,32,'gdidc_s68f1e0977ed19','[2543E-M32]HP DL360 GEN6B','gdidc','chiba',100000,300000,'2025-10-22',0,900000,'2025-10-17',NULL,'','available','2025-10-21 00:15:04','2025-10-17 06:22:15',NULL),(66,1,820,66,'gdidc_s68f8a39c1c110','[2549E-M65]HP DL360 GEN9E','gdidc','chiba',300000,300000,'2025-10-22',0,1000000,'2025-10-22',NULL,'','available','2025-10-22 09:50:41','2025-10-22 09:27:56',NULL),(71,1,820,67,'prime_s68f9b6c15cd13','[2548D-M67]HP DL360 GEN8D','prime','tokyo',100000,300000,'2025-10-25',500000,400000,'2025-10-23',NULL,NULL,'available','2025-10-23 05:01:53','2025-10-23 05:01:53',NULL),(74,1,820,25,'gdidc_s68f9b7c71552f','[2548E-M25]HP DL360 GEN8D','gdidc','chiba',100000,300000,'2025-10-23',0,1100000,'2025-10-23',NULL,NULL,'available','2025-10-28 08:01:13','2025-10-23 05:06:15',NULL),(78,1,820,26,'itsolution_s68fada54','[2547C-M26]HP DL360 GEN7C','itsolution','chiba',200000,300000,'2025-10-24',0,1000000,'2025-10-24',NULL,'','available','2025-10-28 08:00:15','2025-10-24 01:45:56',NULL),(79,1,1161,55,'prime_s68fedbddaedbd','[KCS-M33]KCS','prime','chiba',100000,300000,'2025-10-25',0,850000,'2025-10-27',NULL,NULL,'available','2025-10-28 08:21:20','2025-10-27 02:41:33',NULL),(80,1,820,73,'itsolution_s6903077c','[2548E-M73]13.220.20.16','itsolution','chiba',100000,300000,'2025-10-30',0,1000000,'2025-10-30',NULL,'','available','2025-10-30 08:14:04','2025-10-30 06:36:44',NULL),(81,1,599,105,'prime_s692e5f28c1783','[2548E-M79]23.125.207.3','prime','chiba',200000,500000,'2025-12-25',100000,1000000,'2025-12-02',NULL,NULL,'available',NULL,'2025-12-02 03:38:16',NULL),(109,1,598,107,'gdidc_s692eab6613856','[2548E-M106]23.125.207.6','gdidc','chiba',100000,300000,'2026-01-25',0,500000,'2025-12-02',NULL,NULL,'available',NULL,'2025-12-02 09:03:34',NULL); +INSERT INTO `serviceinfo` VALUES (52,1,820,72,'prime_s68d4e145a474d','[2548E-M68]13.220.20.6','prime','chiba',100000,300000,'2025-09-25',100000,500000,'2025-09-25',NULL,'test1234\r\ntesst2123','available','2025-10-29 00:58:09','2025-09-25 06:29:25',NULL),(53,1,1161,18,'itsolution_s68d4e1b6','[2537B-M18]HP DL360 GEN7C','itsolution','chiba',100000,300000,'2025-11-14',0,800000,'2025-09-25',NULL,NULL,'available','2025-10-16 00:58:10','2025-09-25 06:31:18',NULL),(54,1,1087,19,'gdidc_s68d4ff1b03fab','[2528C-M19]HP DL360 GEN8D','gdidc','chiba',300000,300000,'2025-09-25',100000,1800000,'2025-09-25',NULL,NULL,'available','2025-10-16 00:58:28','2025-09-25 08:36:43',NULL),(56,1,820,22,'gdidc_s68dc70e2edb68','[2530Z-M22]HITACH HA3000','gdidc','chiba',100000,300000,'2025-10-01',0,1550000,'2025-10-01',NULL,NULL,'available','2025-10-31 03:36:49','2025-10-01 00:08:02',NULL),(57,1,819,23,'prime_s68dce40dd65df','[JPN-S23]DESKTOP I5','prime','chiba',100000,300000,'2025-10-01',100000,650000,'2025-10-01',NULL,NULL,'available','2025-10-31 03:36:20','2025-10-01 08:19:25',NULL),(58,1,711,27,'prime_s68ddf9a191864','[2548D-M27]HP DL360 GEN8D','prime','chiba',100000,300000,'2025-10-02',200000,1100000,'2025-10-02',NULL,NULL,'available','2025-10-16 01:48:27','2025-10-02 04:03:45',NULL),(59,1,1185,31,'itsolution_s68e30467','[2412E-M29]HP DL360 GEN9E','itsolution','chiba',100000,300000,'2025-10-06',0,900000,'2025-10-06',NULL,NULL,'available','2025-10-16 01:53:30','2025-10-05 23:51:03',NULL),(60,1,1186,21,'prime_s68e37906ad1bd','[2520Z-M21]HP DL360 GEN10','prime','chiba',100000,300000,'2025-10-06',0,1100000,'2025-10-06',NULL,'test / test\r\n','available','2025-10-16 01:53:52','2025-10-06 08:08:38',NULL),(61,1,1186,17,'prime_s68e37b9e918a2','[2526A-M1]HP DL360 GEN6B','prime','chiba',100000,300000,'2025-10-06',100000,1300000,'2025-10-06',NULL,NULL,'available','2025-10-16 01:54:10','2025-10-06 08:19:42',NULL),(62,1,842,63,'prime_s68ef4901c563f','[254D9-M56]HP DL360 GEN9E','prime','chiba',100000,300000,'2025-10-15',0,800000,'2025-10-15',NULL,NULL,'available','2025-10-16 07:52:10','2025-10-15 07:10:57',NULL),(63,1,842,64,'itsolution_s68ef4cbd','[2549D-M64]HP DL360 GEN9E','itsolution','chiba',100000,300000,'2025-10-15',400000,400000,'2025-10-15',NULL,NULL,'available','2025-10-16 01:54:36','2025-10-15 07:26:53',NULL),(64,1,1155,32,'gdidc_s68f1e0977ed19','[2543E-M32]HP DL360 GEN6B','gdidc','chiba',100000,300000,'2025-10-22',0,900000,'2025-10-17',NULL,'','available','2025-10-21 00:15:04','2025-10-17 06:22:15',NULL),(66,1,820,66,'gdidc_s68f8a39c1c110','[2549E-M65]HP DL360 GEN9E','gdidc','chiba',300000,300000,'2025-10-22',0,1000000,'2025-10-22',NULL,'','available','2025-10-22 09:50:41','2025-10-22 09:27:56',NULL),(71,1,820,67,'prime_s68f9b6c15cd13','[2548D-M67]HP DL360 GEN8D','prime','tokyo',100000,300000,'2025-10-25',500000,400000,'2025-10-23',NULL,NULL,'available','2025-10-23 05:01:53','2025-10-23 05:01:53',NULL),(74,1,820,25,'gdidc_s68f9b7c71552f','[2548E-M25]HP DL360 GEN8D','gdidc','chiba',100000,300000,'2025-10-23',0,1100000,'2025-10-23',NULL,NULL,'available','2025-10-28 08:01:13','2025-10-23 05:06:15',NULL),(78,1,820,26,'itsolution_s68fada54','[2547C-M26]HP DL360 GEN7C','itsolution','chiba',200000,300000,'2025-10-24',0,1000000,'2025-10-24',NULL,'','available','2025-10-28 08:00:15','2025-10-24 01:45:56',NULL),(79,1,1161,55,'prime_s68fedbddaedbd','[KCS-M33]KCS','prime','chiba',100000,300000,'2025-10-25',0,850000,'2025-10-27',NULL,NULL,'available','2025-10-28 08:21:20','2025-10-27 02:41:33',NULL),(80,1,820,73,'itsolution_s6903077c','[2548E-M73]13.220.20.16','itsolution','chiba',100000,300000,'2025-10-30',0,1000000,'2025-10-30',NULL,'','available','2025-10-30 08:14:04','2025-10-30 06:36:44',NULL),(81,1,599,105,'prime_s692e5f28c1783','[2549E-M80]23.125.207.5','prime','chiba',200000,500000,'2025-12-25',100000,1000000,'2025-12-02',NULL,NULL,'available',NULL,'2025-12-02 03:38:16',NULL),(109,1,598,107,'gdidc_s692eab6613856','[2547D-M107]23.125.207.7','gdidc','chiba',100000,300000,'2026-01-25',0,500000,'2025-12-02',NULL,NULL,'available',NULL,'2025-12-02 09:03:34',NULL); /*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */; UNLOCK TABLES; @@ -771,4 +771,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2025-12-05 11:32:01 +-- Dump completed on 2025-12-08 17:22:46 diff --git a/app/Database/dbmsv4_test1.sql b/app/Database/dbmsv4_test1.sql index 2b5a038..f19e691 100644 --- a/app/Database/dbmsv4_test1.sql +++ b/app/Database/dbmsv4_test1.sql @@ -450,7 +450,7 @@ CREATE TABLE `payment` ( LOCK TABLES `payment` WRITE; /*!40000 ALTER TABLE `payment` DISABLE KEYS */; -INSERT INTO `payment` VALUES (17,1,820,52,NULL,'[[2548E-M68]13.220.20.6] 2025년 9월 서비스비용',NULL,500000,'month','2025-09-25',NULL,'unpaid','2025-10-29 00:58:09','2025-09-25 06:29:25',NULL),(18,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-11-14',NULL,'unpaid','2025-10-16 00:58:10','2025-09-25 06:31:18',NULL),(19,1,820,52,NULL,'2G',NULL,40000,'onetime','2025-09-25',NULL,'unpaid','2025-09-25 08:27:17','2025-09-25 08:15:08',NULL),(20,1,1087,54,NULL,'gdidc_s68d4ff1b03fab',NULL,1800000,'month','2025-09-25',NULL,'unpaid','2025-10-16 00:58:28','2025-09-25 08:36:43',NULL),(21,1,820,52,NULL,'16G',NULL,300000,'onetime','2025-09-26',NULL,'unpaid',NULL,'2025-09-26 07:03:50',NULL),(22,1,820,52,NULL,'NVME 512G',NULL,120000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 00:56:19',NULL),(23,1,820,52,NULL,'NVME 512G',NULL,240000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 01:02:43',NULL),(24,1,820,52,NULL,'NVME 1T',NULL,150000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 01:50:08',NULL),(28,1,820,52,NULL,'SSD 256G',NULL,160000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 05:35:30',NULL),(29,1,820,56,NULL,'[[2530Z-M22]HITACH HA3000] 2025년 10월 서비스비용',NULL,1550000,'month','2025-10-01',NULL,'unpaid','2025-10-31 03:36:49','2025-10-01 00:08:02',NULL),(32,1,819,57,NULL,'[[JPN-S23]DESKTOP I5] 2025년 10월 서비스비용',NULL,650000,'month','2025-10-01',NULL,'unpaid','2025-10-31 03:36:20','2025-10-01 08:19:25',NULL),(33,1,820,52,NULL,'NVME 2T',NULL,180000,'onetime','2025-10-02',NULL,'unpaid',NULL,'2025-10-02 00:07:28',NULL),(34,1,711,58,NULL,'prime_s68ddf9a191864',NULL,1100000,'month','2025-10-02',NULL,'unpaid','2025-10-16 01:48:27','2025-10-02 04:03:45',NULL),(35,1,1185,59,NULL,'itsolution_s68e30467',NULL,900000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:30','2025-10-05 23:51:03',NULL),(36,45,1185,59,NULL,'서버비',NULL,600000,'month','2025-11-06',NULL,'paid','2025-10-05 23:54:41','2025-10-05 23:53:43',NULL),(37,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-11-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:03',NULL),(38,45,1185,59,NULL,'도메인','도메인 구매',40000,'onetime','2025-10-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:59',NULL),(39,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-10-06','account','paid','2025-10-06 00:51:24','2025-10-06 00:48:36',NULL),(40,45,1185,59,NULL,'도메인',NULL,1000000,'onetime','2025-10-06','account','paid','2025-10-06 01:02:46','2025-10-06 00:54:59',NULL),(41,1,1186,60,NULL,'prime_s68e37906ad1bd',NULL,1100000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:52','2025-10-06 08:08:38',NULL),(42,1,1186,61,NULL,'prime_s68e37b9e918a2',NULL,1300000,'month','2025-10-06','account','unpaid','2025-10-16 01:54:10','2025-10-06 08:19:42',NULL),(43,11,1186,60,NULL,'SSD 2T',NULL,600000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:25:57',NULL),(44,11,1186,60,NULL,'SSD 1T',NULL,400000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:31:15',NULL),(45,11,1186,61,NULL,'8G',NULL,50000,'onetime','2025-10-06','account','paid','2025-10-06 08:38:35','2025-10-06 08:34:46',NULL),(46,1,1186,61,NULL,'test.co.kr 도메인','test.co.kr 도메인',50000,'onetime','2025-10-14',NULL,'unpaid',NULL,'2025-10-14 02:24:26',NULL),(50,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-10-14',NULL,'unpaid',NULL,'2025-10-14 08:28:35',NULL),(51,1,819,57,NULL,'테스트','테스트\r\n테스트\r\n테스트\r\n테스트',100000,'onetime','2025-10-15',NULL,'unpaid',NULL,'2025-10-15 03:35:39',NULL),(52,1,842,62,NULL,'prime_s68ef4901c563f',NULL,800000,'month','2025-10-15',NULL,'unpaid','2025-10-16 07:52:10','2025-10-15 07:10:57',NULL),(53,1,842,63,NULL,'itsolution_s68ef4cbd',NULL,400000,'month','2025-10-15',NULL,'unpaid','2025-10-16 01:54:36','2025-10-15 07:26:53',NULL),(54,1,820,56,NULL,'fffff','ffdgdfgdf',430000,'onetime','2025-10-15',NULL,'unpaid',NULL,'2025-10-15 07:33:28',NULL),(55,1,1155,64,NULL,'[2543E-M32/13.220.20.25] 2025년 10월 서비스비용',NULL,900000,'month','2025-10-22',NULL,'unpaid','2025-10-21 00:15:04','2025-10-17 06:22:15',NULL),(56,11,1186,60,NULL,'도메인 구매','<p>test.com</p>',40000,'onetime','2025-10-21',NULL,'unpaid',NULL,'2025-10-21 05:19:26',NULL),(57,11,1186,60,NULL,'a.com','<p>도메인 구매</p>',40000,'onetime','2025-10-21','account','paid','2025-10-31 06:01:08','2025-10-21 05:20:08',NULL),(58,1,820,66,NULL,'[2549E-M65/13.220.20.4] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-22',NULL,'unpaid','2025-10-22 09:50:41','2025-10-22 09:27:56',NULL),(59,1,820,66,NULL,'8G',NULL,80000,'onetime','2025-10-22',NULL,'unpaid',NULL,'2025-10-22 09:45:01',NULL),(60,1,820,71,NULL,'[2548D-M67/13.220.20.15] 2025년 10월 서비스비용',NULL,400000,'month','2025-10-25',NULL,'unpaid',NULL,'2025-10-23 05:01:53',NULL),(61,1,820,74,NULL,'[] 2025년 10월 서비스비용',NULL,1100000,'month','2025-10-23',NULL,'unpaid','2025-10-28 08:01:13','2025-10-23 05:06:15',NULL),(64,1,820,78,NULL,'[[2547C-M26]] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-24',NULL,'unpaid','2025-10-28 08:00:15','2025-10-24 01:45:56',NULL),(65,0,1161,79,NULL,'[[KCS-M33]KCS] 2025년 10월 서비스비용',NULL,850000,'month','2025-10-25',NULL,'unpaid','2025-10-28 08:21:20','2025-10-27 02:41:33',NULL),(66,0,1161,79,NULL,'13.220.20.8',NULL,200000,'onetime','2025-10-28',NULL,'unpaid','2025-10-28 08:23:21','2025-10-28 08:22:04',NULL),(67,1,820,78,NULL,'test.co.kr 도메인추가외 5개','<p>test1.co.kr<br>test2.co.kr<br><span style="color: #e03e2d;">test3.co.kr</span><br><span style="color: #e03e2d;">test4.co.kr</span><br>test5.co.k</p>',500000,'onetime','2025-10-29',NULL,'unpaid',NULL,'2025-10-29 00:08:44',NULL),(68,0,820,80,NULL,'[[2548E-M73]13.220.20.16] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-30',NULL,'unpaid','2025-10-30 08:14:04','2025-10-30 06:36:44',NULL),(69,0,820,NULL,NULL,'NVME 1T',NULL,150000,'onetime','2025-10-30',NULL,'unpaid','2025-10-30 08:09:16','2025-10-30 06:56:29',NULL),(86,1,599,81,NULL,'[2549E-M80]23.125.207.5 2025년 12월 서비스비용',NULL,1000000,'month','2025-12-25','account','unpaid',NULL,'2025-12-02 06:28:57',NULL),(87,1,598,109,NULL,'[2548E-M106]23.125.207.6 2025년 12월 서비스비용',NULL,600000,'month','2025-12-26','account','unpaid',NULL,'2025-12-02 09:03:34',NULL),(88,1,598,109,NULL,'test.com 도메인 외 5개',NULL,500000,'onetime','2025-12-05','coupon','unpaid',NULL,'2025-12-04 23:53:44',NULL),(89,1,598,109,NULL,'[2548E-M106]23.125.207.6 2026년 03월 서비스비용',NULL,600000,'month','2026-03-05','account','unpaid',NULL,'2025-12-05 00:01:41',NULL),(90,1,598,109,NULL,'2개월 선결제처리',NULL,1200000,'prepayment','2026-01-25','account','paid',NULL,'2025-12-05 00:15:22',NULL),(91,1,598,109,NULL,'[2547D-M107]23.125.207.7 2026년 01월 서비스비용',NULL,500000,'month','2026-01-25','account','unpaid',NULL,'2025-12-05 00:33:13',NULL); +INSERT INTO `payment` VALUES (17,1,820,52,NULL,'[[2548E-M68]13.220.20.6] 2025년 9월 서비스비용',NULL,500000,'month','2025-09-25','account','unpaid','2025-10-29 00:58:09','2025-09-25 06:29:25',NULL),(18,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-11-14','account','unpaid','2025-10-16 00:58:10','2025-09-25 06:31:18',NULL),(19,1,820,52,NULL,'2G',NULL,40000,'onetime','2025-09-25','account','unpaid','2025-09-25 08:27:17','2025-09-25 08:15:08',NULL),(20,1,1087,54,NULL,'gdidc_s68d4ff1b03fab',NULL,1800000,'month','2025-09-25','account','unpaid','2025-10-16 00:58:28','2025-09-25 08:36:43',NULL),(21,1,820,52,NULL,'16G',NULL,300000,'onetime','2025-09-26','account','unpaid',NULL,'2025-09-26 07:03:50',NULL),(22,1,820,52,NULL,'NVME 512G',NULL,120000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 00:56:19',NULL),(23,1,820,52,NULL,'NVME 512G',NULL,240000,'onetime','2025-09-30','account','paid','2025-10-02 05:07:08','2025-09-30 01:02:43',NULL),(24,1,820,52,NULL,'NVME 1T',NULL,150000,'onetime','2025-09-30','account','unpaid',NULL,'2025-09-30 01:50:08',NULL),(28,1,820,52,NULL,'SSD 256G',NULL,160000,'onetime','2025-09-30','account','unpaid',NULL,'2025-09-30 05:35:30',NULL),(29,1,820,56,NULL,'[[2530Z-M22]HITACH HA3000] 2025년 10월 서비스비용',NULL,1550000,'month','2025-10-01','account','unpaid','2025-10-31 03:36:49','2025-10-01 00:08:02',NULL),(32,1,819,57,NULL,'[[JPN-S23]DESKTOP I5] 2025년 10월 서비스비용',NULL,650000,'month','2025-10-01','account','unpaid','2025-10-31 03:36:20','2025-10-01 08:19:25',NULL),(33,1,820,52,NULL,'NVME 2T',NULL,180000,'onetime','2025-10-02','account','unpaid',NULL,'2025-10-02 00:07:28',NULL),(34,1,711,58,NULL,'prime_s68ddf9a191864',NULL,1100000,'month','2025-10-02','account','unpaid','2025-10-16 01:48:27','2025-10-02 04:03:45',NULL),(35,1,1185,59,NULL,'itsolution_s68e30467',NULL,900000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:30','2025-10-05 23:51:03',NULL),(36,45,1185,59,NULL,'서버비',NULL,600000,'month','2025-11-06',NULL,'paid','2025-10-05 23:54:41','2025-10-05 23:53:43',NULL),(37,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-11-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:03',NULL),(38,45,1185,59,NULL,'도메인','도메인 구매',40000,'onetime','2025-10-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:59',NULL),(39,45,1185,59,NULL,'서버비',NULL,400000,'month','2025-10-06','account','paid','2025-10-06 00:51:24','2025-10-06 00:48:36',NULL),(40,45,1185,59,NULL,'도메인',NULL,1000000,'onetime','2025-10-06','account','paid','2025-10-06 01:02:46','2025-10-06 00:54:59',NULL),(41,1,1186,60,NULL,'prime_s68e37906ad1bd',NULL,1100000,'month','2025-10-06','account','unpaid','2025-10-16 01:53:52','2025-10-06 08:08:38',NULL),(42,1,1186,61,NULL,'prime_s68e37b9e918a2',NULL,1300000,'month','2025-10-06','account','unpaid','2025-10-16 01:54:10','2025-10-06 08:19:42',NULL),(43,11,1186,60,NULL,'SSD 2T',NULL,600000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:25:57',NULL),(44,11,1186,60,NULL,'SSD 1T',NULL,400000,'onetime','2025-10-06','account','paid','2025-10-06 08:36:38','2025-10-06 08:31:15',NULL),(45,11,1186,61,NULL,'8G',NULL,50000,'onetime','2025-10-06','account','paid','2025-10-06 08:38:35','2025-10-06 08:34:46',NULL),(46,1,1186,61,NULL,'test.co.kr 도메인','test.co.kr 도메인',50000,'onetime','2025-10-14','account','unpaid',NULL,'2025-10-14 02:24:26',NULL),(50,1,1161,53,NULL,'itsolution_s68d4e1b6',NULL,800000,'month','2025-10-14','account','unpaid',NULL,'2025-10-14 08:28:35',NULL),(51,1,819,57,NULL,'테스트','테스트\r\n테스트\r\n테스트\r\n테스트',100000,'onetime','2025-10-15','account','unpaid',NULL,'2025-10-15 03:35:39',NULL),(52,1,842,62,NULL,'prime_s68ef4901c563f',NULL,800000,'month','2025-10-15','account','unpaid','2025-10-16 07:52:10','2025-10-15 07:10:57',NULL),(53,1,842,63,NULL,'itsolution_s68ef4cbd',NULL,400000,'month','2025-10-15','account','unpaid','2025-10-16 01:54:36','2025-10-15 07:26:53',NULL),(54,1,820,56,NULL,'fffff','ffdgdfgdf',430000,'onetime','2025-10-15','account','unpaid',NULL,'2025-10-15 07:33:28',NULL),(55,1,1155,64,NULL,'[2543E-M32/13.220.20.25] 2025년 10월 서비스비용',NULL,900000,'month','2025-10-22','account','unpaid','2025-10-21 00:15:04','2025-10-17 06:22:15',NULL),(56,11,1186,60,NULL,'도메인 구매','<p>test.com</p>',40000,'onetime','2025-10-21','account','unpaid',NULL,'2025-10-21 05:19:26',NULL),(57,11,1186,60,NULL,'a.com','<p>도메인 구매</p>',40000,'onetime','2025-10-21','account','paid','2025-10-31 06:01:08','2025-10-21 05:20:08',NULL),(58,1,820,66,NULL,'[2549E-M65/13.220.20.4] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-22','account','unpaid','2025-10-22 09:50:41','2025-10-22 09:27:56',NULL),(59,1,820,66,NULL,'8G',NULL,80000,'onetime','2025-10-22','account','unpaid',NULL,'2025-10-22 09:45:01',NULL),(60,1,820,71,NULL,'[2548D-M67/13.220.20.15] 2025년 10월 서비스비용',NULL,400000,'month','2025-10-25','account','unpaid',NULL,'2025-10-23 05:01:53',NULL),(61,1,820,74,NULL,'[] 2025년 10월 서비스비용',NULL,1100000,'month','2025-10-23','account','unpaid','2025-10-28 08:01:13','2025-10-23 05:06:15',NULL),(64,1,820,78,NULL,'[[2547C-M26]] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-24','account','unpaid','2025-10-28 08:00:15','2025-10-24 01:45:56',NULL),(65,0,1161,79,NULL,'[[KCS-M33]KCS] 2025년 10월 서비스비용',NULL,850000,'month','2025-10-25','account','unpaid','2025-10-28 08:21:20','2025-10-27 02:41:33',NULL),(66,0,1161,79,NULL,'13.220.20.8',NULL,200000,'onetime','2025-10-28','account','unpaid','2025-10-28 08:23:21','2025-10-28 08:22:04',NULL),(67,1,820,78,NULL,'test.co.kr 도메인추가외 5개','<p>test1.co.kr<br>test2.co.kr<br><span style="color: #e03e2d;">test3.co.kr</span><br><span style="color: #e03e2d;">test4.co.kr</span><br>test5.co.k</p>',500000,'onetime','2025-10-29','account','unpaid',NULL,'2025-10-29 00:08:44',NULL),(68,0,820,80,NULL,'[[2548E-M73]13.220.20.16] 2025년 10월 서비스비용',NULL,1000000,'month','2025-10-30','account','unpaid','2025-10-30 08:14:04','2025-10-30 06:36:44',NULL),(69,0,820,NULL,NULL,'NVME 1T',NULL,150000,'onetime','2025-10-30','account','unpaid','2025-10-30 08:09:16','2025-10-30 06:56:29',NULL),(86,1,599,81,NULL,'[2549E-M80]23.125.207.5 2025년 12월 서비스비용',NULL,1000000,'month','2025-12-25','account','unpaid',NULL,'2025-12-02 06:28:57',NULL),(87,1,598,109,NULL,'[2548E-M106]23.125.207.6 2025년 12월 서비스비용',NULL,600000,'month','2025-12-26','account','unpaid',NULL,'2025-12-02 09:03:34',NULL),(88,1,598,109,NULL,'test.com 도메인 외 5개',NULL,500000,'onetime','2025-12-05','coupon','unpaid',NULL,'2025-12-04 23:53:44',NULL),(89,1,598,109,NULL,'[2548E-M106]23.125.207.6 2026년 03월 서비스비용',NULL,600000,'month','2026-03-05','account','unpaid',NULL,'2025-12-05 00:01:41',NULL),(90,1,598,109,NULL,'2개월 선결제처리',NULL,1200000,'prepayment','2026-01-25','account','paid',NULL,'2025-12-05 00:15:22',NULL),(91,1,598,109,NULL,'[2547D-M107]23.125.207.7 2026년 01월 서비스비용',NULL,500000,'month','2026-01-25','account','unpaid',NULL,'2025-12-05 00:33:13',NULL); /*!40000 ALTER TABLE `payment` ENABLE KEYS */; UNLOCK TABLES; @@ -771,4 +771,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2025-12-08 14:34:34 +-- Dump completed on 2025-12-08 17:22:39 diff --git a/app/Forms/CommonForm.php b/app/Forms/CommonForm.php index 7300a2e..45b3b3c 100644 --- a/app/Forms/CommonForm.php +++ b/app/Forms/CommonForm.php @@ -24,7 +24,7 @@ abstract class CommonForm final public function getAttribute(string $key): string { if (!array_key_exists($key, $this->_attributes)) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: {$key}에 해당하는 속성이 정의되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$key}에 해당하는 속성이 정의되지 않았습니다."); } return $this->_attributes[$key]; } @@ -130,7 +130,9 @@ abstract class CommonForm $validation = service('validation'); $dynamicRules = []; $dynamicLabels = []; // 레이블 배열 추가 - + if (!count($this->getFormRules())) { + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 지정된 Form RULE이 없습니다."); + } foreach ($this->getFormRules() as $field => $rule) { list($field, $rule) = $this->getValidationRule($field, $rule); $dynamicRules[$field] = $rule; // 규칙만 저장 @@ -144,8 +146,9 @@ abstract class CommonForm // run()에는 데이터만 전달 (setRules에서 이미 설정됨) $result = $validation->run($formDatas); if ($result === false) { - // run()이 false를 반환했다면, 이 시점에서 getErrors()에는 메시지가 있어야 합니다. - log_message('debug', 'Validate Run Failed. Errors: ' . var_export($validation->getErrors(), true)); + $message = __METHOD__ . "에서 데이터 검증 오류발생: " . var_export($validation->getErrors(), true); + log_message('debug', $message); + throw new RuntimeException($message); } else { log_message('debug', 'Validate Run Succeeded.'); } @@ -249,7 +252,7 @@ abstract class CommonForm default: $optionDatas = lang($this->getAttribute('class_path') . "." . strtoupper($field)); if (!is_array($optionDatas)) { - throw new \Exception(__METHOD__ . "에서 오류발생:{$field}가 배열값이 아닙니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:{$field}가 배열값이 아닙니다."); } foreach ($optionDatas as $key => $label) { $tempOptions[$key] = $label; diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index d0c9c62..02dfcba 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -22,7 +22,7 @@ abstract class CommonHelper final public function getAttribute(string $key): string { if (!array_key_exists($key, $this->_attributes)) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: {$key}에 해당하는 속성이 정의되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$key}에 해당하는 속성이 정의되지 않았습니다."); } return $this->_attributes[$key]; } @@ -166,7 +166,7 @@ abstract class CommonHelper case 'clientinfo_uid': if (array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) { if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); } $value = !$value ? "" : "{$viewDatas['formOptions'][$field]['options'][$value]}"; } @@ -201,7 +201,7 @@ abstract class CommonHelper if (in_array($field, $viewDatas['formFilters'])) { if ($value) { if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); } $value = $viewDatas['formOptions'][$field]['options'][$value]; } diff --git a/app/Helpers/Equipment/ServerHelper.php b/app/Helpers/Equipment/ServerHelper.php index 2de9668..da7601c 100644 --- a/app/Helpers/Equipment/ServerHelper.php +++ b/app/Helpers/Equipment/ServerHelper.php @@ -2,6 +2,8 @@ namespace App\Helpers\Equipment; +use RuntimeException; + class ServerHelper extends EquipmentHelper { public function __construct() @@ -42,7 +44,7 @@ class ServerHelper extends EquipmentHelper switch ($field) { case 'chassisinfo_uid': if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); } $value = $viewDatas['formOptions'][$field]['options'][$value]['text']; break; diff --git a/app/Helpers/Equipment/ServerPartHelper.php b/app/Helpers/Equipment/ServerPartHelper.php index ea1ba8a..7e5354a 100644 --- a/app/Helpers/Equipment/ServerPartHelper.php +++ b/app/Helpers/Equipment/ServerPartHelper.php @@ -2,6 +2,8 @@ namespace App\Helpers\Equipment; +use RuntimeException; + class ServerPartHelper extends EquipmentHelper { public function __construct() @@ -39,7 +41,7 @@ class ServerPartHelper extends EquipmentHelper switch ($field) { case 'part_uid': if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'][$viewDatas['entity']->getType()])) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); } $value = $viewDatas['formOptions'][$field]['options'][$viewDatas['entity']->getType()][$value]; break; diff --git a/app/Libraries/MySocket/GoogleSocket/CURL.php b/app/Libraries/MySocket/GoogleSocket/CURL.php index a29b37b..9fcbcda 100644 --- a/app/Libraries/MySocket/GoogleSocket/CURL.php +++ b/app/Libraries/MySocket/GoogleSocket/CURL.php @@ -105,7 +105,7 @@ class CURL extends GoogleSocket $this->getSession()->set($this->_token_name, $this->_access_token); } - // throw new \Exception(__METHOD__ . "에서 데이터 처리 필요"); + // throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 데이터 처리 필요"); // DEBUG - 2023-07-13 12:54:51 --> \Google\Service\Oauth2\Userinfo::__set_state(array( // 'internal_gapi_mappings' => // 'familyName' => 'family_name', diff --git a/app/Libraries/MySocket/WebSocket.php b/app/Libraries/MySocket/WebSocket.php index 79fb22e..0fc03b4 100644 --- a/app/Libraries/MySocket/WebSocket.php +++ b/app/Libraries/MySocket/WebSocket.php @@ -2,8 +2,9 @@ namespace App\Libraries\MySocket; -use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Client; +use Psr\Http\Message\ResponseInterface; +use RuntimeException; class WebSocket extends MySocket { @@ -33,9 +34,7 @@ class WebSocket extends MySocket { $response = $this->get($this->getURL($uri), $options); if ($response->getStatusCode() != 200) { - throw new \Exception("error", __FUNCTION__ . - "=> {$uri} 접속실패: " . - $response->getStatusCode()); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 error {$uri} 접속실패: " . $response->getStatusCode()); } return $response; } diff --git a/app/Libraries/PipelineStep.php b/app/Libraries/PipelineStep.php index d8a43b9..fc75a85 100644 --- a/app/Libraries/PipelineStep.php +++ b/app/Libraries/PipelineStep.php @@ -4,6 +4,7 @@ namespace App\Libraries; use App\Libraries\OperationContext; use App\Services\MylogService; +use RuntimeException; class PipelineStep { @@ -31,7 +32,7 @@ class PipelineStep // 2. 단계(Steps) 순차 실행 foreach ($steps as $step) { if (!($step instanceof PipelineStepInterface)) { - throw new \Exception("파이프라인 단계는 PipelineStep 인터페이스를 구현해야 합니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 파이프라인 단계는 PipelineStep 인터페이스를 구현해야 합니다."); } $context = $step->handle($context); } diff --git a/app/Services/Auth/LocalService.php b/app/Services/Auth/LocalService.php index 7982f49..dd3acd1 100644 --- a/app/Services/Auth/LocalService.php +++ b/app/Services/Auth/LocalService.php @@ -7,6 +7,7 @@ use App\Entities\UserEntity; use App\Forms\Auth\LocalForm; use App\Models\UserModel; use CodeIgniter\Validation\Exceptions\ValidationException; +use RuntimeException; class LocalService extends AuthService { @@ -66,10 +67,10 @@ class LocalService extends AuthService //로그인 정보확인 $entity = $this->getEntity(['id' => $formDatas['id'], 'status' => 'AVAILABLE']); if (!$entity instanceof UserEntity) { - throw new \Exception("{$formDatas['id']}에 대한 로그인 정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$formDatas['id']}에 대한 로그인 정보를 찾을수 없습니다."); } if (!password_verify($formDatas['passwd'], $entity->getPassword())) { - throw new \Exception("암호가 맞지 않습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 암호가 맞지 않습니다."); } return $entity; } diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index bc3a819..81ae1f2 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -62,7 +62,7 @@ abstract class CommonService // 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사 $entityClass = $this->getEntityClass(); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능:\n" . var_export($entity, true)); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능:\n" . var_export($entity, true)); } return $this->getEntity_process($entity); } catch (DatabaseException $e) { @@ -130,7 +130,7 @@ abstract class CommonService if ($result === false) { $errors = $this->model->errors(); $errorMsg = is_array($errors) ? implode(", ", $errors) : "DB 저장 작업이 실패했습니다."; - throw new RuntimeException(__METHOD__ . "에서 오류발생: " . $errorMsg); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: " . $errorMsg); } $pk = $uid; // 기본적으로 기존 $uid (업데이트의 경우) // AUTO_INCREMENT 필드를 사용하는 경우, INSERT 작업이라면 새로 생성된 ID를 가져옵니다. @@ -149,7 +149,7 @@ abstract class CommonService if (empty($pk)) { $errors = $this->model->errors(); $errorMsg = is_array($errors) && !empty($errors) ? implode(", ", $errors) : "DB 작업 성공 후 PK를 확인할 수 없거나 모델 오류 발생:{$pk}"; - throw new RuntimeException(__METHOD__ . "에서 오류발생: " . $errorMsg); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: " . $errorMsg); } return $pk; } @@ -182,7 +182,7 @@ abstract class CommonService $entityClass = $this->getEntityClass(); $entity = new $entityClass($formDatas); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); } $entity = $this->save_process($entity); if ($entity instanceof PaymentEntity) { @@ -199,7 +199,7 @@ abstract class CommonService //DTO 타입 체크 로직을 일반화 $dtoClass = $this->getDTOClass(); if (!$dto instanceof $dtoClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: " . get_class($dto) . "는 사용할 수 없습니다. ({$dtoClass} 필요)"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: " . get_class($dto) . "는 사용할 수 없습니다. ({$dtoClass} 필요)"); } $entity = $this->create_process($dto->toArray()); $db->transComplete(); @@ -253,16 +253,16 @@ abstract class CommonService //DTO 타입 체크 로직을 일반화 $dtoClass = $this->getDTOClass(); if (!$dto instanceof $dtoClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: " . get_class($dto) . "는 사용할 수 없습니다. ({$dtoClass} 필요)"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: " . get_class($dto) . "는 사용할 수 없습니다. ({$dtoClass} 필요)"); } $entity = $this->getEntity($uid); if (!$entity) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); } // 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사 $entityClass = $this->getEntityClass(); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); } $entity = $this->modify_process($entity, $dto->toArray()); // 트랜잭션 완료 및 커밋 @@ -297,19 +297,19 @@ abstract class CommonService //DTO 타입 체크 로직을 일반화 $dtoClass = $this->getDTOClass(); if (!$dto instanceof $dtoClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: " . get_class($dto) . "는 사용할 수 없습니다. ({$dtoClass} 필요)"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: " . get_class($dto) . "는 사용할 수 없습니다. ({$dtoClass} 필요)"); } //일괄작업처리 $entities = []; foreach ($uids as $uid) { $entity = $this->getEntity($uid); if (!$entity) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); } // 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사 $entityClass = $this->getEntityClass(); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); } $entities[] = $this->batchjob_process($entity, $dto->toArray()); } @@ -339,7 +339,7 @@ abstract class CommonService if ($result === false) { $errors = $this->model->errors(); $errorMsg = is_array($errors) ? implode(", ", $errors) : "삭제 작업이 실패했습니다."; - throw new RuntimeException(__METHOD__ . "에서 오류발생: " . $errorMsg); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: " . $errorMsg); } return $entity; } @@ -348,16 +348,16 @@ abstract class CommonService $db = \Config\Database::connect(); try { if (!$uid) { - throw new \Exception("삭제에 필요한 PrimaryKey 가 정의 되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 삭제에 필요한 PrimaryKey 가 정의 되지 않았습니다."); } $entity = $this->getEntity($uid); if (!$entity) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); } // 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사 $entityClass = $this->getEntityClass(); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); } $db->transException(true)->transStart(); $entity = $this->delete_process($entity); @@ -396,12 +396,12 @@ abstract class CommonService foreach ($uids as $uid) { $entity = $this->getEntity($uid); if (!$entity) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 정보을 찾을수 없습니다."); } // 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사 $entityClass = $this->getEntityClass(); if (!$entity instanceof $entityClass) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 {$entityClass}만 가능"); } $entities[] = $this->batchjob_delete_process($entity); } diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php index 2365191..2fc99db 100644 --- a/app/Services/Customer/ClientService.php +++ b/app/Services/Customer/ClientService.php @@ -114,7 +114,7 @@ class ClientService extends CustomerService { $entity = is_int($uid) ? $this->getEntity($uid) : $uid; if (!$entity instanceof ClientEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다."); } $calculatedValue = null; @@ -152,7 +152,7 @@ class ClientService extends CustomerService $calculatedValue = $balance - $value; } if (!is_int($calculatedValue) || $calculatedValue < 0) { - throw new RuntimeException(__METHOD__ . "에서 {$title}의 계산결과 값이 NULL이거나 0보다 작은 값입니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$title}의 계산결과 값이 NULL이거나 0보다 작은 값입니다."); } //balance 수정 $formDatas = ["{$key}_balance" => $calculatedValue, 'status' => $status]; diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 68940de..a50ba00 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -180,7 +180,7 @@ class ServiceService extends CustomerService { $entity = is_int($uid) ? $this->getEntity($uid) : $uid; if (!$entity instanceof ServiceEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다."); } //총 서비스금액 설정 $formDatas = ['billing_at' => $billing_at]; @@ -194,7 +194,7 @@ class ServiceService extends CustomerService { $entity = is_int($uid) ? $this->getEntity($uid) : $uid; if (!$entity instanceof ServiceEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다."); } //총 서비스금액 구하기 $server_amount = service('equipment_serverservice')->getCalculatedAmount($entity->getServerInfoUID()); @@ -224,7 +224,7 @@ class ServiceService extends CustomerService //서비스 생성 $entity = parent::create_process($formDatas); if (!$entity instanceof ServiceEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 ServiceEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 ServiceEntity만 가능"); } //서버정보 연결 service('equipment_serverservice')->attachToService($entity, $entity->getServerInfoUID()); @@ -245,7 +245,7 @@ class ServiceService extends CustomerService //서비스 수정 $entity = parent::modify_process($entity, $formDatas); if (!$entity instanceof ServiceEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 ServiceEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 ServiceEntity만 가능"); } //서버정보 연결 신규서버로 변경되었으면 신규서버 추가 if ($oldEntity->getServerInfoUID() !== $entity->getServerInfoUID()) { diff --git a/app/Services/Equipment/CHASSISService.php b/app/Services/Equipment/CHASSISService.php index 335000e..80fcc8a 100644 --- a/app/Services/Equipment/CHASSISService.php +++ b/app/Services/Equipment/CHASSISService.php @@ -3,11 +3,12 @@ namespace App\Services\Equipment; use App\DTOs\Equipment\CHASSISDTO; -use App\Entities\Equipment\ServerEntity; use App\Entities\Equipment\CHASSISEntity; +use App\Entities\Equipment\ServerEntity; use App\Forms\Equipment\CHASSISForm; use App\Helpers\Equipment\CHASSISHelper; use App\Models\Equipment\CHASSISModel; +use RuntimeException; class CHASSISService extends EquipmentService { @@ -121,7 +122,7 @@ class CHASSISService extends EquipmentService //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverEntity->getChassisInfoUID()); if (!$entity instanceof CHASSISEntity) { - throw new \Exception("{$serverEntity->getChassisInfoUID()}에 해당하는 샷시정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverEntity->getChassisInfoUID()}에 해당하는 샷시정보를 찾을수없습니다."); } return $entity; } @@ -132,7 +133,7 @@ class CHASSISService extends EquipmentService $entity = $this->getEntity($serverEntity->getChassisInfoUID()); //파트정보의 사용가능한 갯수 , 사용갯수 비교 if ($entity->getAvailable() < 1) { - throw new \Exception("현재 사용가능한 {$serverEntity->getTitle()} 샷시가 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 현재 사용가능한 {$serverEntity->getTitle()} 샷시가 없습니다."); } $formDatas['used'] = $entity->getUsed() + 1; return parent::modify_process($entity, $formDatas); @@ -145,7 +146,7 @@ class CHASSISService extends EquipmentService $entity = $this->getEntity($serverEntity->getChassisInfoUID()); //파트정보의 사용된 갯수 , 회수용 갯수 비교 if ($entity->getUsed() < 1) { - throw new \Exception("현재 사용한 {$serverEntity->getTitle()} 샷시가 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 현재 사용한 {$serverEntity->getTitle()} 샷시가 없습니다."); } $formDatas['used'] = $entity->getUsed() - 1; return parent::modify_process($entity, $formDatas); diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index 4cdf784..ee42d13 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -118,7 +118,7 @@ class ServerPartService extends EquipmentService protected function create_process(array $formDatas): ServerPartEntity { if (!array_key_exists('type', $formDatas)) { - throw new \Exception(__METHOD__ . "에서 오류발생:부품형식이 지정되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:부품형식이 지정되지 않았습니다."); } //각 파트정보 가져오기 $partEntity = $this->getPartService($formDatas['type'])->getEntity($formDatas['part_uid']); @@ -127,7 +127,7 @@ class ServerPartService extends EquipmentService //서버파트 생성 $entity = parent::create_process($formDatas); if (!$entity instanceof ServerPartEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 ServerPartEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 ServerPartEntity만 가능"); } //해당 파트별 설정 수정 $this->getPartService($entity->getType())->attachToServerPart($entity); @@ -144,7 +144,7 @@ class ServerPartService extends EquipmentService protected function modify_process($entity, array $formDatas): ServerPartEntity { if (!array_key_exists('type', $formDatas)) { - throw new \Exception(__METHOD__ . "에서 오류발생:부품형식이 지정되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:부품형식이 지정되지 않았습니다."); } //각 파트정보 가져오기 $partEntity = $this->getPartService($formDatas['type'])->getEntity($formDatas['part_uid']); @@ -182,7 +182,7 @@ class ServerPartService extends EquipmentService //해당 파트정보 가져오기 $partEntity = $this->getPartService($parttype)->getEntity($part['UID']); if (!$partEntity instanceof PartEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$part['UID']} 파트정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$part['UID']} 파트정보를 찾을수 없습니다."); } //서버파트정보 생성 $formDatas = []; diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index 9b56d9d..b3311f4 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -192,7 +192,7 @@ class ServerService extends EquipmentService { $entity = $this->getEntity($uid); if (!$entity instanceof ServerEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생: {$uid} 서버 정보를 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid} 서버 정보를 찾을수 없습니다."); } $serverPartService = service('equipment_serverpartservice'); $caculatedAmount = $entity->getPrice(); @@ -211,7 +211,7 @@ class ServerService extends EquipmentService { $entity = parent::create_process($formDatas); if (!$entity instanceof ServerEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 ServerEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 ServerEntity만 가능"); } //서버추가시 서버파트 자동추가용 service('part_ipservice')->attachToServer($entity); @@ -230,7 +230,7 @@ class ServerService extends EquipmentService $oldEntity = clone $entity; $entity = parent::modify_process($entity, $formDatas); if (!$entity instanceof ServerEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 ServerEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 ServerEntity만 가능"); } //서버정보변경시 서버파트 정보변경용 //IP변경 @@ -269,7 +269,7 @@ class ServerService extends EquipmentService { $entity = $this->getEntity($uid); if (!$entity instanceof ServerEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생: 해당하는 서버정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 해당하는 서버정보을 찾을수 없습니다."); } $formDatas['serviceinfo_uid'] = $serviceEntity->getPK(); $formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID(); @@ -283,7 +283,7 @@ class ServerService extends EquipmentService { $entity = $this->getEntity($uid); if (!$entity instanceof ServerEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생: 해당하는 서버정보을 찾을수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 해당하는 서버정보을 찾을수 없습니다."); } $formDatas['serviceinfo_uid'] = NULL; $formDatas["clientinfo_uid"] = NULL; diff --git a/app/Services/Part/CPUService.php b/app/Services/Part/CPUService.php index 1f0519d..881beed 100644 --- a/app/Services/Part/CPUService.php +++ b/app/Services/Part/CPUService.php @@ -2,12 +2,13 @@ namespace App\Services\Part; -use App\Models\Part\CPUModel; -use App\Helpers\Part\CPUHelper; -use App\Forms\Part\CPUForm; -use App\Entities\Part\CPUEntity; -use App\Entities\Equipment\ServerPartEntity; use App\DTOs\Part\CPUDTO; +use App\Entities\Equipment\ServerPartEntity; +use App\Entities\Part\CPUEntity; +use App\Forms\Part\CPUForm; +use App\Helpers\Part\CPUHelper; +use App\Models\Part\CPUModel; +use RuntimeException; class CPUService extends PartType1Service { @@ -121,7 +122,7 @@ class CPUService extends PartType1Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof CPUEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 CPUEntity정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 CPUEntity정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/Part/CSService.php b/app/Services/Part/CSService.php index 0de3d26..09dbe95 100644 --- a/app/Services/Part/CSService.php +++ b/app/Services/Part/CSService.php @@ -151,7 +151,7 @@ class CSService extends PartType2Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof CSEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 CS정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 CS정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/Part/DISKService.php b/app/Services/Part/DISKService.php index b8a64f1..d09e2c4 100644 --- a/app/Services/Part/DISKService.php +++ b/app/Services/Part/DISKService.php @@ -126,7 +126,7 @@ class DISKService extends PartType1Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof DISKEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 DISKEntity정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 DISKEntity정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/Part/IPService.php b/app/Services/Part/IPService.php index c20f991..84b5e9c 100644 --- a/app/Services/Part/IPService.php +++ b/app/Services/Part/IPService.php @@ -2,13 +2,14 @@ namespace App\Services\Part; -use App\Models\Part\IPModel; -use App\Helpers\Part\IPHelper; -use App\Forms\Part\IPForm; -use App\Entities\Part\IPEntity; -use App\Entities\Equipment\ServerPartEntity; -use App\Entities\Equipment\ServerEntity; use App\DTOs\Part\IPDTO; +use App\Entities\Equipment\ServerEntity; +use App\Entities\Equipment\ServerPartEntity; +use App\Entities\Part\IPEntity; +use App\Forms\Part\IPForm; +use App\Helpers\Part\IPHelper; +use App\Models\Part\IPModel; +use RuntimeException; class IPService extends PartType3Service { @@ -141,7 +142,7 @@ class IPService extends PartType3Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity(['ip' => $serverEntity->getIP()]); if (!$entity instanceof IPEntity) { - throw new \Exception("{$serverEntity->getIP()}에 해당하는 IP정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverEntity->getIP()}에 해당하는 IP정보를 찾을수없습니다."); } return $entity; } @@ -166,7 +167,7 @@ class IPService extends PartType3Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof IPEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 IP정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 IP정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/Part/PartType1Service.php b/app/Services/Part/PartType1Service.php index 2791ca3..cfabde2 100644 --- a/app/Services/Part/PartType1Service.php +++ b/app/Services/Part/PartType1Service.php @@ -5,6 +5,7 @@ namespace App\Services\Part; use App\Entities\Equipment\ServerPartEntity; use App\Entities\Part\PartEntity; use App\Models\CommonModel; +use RuntimeException; abstract class PartType1Service extends PartService @@ -22,7 +23,7 @@ abstract class PartType1Service extends PartService $entity = $this->getPartEntityByServerPart($serverPartEntity); //파트정보의 사용가능한 갯수 , 사용갯수 비교 if ($entity->getAvailable() < $serverPartEntity->getCnt()) { - throw new \Exception("현재 사용가능 갯수[{$entity->getAvailable()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 현재 사용가능 갯수[{$entity->getAvailable()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); } $formDatas['used'] = $entity->getUsed() + $serverPartEntity->getCnt(); return parent::modify_process($entity, $formDatas); @@ -34,7 +35,7 @@ abstract class PartType1Service extends PartService $entity = $this->getPartEntityByServerPart($serverPartEntity); //파트정보의 사용된 갯수 , 회수용 갯수 비교 if ($entity->getUsed() < $serverPartEntity->getCnt()) { - throw new \Exception("현재 사용된 갯수[{$entity->getUsed()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 현재 사용된 갯수[{$entity->getUsed()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); } $formDatas['used'] = $entity->getUsed() - $serverPartEntity->getCnt(); return parent::modify_process($entity, $formDatas); diff --git a/app/Services/Part/RAMService.php b/app/Services/Part/RAMService.php index 407111d..48934dd 100644 --- a/app/Services/Part/RAMService.php +++ b/app/Services/Part/RAMService.php @@ -123,7 +123,7 @@ class RAMService extends PartType1Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof RAMEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 RAMEntity정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 RAMEntity정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/Part/SOFTWAREService.php b/app/Services/Part/SOFTWAREService.php index ade10cd..efbd49c 100644 --- a/app/Services/Part/SOFTWAREService.php +++ b/app/Services/Part/SOFTWAREService.php @@ -123,7 +123,7 @@ class SOFTWAREService extends PartType1Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof SOFTWAREEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 SOFTWAREEntity정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 SOFTWAREEntity정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/Part/SWITCHService.php b/app/Services/Part/SWITCHService.php index 795829d..96bceb1 100644 --- a/app/Services/Part/SWITCHService.php +++ b/app/Services/Part/SWITCHService.php @@ -144,7 +144,7 @@ class SWITCHService extends PartType3Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverEntity->getSwitchInfoUID()); if (!$entity instanceof SWITCHEntity) { - throw new \Exception("{$serverEntity->getSwitchInfoUID()}에 해당하는 IP정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverEntity->getSwitchInfoUID()}에 해당하는 IP정보를 찾을수없습니다."); } return $entity; } @@ -167,7 +167,7 @@ class SWITCHService extends PartType3Service //IP정보에서 해당하는 IP가 있으면 가져와서 사용중인지 체크 후 수정 $entity = $this->getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof SWITCHEntity) { - throw new \Exception(message: "{$serverPartEntity->getPartUID()}에 해당하는 Switch정보를 찾을수없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$serverPartEntity->getPartUID()}에 해당하는 Switch정보를 찾을수없습니다."); } return $entity; } diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 75d844b..74bfb38 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -12,6 +12,7 @@ use App\Entities\PaymentEntity; use App\Forms\PaymentForm; use App\Helpers\PaymentHelper; use App\Models\PaymentModel; +use CodeIgniter\Database\Exceptions\DatabaseException; use CodeIgniter\Validation\Exceptions\ValidationException; use DateTime; use RuntimeException; @@ -180,13 +181,13 @@ class PaymentService extends CommonService protected function create_process(array $formDatas): PaymentEntity { if (!array_key_exists('serviceinfo_uid', $formDatas)) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: 서비스가 정의되지 않았습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스가 정의되지 않았습니다."); } $serviceEntity = service('customer_serviceservice')->getEntity($formDatas['serviceinfo_uid']); $formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID(); $entity = parent::create_process($formDatas); if (!$entity instanceof PaymentEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 PaymentEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 PaymentEntity만 가능"); } //선결제인경우 서비스정보에 결제일 변경용 if ($formDatas['billing'] === PAYMENT['BILLING']['PREPAYMENT'] && array_key_exists('billing_at', $formDatas)) { @@ -199,7 +200,7 @@ class PaymentService extends CommonService { $entity = parent::modify_process($entity, $formDatas); if (!$entity instanceof PaymentEntity) { - throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 PaymentEntity만 가능"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 PaymentEntity만 가능"); } //선결제인경우 서비스정보에 결제일 변경용 if ($formDatas['billing'] === PAYMENT['BILLING']['PREPAYMENT'] && array_key_exists('billing_at', $formDatas)) { @@ -221,7 +222,7 @@ class PaymentService extends CommonService if (!array_key_exists($serviceEntity->getPK(), $rows[$clientEntity->getPK()]['services'])) { $serverEntity = service('equipment_serverservice')->getEntity($serviceEntity->getServerInfoUID()); if (!$serverEntity instanceof ServerEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생:[{$serviceEntity->getServerInfoUID()}]에 대한 서버정보를 찾을 수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:[{$serviceEntity->getServerInfoUID()}]에 대한 서버정보를 찾을 수 없습니다."); } $rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()] = [ 'ip' => $serverEntity->getIP(), @@ -255,30 +256,51 @@ class PaymentService extends CommonService ]; switch ($entity->getPay()) { case PAYMENT['PAY']['ACCOUNT']: - service('customer_accountservice')->create($formDatas); + service('customer_accountservice')->create_process($formDatas); break; case PAYMENT['PAY']['COUPON']: - service('customer_couponservice')->create($formDatas); + service('customer_couponservice')->create_process($formDatas); break; case PAYMENT['PAY']['POINT']: - service('customer_pointservice')->create($formDatas); + service('customer_pointservice')->create_process($formDatas); break; default: - throw new RuntimeException(__METHOD__ . "에서 오류발생: {$entity->getPay()}는 지정되지 않은 지불방식입니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$entity->getPay()}는 지정되지 않은 지불방식입니다."); // break; } return $entity; } public function paid($uid): PaymentEntity { - $entity = $this->getEntity($uid); - if (!$entity instanceof PaymentEntity) { - throw new \Exception(__METHOD__ . "에서 오류발생:[{$uid}]에 대한 결제정보를 찾을 수 없습니다."); + $db = \Config\Database::connect(); + try { + //트랜잭션 도중 DB 오류가 발생하면 DatabaseException을 던지도록 설정 + $db->transException(true)->transStart(); + $entity = $this->getEntity($uid); + if (!$entity instanceof PaymentEntity) { + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:[{$uid}]에 대한 결제정보를 찾을 수 없습니다."); + } + //결제 완료 처리 후 추가정보 처리 + $formDatas['status'] = STATUS['PAID']; + $fields = array_keys($formDatas); + $this->getFormService()->setFormFields($fields); + $this->getFormService()->setFormRules('modify', $fields); + $entity = parent::modify_process($entity, $formDatas); + $entity = $this->paid_process($entity); + $db->transComplete(); + return $entity; + } catch (DatabaseException $e) { + // DatabaseException을 포착하면 자동으로 롤백 처리됨 + throw new RuntimeException(sprintf( + "\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n", + __METHOD__, + $this->model->getLastQuery(), + $e->getMessage() + ), $e->getCode(), $e); + } catch (\Throwable $e) { + $db->transRollback(); // 예외 발생 시 수동으로 롤백 + throw new RuntimeException($e->getMessage(), 0, $e); } - //결제 완료 처리 후 추가정보 처리 - $formDatas['status'] = STATUS['PAID']; - $entity = parent::modify_process($entity, $formDatas); - return $this->paid_process($entity); } //서비스관련 @@ -330,7 +352,7 @@ class PaymentService extends CommonService private function getFormDatasByServerPart(ServerPartEntity $serverPartEntity, array $formDatas = []): array { if ($serverPartEntity->getServiceInfoUID() === null) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: 서비스정보가 정의되지 않아 일회성 상품을 설정하실수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스정보가 정의되지 않아 일회성 상품을 설정하실수 없습니다."); } $formDatas['serviceinfo_uid'] = $serverPartEntity->getServiceInfoUID(); $formDatas["clientinfo_uid"] = $serverPartEntity->getClientInfoUID(); @@ -353,7 +375,7 @@ class PaymentService extends CommonService public function modifyByServerPart(ServerPartEntity $serverPartEntity): PaymentEntity { if ($serverPartEntity->getServiceInfoUID() === null) { - throw new RuntimeException(__METHOD__ . "에서 오류발생: 서비스정보가 정의되지 않아 일회성 상품을 설정하실수 없습니다."); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스정보가 정의되지 않아 일회성 상품을 설정하실수 없습니다."); } //서버파트정보의 서비스번호가 같고, 청구방식이 onetime이고 상태가 UNPAID인 결제정보 가져와서 결제정보 수정 $entity = $this->getEntity([ diff --git a/app/Traits/FileTrait.php b/app/Traits/FileTrait.php index 7b94976..d04dbf4 100644 --- a/app/Traits/FileTrait.php +++ b/app/Traits/FileTrait.php @@ -2,13 +2,15 @@ namespace App\Traits; +use RuntimeException; + trait FileTrait { final protected function mkdir_FileTrait(string $path) { if (!is_dir($path)) { if (!mkdir($path, 0755, true)) { - throw new \Exception("디렉토리 생성 실패:{$path}"); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 디렉토리 생성 실패:{$path}"); } } } diff --git a/app/Traits/ImageTrait.php b/app/Traits/ImageTrait.php index 5fe05e3..2d6cdd4 100644 --- a/app/Traits/ImageTrait.php +++ b/app/Traits/ImageTrait.php @@ -4,6 +4,7 @@ namespace App\Traits; use App\Entities\Mangboard\BoardEntity; use App\Libraries\MyStorage\MangboardStorage; +use RuntimeException; trait ImageTrait { @@ -40,7 +41,7 @@ trait ImageTrait $this->_image = imagecreatefromwebp($file); break; default: - throw new \Exception("Unsupported image type: " . $this->_imageType); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 Unsupported image type: " . $this->_imageType); } } @@ -102,13 +103,13 @@ trait ImageTrait imagewebp($this->_image, $file, $compression); break; default: - throw new \Exception("Unsupported image type: " . $imageType); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 Unsupported image type: " . $imageType); } } // 메모리 해제를 위한 메소드 - final public function destroy_ImageTrait() - { - imagedestroy($this->_image); - } + // final public function destroy_ImageTrait() + // { + // imagedestroy($this->_image); + // } }