From 7298defef6a5c7f9bb433ecab4d4698476a2a8e9 Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Wed, 29 Oct 2025 13:14:37 +0900 Subject: [PATCH] dbmsv3 init...1 --- app/Controllers/CommonController.php | 45 ++----- app/Database/dbmsv3_test1.sql | 12 +- app/Services/CommonService.php | 161 +++++++++++++++++------ app/Services/Customer/AccountService.php | 16 +-- app/Services/Customer/ClientService.php | 21 +-- app/Services/Customer/CouponService.php | 11 +- app/Services/Customer/PointService.php | 11 +- app/Services/Customer/ServiceService.php | 15 +-- app/Services/Equipment/LineService.php | 4 +- app/Services/MyLogService.php | 4 +- app/Services/PaymentService.php | 9 +- app/Services/UserService.php | 10 +- 12 files changed, 193 insertions(+), 126 deletions(-) diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 3247f84..cc7c5d7 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -153,8 +153,6 @@ abstract class CommonController extends BaseController } public function create(): RedirectResponse|string { - $db = \Config\Database::connect(); - $db->transStart(); try { $this->getService()->setAction(__FUNCTION__); $this->getService()->setFormFields(); @@ -164,10 +162,8 @@ abstract class CommonController extends BaseController $this->getService()->setFormRules(); $this->doValidations(); $this->entity = $this->create_process($this->getService()->getFormDatas()); - $db->transCommit(); return $this->getResultSuccess(); } catch (\Exception $e) { - $db->transRollback(); return $this->getResultFail($e->getMessage()); } } @@ -205,9 +201,6 @@ abstract class CommonController extends BaseController } public function modify(int $uid): RedirectResponse|string { - //Transaction Start - $db = \Config\Database::connect(); - $db->transStart(); try { $this->getService()->setAction(__FUNCTION__); $this->getService()->setFormFields(); @@ -222,10 +215,8 @@ abstract class CommonController extends BaseController throw new \Exception("{$uid}에 대한 정보를 찾을수 없습니다."); } $this->entity = $this->modify_process($entity, $this->getService()->getFormDatas()); - $db->transCommit(); return $this->getResultSuccess(); } catch (\Exception $e) { - $db->transRollback(); return $this->getResultFail($e->getMessage()); } } @@ -236,9 +227,6 @@ abstract class CommonController extends BaseController } public function toggle(mixed $uid, string $field): RedirectResponse|string { - //Transaction Start - $db = \Config\Database::connect(); - $db->transStart(); try { $this->getService()->setAction(__FUNCTION__); $this->getService()->setFormFields([$field]); @@ -254,10 +242,8 @@ abstract class CommonController extends BaseController throw new \Exception("{$uid}에 대한 정보를 찾을수 없습니다."); } $this->entity = $this->toggle_process($entity, $this->getService()->getFormDatas()); - $db->transCommit(); return $this->getResultSuccess(); } catch (\Exception $e) { - $db->transRollback(); return $this->getResultFail($e->getMessage()); } } @@ -289,9 +275,6 @@ abstract class CommonController extends BaseController } public function batchjob(): RedirectResponse|string { - //Transaction Start - $db = \Config\Database::connect(); - $db->transStart(); try { $this->getService()->setAction(__FUNCTION__); list($selectedFields, $formDatas, $uids) = $this->batchjob_pre_process(); @@ -312,11 +295,13 @@ abstract class CommonController extends BaseController $entities[] = $this->batchjob_process($entity, $formDatas); } $this->entities = $entities; - $db->transCommit(); - LogCollector::debug(sprintf("%s에서 총 %s개중 %s개 일괄작업을 완료하였습니다.", __METHOD__, count($uids), count($this->entities))); - return $this->getResultSuccess(); + return $this->getResultSuccess(sprintf( + "%s에서 총 %s개중 %s개 일괄작업을 완료하였습니다.", + __METHOD__, + count($uids), + count($this->entities) + )); } catch (\Exception $e) { - $db->transRollback(); return $this->getResultFail($e->getMessage()); } } @@ -327,9 +312,6 @@ abstract class CommonController extends BaseController } public function delete(mixed $uid): RedirectResponse|string { - //Transaction Start - $db = \Config\Database::connect(); - $db->transStart(); try { $this->getService()->setAction(__FUNCTION__); //기존 Entity 가져오기 @@ -338,10 +320,8 @@ abstract class CommonController extends BaseController throw new \Exception("{$uid}에 대한 정보를 찾을수 없습니다."); } $this->delete_process($entity); - $db->transCommit(); return $this->getResultSuccess(); } catch (\Exception $e) { - $db->transRollback(); return $this->getResultFail($e->getMessage()); } } @@ -361,9 +341,6 @@ abstract class CommonController extends BaseController } public function batchjob_delete(): RedirectResponse|string { - //Transaction Start - $db = \Config\Database::connect(); - $db->transStart(); try { $this->getService()->setAction(__FUNCTION__); $uids = $this->batchjob_delete_pre_process(); @@ -377,11 +354,13 @@ abstract class CommonController extends BaseController $entities[] = $this->batchjob_delete_process($entity); } $this->entities = $entities; - $db->transCommit(); - LogCollector::debug(sprintf("%s에서 총 %s개중 %s개 일괄삭제를 완료하였습니다.", __METHOD__, count($uids), count($this->entities))); - return $this->getResultSuccess(); + return $this->getResultSuccess(sprintf( + "%s에서 총 %s개중 %s개 일괄삭제를 완료하였습니다.", + __METHOD__, + count($uids), + count($this->entities) + )); } catch (\Exception $e) { - $db->transRollback(); return $this->getResultFail($e->getMessage()); } } diff --git a/app/Database/dbmsv3_test1.sql b/app/Database/dbmsv3_test1.sql index c5ab7b7..d70551e 100644 --- a/app/Database/dbmsv3_test1.sql +++ b/app/Database/dbmsv3_test1.sql @@ -364,7 +364,7 @@ CREATE TABLE `mylog` ( PRIMARY KEY (`uid`), KEY `FK_user_TO_user_history` (`user_uid`), CONSTRAINT `FK_user_TO_user_history` FOREIGN KEY (`user_uid`) REFERENCES `user` (`uid`) -) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8 COMMENT='작업 기록 로그'; +) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COMMENT='작업 기록 로그'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -373,7 +373,7 @@ CREATE TABLE `mylog` ( LOCK TABLES `mylog` WRITE; /*!40000 ALTER TABLE `mylog` DISABLE KEYS */; -INSERT INTO `mylog` VALUES (1,44,'[HP DL360 Gen9E] 서버 추가',NULL,'available',NULL,'2025-10-21 08:52:51',NULL),(2,1,'[HP DL360 Gen8D] 서버 추가',NULL,'available',NULL,'2025-10-22 09:02:59',NULL),(4,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:27:56',NULL),(5,1,'[[2548D-M67/13.220.20.15] 2025년 10월 서비스비용] 일회성 결제',NULL,'available',NULL,'2025-10-22 09:27:56',NULL),(6,1,'[[gdidc_s68f8a39c1c110]13.220.20.15] 서비스정보 추가',NULL,'available',NULL,'2025-10-22 09:27:56',NULL),(7,1,'[HP DL360 Gen8D] 서버 수정',NULL,'available',NULL,'2025-10-22 09:29:25',NULL),(8,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:29:25',NULL),(9,1,'[[gdidc_s68f8a39c1c110]13.220.20.15] 서비스정보 수정',NULL,'available',NULL,'2025-10-22 09:29:25',NULL),(10,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:29:42',NULL),(11,1,'[HP DL360 Gen8D] 서버 수정',NULL,'available',NULL,'2025-10-22 09:37:32',NULL),(12,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:37:32',NULL),(13,1,'[[gdidc_s68f8a39c1c110]13.220.20.15] 서비스정보 수정',NULL,'available',NULL,'2025-10-22 09:37:32',NULL),(14,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:37:52',NULL),(15,1,'[닷디펜더] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:38:12',NULL),(16,1,'[닷디펜더] 서버파트정보 수정',NULL,'available',NULL,'2025-10-22 09:40:43',NULL),(17,1,'[10.21.34.20] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:44:00',NULL),(18,1,'[10.21.34.20] 서버파트정보 수정',NULL,'available',NULL,'2025-10-22 09:44:11',NULL),(19,1,'[8G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:45:01',NULL),(20,1,'[HP DL360 Gen9E] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:46:50',NULL),(21,1,'[Xeon E5-2690v4 3.0Ghz 20Core] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:47:49',NULL),(22,1,'[8G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:48:14',NULL),(23,1,'[SSD 256G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:48:41',NULL),(24,1,'[SSD 512G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:49:07',NULL),(25,1,'[SSD 256G] 서버파트정보 수정',NULL,'available',NULL,'2025-10-22 09:49:21',NULL),(26,1,'[HP DL360 Gen9E] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:50:40',NULL),(27,1,'[HP DL360 Gen8D] 서버 수정',NULL,'available',NULL,'2025-10-22 09:50:41',NULL),(28,1,'[HP DL360 Gen9E] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:50:41',NULL),(29,1,'[[gdidc_s68f8a39c1c110]13.220.20.4] 서비스정보 수정',NULL,'available',NULL,'2025-10-22 09:50:41',NULL),(30,1,'[[prime_s68f9b6c15cd13]13.220.20.15] 서비스정보 추가',NULL,'available',NULL,'2025-10-23 05:01:53',NULL),(31,1,'[[gdidc_s68f9b7c71552f]13.220.20.94] 서비스정보 추가',NULL,'available',NULL,'2025-10-23 05:06:15',NULL),(32,1,'[()] 서비스 추가',NULL,'available',NULL,'2025-10-24 01:45:56',NULL),(33,1,'[KCS] 서버 수정',NULL,'available',NULL,'2025-10-24 01:48:52',NULL),(34,1,'[HP DL360 Gen7C] 서버 수정',NULL,'occupied',NULL,'2025-10-24 01:48:52',NULL),(35,1,'[[itsolution_s68fada54][2547C-M26]] 서비스정보 수정',NULL,'available',NULL,'2025-10-24 01:48:52',NULL),(36,NULL,'[prime_s68fedbddaedbd][prime_s68fedbddaedbd][KCS-M33]28.23.54.22 서비스 추가',NULL,'available',NULL,'2025-10-27 02:41:33',NULL),(37,NULL,'[DESKTOP I7-10] 서버 추가',NULL,'available',NULL,'2025-10-27 03:37:30',NULL),(38,NULL,'[DESKTOP I5-9] 서버 추가',NULL,'available',NULL,'2025-10-28 02:12:27',NULL),(39,NULL,'DESKTOP I5-9 서버 삭제',NULL,'available',NULL,'2025-10-28 03:51:52',NULL),(40,NULL,'DESKTOP I7-10 서버 삭제',NULL,'available',NULL,'2025-10-28 03:52:44',NULL),(41,NULL,'Intel I5 10세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 04:42:59',NULL),(42,NULL,'DDR3 8G 서버파트 추가',NULL,'available',NULL,'2025-10-28 04:43:18',NULL),(43,NULL,'SSD 256G 서버파트 추가',NULL,'available',NULL,'2025-10-28 04:43:33',NULL),(44,NULL,'[DESKTOP I5-9] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:43:39',NULL),(45,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:44:03',NULL),(46,NULL,'[HP DL360 GEN7C] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:44:24',NULL),(47,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:44:40',NULL),(48,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:45:07',NULL),(49,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:45:30',NULL),(50,NULL,'Intel I5 10세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(51,NULL,'DDR3 8G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(52,NULL,'SSD 256G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(53,NULL,'[DESKTOP I5-10] 서버 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(54,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'available',NULL,'2025-10-28 07:31:23',NULL),(55,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'available',NULL,'2025-10-28 07:48:11',NULL),(56,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:49:35',NULL),(57,NULL,'[HP DL360 GEN7C] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:49:52',NULL),(58,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:50:47',NULL),(59,NULL,'Intel I5 10세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:52:09',NULL),(60,NULL,'Intel I5 12세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:53:17',NULL),(61,NULL,'ECC DDR3 4G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:53:27',NULL),(62,NULL,'SAS 128G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:53:37',NULL),(63,NULL,'Intel I5 9세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:56:29',NULL),(64,NULL,'ECC DDR3 8G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:56:41',NULL),(65,NULL,'SAS 512G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:56:51',NULL),(66,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:57:38',NULL),(67,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:59:13',NULL),(68,NULL,'[HP DL360 GEN7C] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:00:15',NULL),(69,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:00:25',NULL),(70,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:00:47',NULL),(71,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:01:13',NULL),(72,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:05:34',NULL),(73,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:12:01',NULL),(74,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:12:14',NULL),(75,NULL,'닷디펜더 서버파트 추가',NULL,'available',NULL,'2025-10-28 08:12:29',NULL),(76,NULL,'닷디펜더 서버파트 수정',NULL,'available',NULL,'2025-10-28 08:20:56',NULL),(77,NULL,'닷디펜더 서버파트 수정',NULL,'available',NULL,'2025-10-28 08:21:20',NULL),(78,NULL,'13.220.20.8 서버파트 추가',NULL,'available',NULL,'2025-10-28 08:22:04',NULL),(79,NULL,'13.220.20.8 서버파트 수정',NULL,'available',NULL,'2025-10-28 08:23:21',NULL),(80,NULL,'[[2529D-M20]HP DL360 GEN9E] 대체서버 추가',NULL,'available',NULL,'2025-10-29 00:06:54',NULL),(81,1,'[test.co.kr 도메인추가외 5개] 일회성 추가',NULL,'available',NULL,'2025-10-29 00:08:44',NULL); +INSERT INTO `mylog` VALUES (1,44,'[HP DL360 Gen9E] 서버 추가',NULL,'available',NULL,'2025-10-21 08:52:51',NULL),(2,1,'[HP DL360 Gen8D] 서버 추가',NULL,'available',NULL,'2025-10-22 09:02:59',NULL),(4,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:27:56',NULL),(5,1,'[[2548D-M67/13.220.20.15] 2025년 10월 서비스비용] 일회성 결제',NULL,'available',NULL,'2025-10-22 09:27:56',NULL),(6,1,'[[gdidc_s68f8a39c1c110]13.220.20.15] 서비스정보 추가',NULL,'available',NULL,'2025-10-22 09:27:56',NULL),(7,1,'[HP DL360 Gen8D] 서버 수정',NULL,'available',NULL,'2025-10-22 09:29:25',NULL),(8,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:29:25',NULL),(9,1,'[[gdidc_s68f8a39c1c110]13.220.20.15] 서비스정보 수정',NULL,'available',NULL,'2025-10-22 09:29:25',NULL),(10,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:29:42',NULL),(11,1,'[HP DL360 Gen8D] 서버 수정',NULL,'available',NULL,'2025-10-22 09:37:32',NULL),(12,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:37:32',NULL),(13,1,'[[gdidc_s68f8a39c1c110]13.220.20.15] 서비스정보 수정',NULL,'available',NULL,'2025-10-22 09:37:32',NULL),(14,1,'[HP DL360 Gen8D] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:37:52',NULL),(15,1,'[닷디펜더] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:38:12',NULL),(16,1,'[닷디펜더] 서버파트정보 수정',NULL,'available',NULL,'2025-10-22 09:40:43',NULL),(17,1,'[10.21.34.20] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:44:00',NULL),(18,1,'[10.21.34.20] 서버파트정보 수정',NULL,'available',NULL,'2025-10-22 09:44:11',NULL),(19,1,'[8G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:45:01',NULL),(20,1,'[HP DL360 Gen9E] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:46:50',NULL),(21,1,'[Xeon E5-2690v4 3.0Ghz 20Core] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:47:49',NULL),(22,1,'[8G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:48:14',NULL),(23,1,'[SSD 256G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:48:41',NULL),(24,1,'[SSD 512G] 서버파트정보 추가',NULL,'available',NULL,'2025-10-22 09:49:07',NULL),(25,1,'[SSD 256G] 서버파트정보 수정',NULL,'available',NULL,'2025-10-22 09:49:21',NULL),(26,1,'[HP DL360 Gen9E] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:50:40',NULL),(27,1,'[HP DL360 Gen8D] 서버 수정',NULL,'available',NULL,'2025-10-22 09:50:41',NULL),(28,1,'[HP DL360 Gen9E] 서버 수정',NULL,'occupied',NULL,'2025-10-22 09:50:41',NULL),(29,1,'[[gdidc_s68f8a39c1c110]13.220.20.4] 서비스정보 수정',NULL,'available',NULL,'2025-10-22 09:50:41',NULL),(30,1,'[[prime_s68f9b6c15cd13]13.220.20.15] 서비스정보 추가',NULL,'available',NULL,'2025-10-23 05:01:53',NULL),(31,1,'[[gdidc_s68f9b7c71552f]13.220.20.94] 서비스정보 추가',NULL,'available',NULL,'2025-10-23 05:06:15',NULL),(32,1,'[()] 서비스 추가',NULL,'available',NULL,'2025-10-24 01:45:56',NULL),(33,1,'[KCS] 서버 수정',NULL,'available',NULL,'2025-10-24 01:48:52',NULL),(34,1,'[HP DL360 Gen7C] 서버 수정',NULL,'occupied',NULL,'2025-10-24 01:48:52',NULL),(35,1,'[[itsolution_s68fada54][2547C-M26]] 서비스정보 수정',NULL,'available',NULL,'2025-10-24 01:48:52',NULL),(36,NULL,'[prime_s68fedbddaedbd][prime_s68fedbddaedbd][KCS-M33]28.23.54.22 서비스 추가',NULL,'available',NULL,'2025-10-27 02:41:33',NULL),(37,NULL,'[DESKTOP I7-10] 서버 추가',NULL,'available',NULL,'2025-10-27 03:37:30',NULL),(38,NULL,'[DESKTOP I5-9] 서버 추가',NULL,'available',NULL,'2025-10-28 02:12:27',NULL),(39,NULL,'DESKTOP I5-9 서버 삭제',NULL,'available',NULL,'2025-10-28 03:51:52',NULL),(40,NULL,'DESKTOP I7-10 서버 삭제',NULL,'available',NULL,'2025-10-28 03:52:44',NULL),(41,NULL,'Intel I5 10세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 04:42:59',NULL),(42,NULL,'DDR3 8G 서버파트 추가',NULL,'available',NULL,'2025-10-28 04:43:18',NULL),(43,NULL,'SSD 256G 서버파트 추가',NULL,'available',NULL,'2025-10-28 04:43:33',NULL),(44,NULL,'[DESKTOP I5-9] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:43:39',NULL),(45,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:44:03',NULL),(46,NULL,'[HP DL360 GEN7C] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:44:24',NULL),(47,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:44:40',NULL),(48,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:45:07',NULL),(49,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 04:45:30',NULL),(50,NULL,'Intel I5 10세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(51,NULL,'DDR3 8G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(52,NULL,'SSD 256G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(53,NULL,'[DESKTOP I5-10] 서버 추가',NULL,'available',NULL,'2025-10-28 07:30:05',NULL),(54,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'available',NULL,'2025-10-28 07:31:23',NULL),(55,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'available',NULL,'2025-10-28 07:48:11',NULL),(56,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:49:35',NULL),(57,NULL,'[HP DL360 GEN7C] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:49:52',NULL),(58,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:50:47',NULL),(59,NULL,'Intel I5 10세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:52:09',NULL),(60,NULL,'Intel I5 12세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:53:17',NULL),(61,NULL,'ECC DDR3 4G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:53:27',NULL),(62,NULL,'SAS 128G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:53:37',NULL),(63,NULL,'Intel I5 9세대 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:56:29',NULL),(64,NULL,'ECC DDR3 8G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:56:41',NULL),(65,NULL,'SAS 512G 서버파트 추가',NULL,'available',NULL,'2025-10-28 07:56:51',NULL),(66,NULL,'[DESKTOP I5-10] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:57:38',NULL),(67,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 07:59:13',NULL),(68,NULL,'[HP DL360 GEN7C] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:00:15',NULL),(69,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:00:25',NULL),(70,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:00:47',NULL),(71,NULL,'[HP DL360 GEN8D] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:01:13',NULL),(72,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:05:34',NULL),(73,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:12:01',NULL),(74,NULL,'[KCS] 서버 정보변경',NULL,'occupied',NULL,'2025-10-28 08:12:14',NULL),(75,NULL,'닷디펜더 서버파트 추가',NULL,'available',NULL,'2025-10-28 08:12:29',NULL),(76,NULL,'닷디펜더 서버파트 수정',NULL,'available',NULL,'2025-10-28 08:20:56',NULL),(77,NULL,'닷디펜더 서버파트 수정',NULL,'available',NULL,'2025-10-28 08:21:20',NULL),(78,NULL,'13.220.20.8 서버파트 추가',NULL,'available',NULL,'2025-10-28 08:22:04',NULL),(79,NULL,'13.220.20.8 서버파트 수정',NULL,'available',NULL,'2025-10-28 08:23:21',NULL),(80,NULL,'[[2529D-M20]HP DL360 GEN9E] 대체서버 추가',NULL,'available',NULL,'2025-10-29 00:06:54',NULL),(81,1,'[test.co.kr 도메인추가외 5개] 일회성 추가',NULL,'available',NULL,'2025-10-29 00:08:44',NULL),(82,1,'[2529D-M20]13.220.20.27=>[2548E-M68]13.220.20.6 메인서버변경',NULL,'available',NULL,'2025-10-29 00:58:09',NULL); /*!40000 ALTER TABLE `mylog` ENABLE KEYS */; UNLOCK TABLES; @@ -414,7 +414,7 @@ CREATE TABLE `payment` ( LOCK TABLES `payment` WRITE; /*!40000 ALTER TABLE `payment` DISABLE KEYS */; -INSERT INTO `payment` VALUES (17,1,820,52,'prime_s68d4e145a474d',NULL,950000,'month','2025-09-25',NULL,'unpaid','2025-10-16 00:57:48','2025-09-25 06:29:25',NULL),(18,1,1161,53,'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,'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,'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,'16G',NULL,300000,'onetime','2025-09-26',NULL,'unpaid',NULL,'2025-09-26 07:03:50',NULL),(22,1,820,52,'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,'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,'NVME 1T',NULL,150000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 01:50:08',NULL),(28,1,820,52,'SSD 256G',NULL,160000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 05:35:30',NULL),(29,1,820,56,'gdidc_s68dc70e2edb68',NULL,1550000,'month','2025-10-01',NULL,'unpaid','2025-10-16 06:45:46','2025-10-01 00:08:02',NULL),(32,1,819,57,'prime_s68dce40dd65df',NULL,650000,'month','2025-10-01',NULL,'unpaid','2025-10-16 01:04:24','2025-10-01 08:19:25',NULL),(33,1,820,52,'NVME 2T',NULL,180000,'onetime','2025-10-02',NULL,'unpaid',NULL,'2025-10-02 00:07:28',NULL),(34,1,711,58,'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,'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,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,400000,'month','2025-11-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:03',NULL),(38,45,1185,59,'도메인','도메인 구매',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,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,1000000,'onetime','2025-10-06','account','paid','2025-10-06 01:02:46','2025-10-06 00:54:59',NULL),(41,1,1186,60,'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,'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,'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,'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,'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,'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,'itsolution_s68d4e1b6',NULL,800000,'month','2025-10-14',NULL,'unpaid',NULL,'2025-10-14 08:28:35',NULL),(51,1,819,57,'테스트','테스트\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,'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,'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,'fffff','ffdgdfgdf',430000,'onetime','2025-10-15',NULL,'unpaid',NULL,'2025-10-15 07:33:28',NULL),(55,1,1155,64,'[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,'도메인 구매','<p>test.com</p>',40000,'onetime','2025-10-21',NULL,'unpaid',NULL,'2025-10-21 05:19:26',NULL),(57,11,1186,60,'a.com','<p>도메인 구매</p>',40000,'onetime','2025-10-21',NULL,'unpaid',NULL,'2025-10-21 05:20:08',NULL),(58,1,820,66,'[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,'8G',NULL,80000,'onetime','2025-10-22',NULL,'unpaid',NULL,'2025-10-22 09:45:01',NULL),(60,1,820,71,'[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,'[] 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,'[[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,'[[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,'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,'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); +INSERT INTO `payment` VALUES (17,1,820,52,'[[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,'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,'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,'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,'16G',NULL,300000,'onetime','2025-09-26',NULL,'unpaid',NULL,'2025-09-26 07:03:50',NULL),(22,1,820,52,'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,'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,'NVME 1T',NULL,150000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 01:50:08',NULL),(28,1,820,52,'SSD 256G',NULL,160000,'onetime','2025-09-30',NULL,'unpaid',NULL,'2025-09-30 05:35:30',NULL),(29,1,820,56,'gdidc_s68dc70e2edb68',NULL,1550000,'month','2025-10-01',NULL,'unpaid','2025-10-16 06:45:46','2025-10-01 00:08:02',NULL),(32,1,819,57,'prime_s68dce40dd65df',NULL,650000,'month','2025-10-01',NULL,'unpaid','2025-10-16 01:04:24','2025-10-01 08:19:25',NULL),(33,1,820,52,'NVME 2T',NULL,180000,'onetime','2025-10-02',NULL,'unpaid',NULL,'2025-10-02 00:07:28',NULL),(34,1,711,58,'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,'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,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,400000,'month','2025-11-06','account','paid','2025-10-05 23:57:23','2025-10-05 23:56:03',NULL),(38,45,1185,59,'도메인','도메인 구매',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,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,1000000,'onetime','2025-10-06','account','paid','2025-10-06 01:02:46','2025-10-06 00:54:59',NULL),(41,1,1186,60,'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,'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,'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,'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,'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,'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,'itsolution_s68d4e1b6',NULL,800000,'month','2025-10-14',NULL,'unpaid',NULL,'2025-10-14 08:28:35',NULL),(51,1,819,57,'테스트','테스트\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,'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,'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,'fffff','ffdgdfgdf',430000,'onetime','2025-10-15',NULL,'unpaid',NULL,'2025-10-15 07:33:28',NULL),(55,1,1155,64,'[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,'도메인 구매','<p>test.com</p>',40000,'onetime','2025-10-21',NULL,'unpaid',NULL,'2025-10-21 05:19:26',NULL),(57,11,1186,60,'a.com','<p>도메인 구매</p>',40000,'onetime','2025-10-21',NULL,'unpaid',NULL,'2025-10-21 05:20:08',NULL),(58,1,820,66,'[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,'8G',NULL,80000,'onetime','2025-10-22',NULL,'unpaid',NULL,'2025-10-22 09:45:01',NULL),(60,1,820,71,'[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,'[] 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,'[[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,'[[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,'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,'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); /*!40000 ALTER TABLE `payment` ENABLE KEYS */; UNLOCK TABLES; @@ -527,7 +527,7 @@ CREATE TABLE `serverinfo` ( LOCK TABLES `serverinfo` WRITE; /*!40000 ALTER TABLE `serverinfo` DISABLE KEYS */; -INSERT INTO `serverinfo` VALUES (17,1,1186,61,'2526A-M1','normal','C03PA19','13.220.20.5','UBUNTU24.04','HP DL360 GEN6B',1000000,'2025-08-31 15:00:00','2025-10-02 15:00:00','occupied','2025-10-16 01:54:10','2025-09-22 02:19:25',NULL),(18,1,1161,53,'2537B-M18','normal','C03PA08','13.220.20.28','UBUNTU24.04','HP DL360 GEN7C',400000,'2025-09-01 15:00:00','2025-10-01 15:00:00','occupied','2025-10-16 00:58:10','2025-09-22 02:21:51',NULL),(19,1,1087,54,'2528C-M19','normal','C03PA06','13.220.20.10','WINDOWS2008R2','HP DL360 GEN8D',800000,'2025-09-02 15:00:00','2025-10-12 15:00:00','occupied','2025-10-16 00:58:28','2025-09-22 02:22:14',NULL),(20,1,820,52,'2529D-M20','normal','C03PA07','13.220.20.27','CENTOS9','HP DL360 GEN9E',600000,'2025-09-03 15:00:00','2025-10-01 15:00:00','occupied','2025-10-16 00:57:48','2025-09-22 02:22:39',NULL),(21,1,1186,60,'2520Z-M21','vpn','C03PA17','13.220.20.30','WINDOWS2016R2','HP DL360 GEN10',700000,'2025-09-04 15:00:00','2025-10-01 15:00:00','occupied','2025-10-16 01:53:52','2025-09-22 02:23:08',NULL),(22,1,820,56,'2530Z-M22','dedicated','C03PA16','23.125.207.27','WINDOWS2019R2','HITACH HA3000',800000,'2025-09-05 15:00:00','2025-09-29 15:00:00','occupied','2025-10-16 06:45:46','2025-09-22 02:23:36',NULL),(23,1,819,57,'JPN-S23','event','C03PA01','13.220.20.1','CENTOS9','DESKTOP I5',200000,'2025-10-01 15:00:00',NULL,'occupied','2025-10-16 01:04:24','2025-10-01 08:16:56',NULL),(24,1,1087,54,'JPN-S24','alternative','C04PA21','13.220.20.13','WINDOWS2008R2','DESKTOP I5-10',200000,'2025-10-01 15:00:00','2025-10-12 15:00:00','occupied','2025-10-28 07:57:38','2025-10-01 08:52:19',NULL),(25,1,820,74,'2548E-M25','event','C03PA22','13.220.20.94','DEBIAN12','HP DL360 GEN8D',700000,'2025-09-30 15:00:00','2025-10-15 15:00:00','occupied','2025-10-28 08:01:13','2025-10-02 03:55:46',NULL),(26,1,820,78,'2547C-M26','dedicated','C03PA26','13.220.20.2','WINDOWS11','HP DL360 GEN7C',500000,'2025-09-30 15:00:00','2025-10-02 15:00:00','occupied','2025-10-28 08:00:15','2025-10-02 03:58:53',NULL),(27,1,711,58,'2548D-M27','normal','C03PA15','13.220.20.63','WINDOWS11','HP DL360 GEN8D',900000,'2025-10-01 15:00:00',NULL,'occupied','2025-10-16 01:48:27','2025-10-02 04:02:16',NULL),(31,1,1185,59,'2412E-M29','normal','C03PA21','13.220.20.34','DEBIAN10','HP DL360 GEN9E',500000,'2025-10-03 15:00:00',NULL,'occupied','2025-10-16 01:53:30','2025-10-03 01:08:32',NULL),(32,1,1155,64,'2543E-M32','normal','C01PA45','13.220.20.25','UBUNTU22.04','HP DL360 GEN6B',500000,'2025-10-03 15:00:00',NULL,'occupied','2025-10-17 06:22:15','2025-10-03 01:10:09',NULL),(55,1,1161,79,'KCS-M33','normal','C01PA46','13.220.20.3','UBUNTU24.04','KCS',350000,'2025-10-01 15:00:00','2025-10-23 15:00:00','occupied','2025-10-28 08:12:14','2025-10-03 05:32:51',NULL),(63,1,842,62,'254D9-M56','defence','C02PA09','13.220.20.9','CENTOS9','HP DL360 GEN9E',400000,'2025-10-08 15:00:00',NULL,'occupied','2025-10-16 01:54:24','2025-10-15 07:06:56',NULL),(64,1,842,63,'2549D-M64','normal','C03PA02','13.220.20.7','UBUNTU24.04','HP DL360 GEN9E',400000,'2025-10-08 15:00:00',NULL,'occupied','2025-10-16 01:54:36','2025-10-15 07:23:19',NULL),(66,44,820,66,'2549E-M65','event','C03PA03','13.220.20.4','WINDOWS2008R2','HP DL360 GEN9E',400000,'2025-10-15 15:00:00',NULL,'occupied','2025-10-22 09:50:41','2025-10-21 08:52:51',NULL),(67,1,820,71,'2548D-M67','event','C04PA03(PA','13.220.20.15','WINDOWS11','HP DL360 GEN8D',500000,'2025-09-30 15:00:00','2025-10-21 15:00:00','occupied','2025-10-23 05:01:53','2025-10-22 09:02:59',NULL),(72,1,820,52,'2548E-M68','alternative','C03PA14','13.220.20.6','WINDOWS2012R2','DESKTOP I5-10',200000,'2025-10-15 15:00:00',NULL,'occupied','2025-10-29 00:06:54','2025-10-28 07:30:05',NULL); +INSERT INTO `serverinfo` VALUES (17,1,1186,61,'2526A-M1','normal','C03PA19','13.220.20.5','UBUNTU24.04','HP DL360 GEN6B',1000000,'2025-08-31 15:00:00','2025-10-02 15:00:00','occupied','2025-10-16 01:54:10','2025-09-22 02:19:25',NULL),(18,1,1161,53,'2537B-M18','normal','C03PA08','13.220.20.28','UBUNTU24.04','HP DL360 GEN7C',400000,'2025-09-01 15:00:00','2025-10-01 15:00:00','occupied','2025-10-16 00:58:10','2025-09-22 02:21:51',NULL),(19,1,1087,54,'2528C-M19','normal','C03PA06','13.220.20.10','WINDOWS2008R2','HP DL360 GEN8D',800000,'2025-09-02 15:00:00','2025-10-12 15:00:00','occupied','2025-10-16 00:58:28','2025-09-22 02:22:14',NULL),(20,1,820,52,'2529D-M20','normal','C03PA07','13.220.20.27','CENTOS9','HP DL360 GEN9E',600000,'2025-09-03 15:00:00','2025-10-01 15:00:00','occupied','2025-10-16 00:57:48','2025-09-22 02:22:39',NULL),(21,1,1186,60,'2520Z-M21','vpn','C03PA17','13.220.20.30','WINDOWS2016R2','HP DL360 GEN10',700000,'2025-09-04 15:00:00','2025-10-01 15:00:00','occupied','2025-10-16 01:53:52','2025-09-22 02:23:08',NULL),(22,1,820,56,'2530Z-M22','dedicated','C03PA16','23.125.207.27','WINDOWS2019R2','HITACH HA3000',800000,'2025-09-05 15:00:00','2025-09-29 15:00:00','occupied','2025-10-16 06:45:46','2025-09-22 02:23:36',NULL),(23,1,819,57,'JPN-S23','event','C03PA01','13.220.20.1','CENTOS9','DESKTOP I5',200000,'2025-10-01 15:00:00',NULL,'occupied','2025-10-16 01:04:24','2025-10-01 08:16:56',NULL),(24,1,1087,54,'JPN-S24','alternative','C04PA21','13.220.20.13','WINDOWS2008R2','DESKTOP I5-10',200000,'2025-10-01 15:00:00','2025-10-12 15:00:00','occupied','2025-10-28 07:57:38','2025-10-01 08:52:19',NULL),(25,1,820,74,'2548E-M25','event','C03PA22','13.220.20.94','DEBIAN12','HP DL360 GEN8D',700000,'2025-09-30 15:00:00','2025-10-15 15:00:00','occupied','2025-10-28 08:01:13','2025-10-02 03:55:46',NULL),(26,1,820,78,'2547C-M26','dedicated','C03PA26','13.220.20.2','WINDOWS11','HP DL360 GEN7C',500000,'2025-09-30 15:00:00','2025-10-02 15:00:00','occupied','2025-10-28 08:00:15','2025-10-02 03:58:53',NULL),(27,1,711,58,'2548D-M27','normal','C03PA15','13.220.20.63','WINDOWS11','HP DL360 GEN8D',900000,'2025-10-01 15:00:00',NULL,'occupied','2025-10-16 01:48:27','2025-10-02 04:02:16',NULL),(31,1,1185,59,'2412E-M29','normal','C03PA21','13.220.20.34','DEBIAN10','HP DL360 GEN9E',500000,'2025-10-03 15:00:00',NULL,'occupied','2025-10-16 01:53:30','2025-10-03 01:08:32',NULL),(32,1,1155,64,'2543E-M32','normal','C01PA45','13.220.20.25','UBUNTU22.04','HP DL360 GEN6B',500000,'2025-10-03 15:00:00',NULL,'occupied','2025-10-17 06:22:15','2025-10-03 01:10:09',NULL),(55,1,1161,79,'KCS-M33','normal','C01PA46','13.220.20.3','UBUNTU24.04','KCS',350000,'2025-10-01 15:00:00','2025-10-23 15:00:00','occupied','2025-10-28 08:12:14','2025-10-03 05:32:51',NULL),(63,1,842,62,'254D9-M56','defence','C02PA09','13.220.20.9','CENTOS9','HP DL360 GEN9E',400000,'2025-10-08 15:00:00',NULL,'occupied','2025-10-16 01:54:24','2025-10-15 07:06:56',NULL),(64,1,842,63,'2549D-M64','normal','C03PA02','13.220.20.7','UBUNTU24.04','HP DL360 GEN9E',400000,'2025-10-08 15:00:00',NULL,'occupied','2025-10-16 01:54:36','2025-10-15 07:23:19',NULL),(66,44,820,66,'2549E-M65','event','C03PA03','13.220.20.4','WINDOWS2008R2','HP DL360 GEN9E',400000,'2025-10-15 15:00:00',NULL,'occupied','2025-10-22 09:50:41','2025-10-21 08:52:51',NULL),(67,1,820,71,'2548D-M67','event','C04PA03(PA','13.220.20.15','WINDOWS11','HP DL360 GEN8D',500000,'2025-09-30 15:00:00','2025-10-21 15:00:00','occupied','2025-10-23 05:01:53','2025-10-22 09:02:59',NULL),(72,1,820,52,'2548E-M68','normal','C03PA14','13.220.20.6','WINDOWS2012R2','DESKTOP I5-10',200000,'2025-10-15 15:00:00',NULL,'occupied','2025-10-29 00:58:09','2025-10-28 07:30:05',NULL); /*!40000 ALTER TABLE `serverinfo` ENABLE KEYS */; UNLOCK TABLES; @@ -620,7 +620,7 @@ CREATE TABLE `serviceinfo` ( LOCK TABLES `serviceinfo` WRITE; /*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */; -INSERT INTO `serviceinfo` VALUES (52,1,820,20,17,'prime_s68d4e145a474d','[2529D-M20]HP DL360 GEN9E','prime','chiba',100000,300000,'2025-09-25',100000,950000,'2025-09-25',NULL,'test1234\r\ntesst2123','available','2025-10-16 00:57:48','2025-09-25 06:29:25',NULL),(53,1,1161,18,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,20,'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,29,'gdidc_s68dc70e2edb68','[2530Z-M22]HITACH HA3000','gdidc','chiba',100000,300000,'2025-10-01',0,1550000,'2025-10-01',NULL,NULL,'available','2025-10-16 06:45:46','2025-10-01 00:08:02',NULL),(57,1,819,23,32,'prime_s68dce40dd65df','[JPN-S23]DESKTOP I5','prime','chiba',100000,300000,'2025-10-01',100000,650000,'2025-10-01',NULL,NULL,'available','2025-10-16 01:04:24','2025-10-01 08:19:25',NULL),(58,1,711,27,34,'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,35,'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,41,'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,42,'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,52,'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,53,'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,55,'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,58,'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,60,'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,61,'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,64,'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,65,'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); +INSERT INTO `serviceinfo` VALUES (52,1,820,72,17,'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,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,20,'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,29,'gdidc_s68dc70e2edb68','[2530Z-M22]HITACH HA3000','gdidc','chiba',100000,300000,'2025-10-01',0,1550000,'2025-10-01',NULL,NULL,'available','2025-10-16 06:45:46','2025-10-01 00:08:02',NULL),(57,1,819,23,32,'prime_s68dce40dd65df','[JPN-S23]DESKTOP I5','prime','chiba',100000,300000,'2025-10-01',100000,650000,'2025-10-01',NULL,NULL,'available','2025-10-16 01:04:24','2025-10-01 08:19:25',NULL),(58,1,711,27,34,'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,35,'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,41,'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,42,'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,52,'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,53,'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,55,'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,58,'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,60,'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,61,'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,64,'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,65,'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); /*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */; UNLOCK TABLES; @@ -738,4 +738,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2025-10-29 9:57:46 +-- Dump completed on 2025-10-29 11:49:05 diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index 6df87c2..d398a8b 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -7,6 +7,7 @@ use App\Models\CommonModel; use App\Services\Customer\ClientService; use App\Services\UserService; use App\Services\MyLogService; +use RuntimeException; abstract class CommonService { @@ -299,51 +300,135 @@ abstract class CommonService return $formDatas; } //생성 + protected function create_process(array $formDatas): mixed + { + return $this->getModel()->create($formDatas); + } public function create(array $formDatas): mixed { - $entity = $this->getEntity_process($this->getModel()->create($formDatas)); - // LogCollector::info("[{$entity->getTitle()}]" . MESSAGES["CREATED"] . ":"); - return $entity; - } - //수정 - public function modify(mixed $entity, array $formDatas): mixed - { - $entity = $this->getEntity_process($this->getModel()->modify($entity, $formDatas)); - // LogCollector::info("[{$entity->getTitle()}]" . MESSAGES["UPDATED"] . ":"); - return $entity; - } - //단일작업 - public function toggle(mixed $entity, array $formDatas): mixed - { - $entity = $this->getEntity_process($this->getModel()->modify($entity, $formDatas)); - // LogCollector::info("[{$entity->getTitle()}]" . MESSAGES["UPDATED"] . ":"); - return $entity; - } - //일괄처리작업 - public function batchjob(mixed $entity, array $formDatas): mixed - { - $entity = $this->getEntity_process($this->getModel()->modify($entity, $formDatas)); - // LogCollector::info("[{$entity->getTitle()}]" . MESSAGES["UPDATED"] . ":"); - return $entity; - } - //삭제 - public function delete(mixed $entity): mixed - { + $db = \Config\Database::connect(); + $db->transStart(); try { - $message = "[{$entity->getTitle()}]" . MESSAGES["DELETED"] . ":"; - if (!$this->getModel()->delete($entity->getPK())) { - throw new \Exception(var_export($this->getModel()->errors(), true)); + $entity = $this->create_process($formDatas); + $db->transComplete(); + if ($db->transStatus() === false) { + throw new RuntimeException('트랜잭션 실패: DB 상태 문제'); } - // LogCollector::info($message); return $entity; - } catch (\Exception $e) { - $message = sprintf( - "\n------%s SQL오류-----\n%s\n%s\n------------------------------\n", - __FUNCTION__, + } catch (\Throwable $e) { + $db->transRollback(); // 예외 발생 시 수동으로 롤백 + throw new RuntimeException(sprintf( + "\n------%s-----\n%s\n%s\n------------------------------\n", + __METHOD__, $this->getModel()->getLastQuery(), $e->getMessage() - ); - throw new \Exception($message); + ), 0, $e); + } + } + //수정 + protected function modify_process(mixed $entity, array $formDatas): mixed + { + return $this->getModel()->modify($entity, $formDatas); + } + public function modify(mixed $entity, array $formDatas): mixed + { + $db = \Config\Database::connect(); + $db->transStart(); + try { + $entity = $this->modify_process($entity, $formDatas); + $db->transComplete(); + if ($db->transStatus() === false) { + throw new RuntimeException('트랜잭션 실패: DB 상태 문제'); + } + return $entity; + } catch (\Throwable $e) { + $db->transRollback(); // 예외 발생 시 수동으로 롤백 + throw new RuntimeException(sprintf( + "\n------%s-----\n%s\n%s\n------------------------------\n", + __METHOD__, + $this->getModel()->getLastQuery(), + $e->getMessage() + ), 0, $e); + } + } + //단일작업 + protected function toggle_process(mixed $entity, array $formDatas): mixed + { + return $this->getModel()->modify($entity, $formDatas); + } + public function toggle(mixed $entity, array $formDatas): mixed + { + $db = \Config\Database::connect(); + $db->transStart(); + try { + $entity = $this->toggle_process($entity, $formDatas); + $db->transComplete(); + if ($db->transStatus() === false) { + throw new RuntimeException('트랜잭션 실패: DB 상태 문제'); + } + return $entity; + } catch (\Throwable $e) { + $db->transRollback(); // 예외 발생 시 수동으로 롤백 + throw new RuntimeException(sprintf( + "\n------%s-----\n%s\n%s\n------------------------------\n", + __METHOD__, + $this->getModel()->getLastQuery(), + $e->getMessage() + ), 0, $e); + } + } + //일괄처리작업 + protected function batchjob_process(mixed $entity, array $formDatas): mixed + { + return $this->getModel()->modify($entity, $formDatas); + } + public function batchjob(mixed $entity, array $formDatas): mixed + { + $db = \Config\Database::connect(); + $db->transStart(); + try { + $entity = $this->batchjob_process($entity, $formDatas); + $db->transComplete(); + if ($db->transStatus() === false) { + throw new RuntimeException('트랜잭션 실패: DB 상태 문제'); + } + return $entity; + } catch (\Throwable $e) { + $db->transRollback(); // 예외 발생 시 수동으로 롤백 + throw new RuntimeException(sprintf( + "\n------%s-----\n%s\n%s\n------------------------------\n", + __METHOD__, + $this->getModel()->getLastQuery(), + $e->getMessage() + ), 0, $e); + } + } + //삭제 + protected function delete_process(string $uid): bool + { + return $this->getModel()->delete($uid); + } + public function delete(mixed $entity): mixed + { + $db = \Config\Database::connect(); + $db->transStart(); + try { + if (!$this->delete_process($entity->getPK())) { + throw new RuntimeException(var_export($this->getModel()->errors(), true)); + } + $db->transComplete(); + if ($db->transStatus() === false) { + throw new RuntimeException('트랜잭션 실패: DB 상태 문제'); + } + return $entity; + } catch (\Throwable $e) { + $db->transRollback(); // 예외 발생 시 수동으로 롤백 + throw new RuntimeException(sprintf( + "\n------%s-----\n%s\n%s\n------------------------------\n", + __METHOD__, + $this->getModel()->getLastQuery(), + $e->getMessage() + ), 0, $e); } } ////Index 검색용 diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php index 785b2e7..f581d12 100644 --- a/app/Services/Customer/AccountService.php +++ b/app/Services/Customer/AccountService.php @@ -64,21 +64,21 @@ class AccountService extends CustomerService 'status' => STATUS['WITHDRAWAL'], ]; $this->setBalance($formDatas); - return parent::create($formDatas); + return $this->getModel()->create($formDatas)($formDatas); } //기본 기능부분 //생성 - public function create(array $formDatas): AccountEntity + protected function create_process(array $formDatas): AccountEntity { $this->setBalance($formDatas); - $entity = parent::create($formDatas); - //Log처리 - $this->getMylogService()->create([ - 'title' => "[{$entity->getTitle()}] 예치금 처리", - 'status' => $entity->getStatus() - ]); + $entity = parent::create_process($formDatas)($formDatas); return $entity; } + //수정 + public function modify(mixed $entity, array $formDatas): AccountEntity + { + throw new \Exception("예치금은 수정하실 수 없습니다."); + } //List 검색용 public function index_condition_filterWord(string $word): void { diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php index 2bb7c21..9a18b2d 100644 --- a/app/Services/Customer/ClientService.php +++ b/app/Services/Customer/ClientService.php @@ -146,25 +146,21 @@ class ClientService extends CustomerService } //기본 기능부분 //생성 - public function create(array $formDatas): ClientEntity + protected function create_process(array $formDatas): ClientEntity { $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); - return parent::create($formDatas); + $entity = parent::create_process($formDatas); + return $entity; } - public function modify(mixed $entity, array $formDatas): ClientEntity + protected function modify_process(mixed $entity, array $formDatas): ClientEntity { //Role을 지정이 있을경우에만 , toggle이나 batcjhjob에서는 없을수도 있으므로 if (isset($formDatas['role'])) { $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); } - return parent::modify($entity, $formDatas); + $entity = parent::modify_process($entity, $formDatas); + return $entity; } - //비고(History)설정 - public function history(mixed $entity, array $formDatas): ClientEntity - { - return parent::modify($entity, $formDatas); - } - //List 검색용 //FormFilter 조건절 처리 public function index_condition_filterField(string $field, mixed $filter_value): void @@ -192,4 +188,9 @@ class ClientService extends CustomerService $this->getModel()->orderBy("site ASC,name ASC"); parent::setOrderBy($field, $value); } + //비고(History)설정 + public function history(mixed $entity, array $formDatas): ClientEntity + { + return $this->getModel()->modify($entity, $formDatas); + } } diff --git a/app/Services/Customer/CouponService.php b/app/Services/Customer/CouponService.php index f988230..76f4468 100644 --- a/app/Services/Customer/CouponService.php +++ b/app/Services/Customer/CouponService.php @@ -48,13 +48,16 @@ class CouponService extends CustomerService return $this->getClientService()->setCoupon($formDatas['status'], $entity, intval($formDatas['cnt'])); } //기본 기능부분 - public function create(array $formDatas): CouponEntity + protected function create_process(array $formDatas): CouponEntity { // dd($formDatas); $this->setBalance($formDatas); - $entity = parent::create($formDatas); - //Log처리 - $this->getMylogService()->create(['title' => "[{$entity->getTitle()}] 쿠폰 처리", 'status' => $entity->getStatus()]); + $entity = parent::create_process($formDatas); return $entity; } + //수정 + public function modify(mixed $entity, array $formDatas): CouponEntity + { + throw new \Exception("쿠폰은 수정하실 수 없습니다."); + } } diff --git a/app/Services/Customer/PointService.php b/app/Services/Customer/PointService.php index be14cbd..56aa498 100644 --- a/app/Services/Customer/PointService.php +++ b/app/Services/Customer/PointService.php @@ -48,12 +48,15 @@ class PointService extends CustomerService return $this->getClientService()->setPoint($formDatas['status'], $entity, intval($formDatas['amount'])); } //기본 기능부분 - public function create(array $formDatas): PointEntity + protected function create_process(array $formDatas): PointEntity { $this->setBalance($formDatas); - $entity = parent::create($formDatas); - //Log처리 - $this->getMylogService()->create(['title' => "[{$entity->getTitle()}] 포인트 처리", 'status' => $entity->getStatus()]); + $entity = parent::create_process($formDatas); return $entity; } + //수정 + public function modify(mixed $entity, array $formDatas): PointEntity + { + throw new \Exception("포인트는 수정하실 수 없습니다."); + } } diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index c98448d..5fd29ac 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -4,7 +4,6 @@ namespace App\Services\Customer; use App\Entities\Customer\ServiceEntity; use App\Entities\Equipment\ServerEntity; -use App\Entities\PaymentEntity; use App\Helpers\Customer\ServiceHelper; use App\Models\Customer\ServiceModel; use App\Services\Equipment\ServerService; @@ -198,7 +197,7 @@ class ServiceService extends CustomerService return $options; } //생성 - public function create(array $formDatas): ServiceEntity + protected function create_process(array $formDatas): ServiceEntity { if (!isset($formDatas['serverinfo_uid'])) { throw new \Exception('변경할 서버가 지정되지 않았습니다.'); @@ -213,7 +212,7 @@ class ServiceService extends CustomerService return $processor->create($formDatas); } //수정 - public function modify(mixed $entity, array $formDatas): ServiceEntity + protected function modify_process(mixed $entity, array $formDatas): ServiceEntity { $processor = new Proceessor( \Config\Database::connect(), @@ -236,11 +235,6 @@ class ServiceService extends CustomerService ); return $processor->delete($entity); } - //비고(History)설정 - public function history(mixed $entity, array $formDatas): ServiceEntity - { - return parent::modify($entity, $formDatas); - } //대체서버추가 public function addeAlternativeServer(ServiceEntity $entity, array $formDatas): ServiceEntity { @@ -279,4 +273,9 @@ class ServiceService extends CustomerService $this->getServerService()->detachFromService($formDatas['serverinfo_uid']); return $entity; } + //비고(History)설정 + public function history(mixed $entity, array $formDatas): ServiceEntity + { + return $this->getModel()->modify($entity, $formDatas); + } } diff --git a/app/Services/Equipment/LineService.php b/app/Services/Equipment/LineService.php index a9692fc..fef7cb2 100644 --- a/app/Services/Equipment/LineService.php +++ b/app/Services/Equipment/LineService.php @@ -45,10 +45,10 @@ class LineService extends EquipmentService return $this->_ipService; } //기본 기능부분 - public function create(array $formDatas): LineEntity + protected function create_process(array $formDatas): LineEntity { //서버정보 생성 - $entity = parent::create($formDatas); + $entity = parent::create_process($formDatas); //Prefixed IP to array 자동 등록 foreach ($this->getHelper()->cidrToIpRange($formDatas['bandwith']) as $ip) { $this->getIPService()->create([ diff --git a/app/Services/MyLogService.php b/app/Services/MyLogService.php index 92658d5..351c11c 100644 --- a/app/Services/MyLogService.php +++ b/app/Services/MyLogService.php @@ -53,10 +53,10 @@ class MyLogService extends CommonService $this->getModel()->orLike($this->getModel()::TABLE . "." . $this->getModel()::TITLE, $word, 'both'); $this->getModel()->orLike($this->getModel()::TABLE . '.content', $word, 'both'); } - public function create(array $formDatas): MyLogEntity + protected function create_process(array $formDatas): MyLogEntity { //관리자(작업자정보) 등록 $formDatas['user_uid'] = $this->getMyAuth()->getUIDByAuthInfo(); - return parent::create($formDatas); + return parent::create_process($formDatas); } } diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 22a813e..dd697a3 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -282,7 +282,7 @@ class PaymentService extends CommonService implements PaymentInterface } //Action 기능 //일회성용 결제처리 등록(일회성은 예치금에 관련된것만 등록한다.) - public function create(array $formDatas): PaymentEntity + protected function create_process(array $formDatas): PaymentEntity { if (!array_key_exists('serviceinfo_uid', $formDatas)) { throw new \Exception("서비스정보가 없습니다."); @@ -294,12 +294,7 @@ class PaymentService extends CommonService implements PaymentInterface } //결제 완료 처리 후 추가정보 처리 $formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID(); - $entity = parent::create($formDatas); - //Log처리 - $this->getMylogService()->create([ - 'title' => "[{$entity->getTitle()}] 일회성 추가", - 'status' => $entity->getStatus() - ]); + $entity = parent::create_process($formDatas); return $entity; } //결제정보 삭제 diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 5575583..e2f2698 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -50,12 +50,13 @@ class UserService extends CommonService } //기본 기능부분 - public function create(array $formDatas): UserEntity + protected function create_process(array $formDatas): UserEntity { $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); - return parent::create($formDatas); + $entity = parent::create_process($formDatas); + return $entity; } - public function modify(mixed $entity, array $formDatas): UserEntity + protected function modify_process(mixed $entity, array $formDatas): UserEntity { // die(var_export($formDatas, true)); //암호를 입력하지 않았을시는 변경하기 않게 하기위함 @@ -68,7 +69,8 @@ class UserService extends CommonService $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); } // die(var_export($formDatas, true)); - return parent::modify($entity, $formDatas); + $entity = parent::modify_process($entity, $formDatas); + return $entity; } //List 검색용 //FormFilter 조건절 처리