From 6a4088183981948659a2ea8b46222ab6b17ab925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 12 Dec 2025 18:15:25 +0900 Subject: [PATCH] dbmsv4 init...3 --- app/Controllers/Admin/Customer/ClientController.php | 3 ++- app/Controllers/Admin/Customer/ServiceController.php | 6 ++++-- app/Forms/CommonForm.php | 3 ++- app/Services/CommonService.php | 1 + app/Services/Customer/Wallet/WalletService.php | 1 + 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php index 125b30a..5353318 100644 --- a/app/Controllers/Admin/Customer/ClientController.php +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -60,7 +60,8 @@ class ClientController extends CustomerController if (!$history) { throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 비고가 정의되지 않았습니다."); } - $this->addViewDatas('entity', $this->service->modify($uid, ['history' => $history])); + $entity = $this->service->modify($uid, ['history' => $history]); + $this->addViewDatas('entity', $entity); return $this->action_redirect_process('info', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 비고설정이 완료되었습니다."); } catch (\Throwable $e) { return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 비고설정 오류:" . $e->getMessage()); diff --git a/app/Controllers/Admin/Customer/ServiceController.php b/app/Controllers/Admin/Customer/ServiceController.php index abcb84c..18a5e05 100644 --- a/app/Controllers/Admin/Customer/ServiceController.php +++ b/app/Controllers/Admin/Customer/ServiceController.php @@ -51,7 +51,8 @@ class ServiceController extends CustomerController if (!$history) { throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 비고가 정의되지 않았습니다."); } - $this->addViewDatas('entity', $this->service->modify($uid, ['history' => $history])); + $entity = $this->service->modify($uid, ['history' => $history]); + $this->addViewDatas('entity', $entity); return $this->action_redirect_process('info', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 비고설정이 완료되었습니다."); } catch (\Throwable $e) { return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 비고설정 오류:" . $e->getMessage()); @@ -66,7 +67,8 @@ class ServiceController extends CustomerController if (!$billing_at) { throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 결제일이 정의되지 않았습니다."); } - $this->addViewDatas('entity', $this->service->modify($uid, ['billing_at' => $billing_at])); + $entity = $this->service->modify($uid, ['billing_at' => $billing_at]); + $this->addViewDatas('entity', $entity); return $this->action_redirect_process('info', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 결제일 변경이 완료되었습니다."); } catch (\Throwable $e) { return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 결제일 변경 오류:" . $e->getMessage()); diff --git a/app/Forms/CommonForm.php b/app/Forms/CommonForm.php index b1a1421..6c23063 100644 --- a/app/Forms/CommonForm.php +++ b/app/Forms/CommonForm.php @@ -118,8 +118,9 @@ abstract class CommonForm //Validation용 final public function validate(array $formDatas): bool { + dd($this); if ($this->_validation === null) { - $this->_validation = service('validation'); + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: Validation 서비스가 초기화되지 않았습니다."); } $dynamicRules = []; $dynamicLabels = []; // 레이블 배열 추가 diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index 23e5f1d..ddfcf6f 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -218,6 +218,7 @@ abstract class CommonService //관리자 정보추가용 $formDatas['user_uid'] = $this->getAuthContext()->getUID(); // 데이터 검증 + // dd($this->getFormService()); if (!$this->getFormService()->validate($formDatas)) { throw new ValidationException( implode("\n", service('validation')->getErrors()) diff --git a/app/Services/Customer/Wallet/WalletService.php b/app/Services/Customer/Wallet/WalletService.php index 09508be..56d2dec 100644 --- a/app/Services/Customer/Wallet/WalletService.php +++ b/app/Services/Customer/Wallet/WalletService.php @@ -73,5 +73,6 @@ abstract class WalletService extends CustomerService 'status' => STATUS['WITHDRAWAL'], ]; $this->withdrawal_process($clientEntity, $formDatas); + $this->create_process($formDatas); } }