From 5606f70905de25d6029ff97a88d44279fa74dc60 Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Fri, 13 Jun 2025 17:39:24 +0900 Subject: [PATCH] dbms_init...1 --- app/Services/CommonService.php | 3 +-- app/Services/Customer/AccountService.php | 2 +- app/Services/Customer/CouponService.php | 2 +- app/Services/Customer/PointService.php | 2 +- app/Services/Customer/ServiceHistoryService.php | 4 ++-- app/Services/Customer/ServiceItemService.php | 4 ++-- app/Services/Customer/ServicePaymentService.php | 4 ++-- app/Services/Customer/ServiceService.php | 2 +- 8 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index d2d805f..e22b2c8 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -78,11 +78,10 @@ abstract class CommonService } $entities = []; foreach ($this->getModel()->select(implode(',', $columns))->findAll() as $entity) { - $entitys[$entity->getPK()] = $this->setRelatedEntity($entity); + $entities[$entity->getPK()] = $this->setRelatedEntity($entity); } if (env('app.debug.index')) { echo $this->getModel()->getLastQuery() . "
"; - // exit; } return $entities; } // diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php index c468d57..94d73a4 100644 --- a/app/Services/Customer/AccountService.php +++ b/app/Services/Customer/AccountService.php @@ -47,7 +47,7 @@ class AccountService extends CustomerService { //고객정보정의 $entity->setClient($this->getClient($entity->getClientUID())); - return $entity; + return parent::setRelatedEntity($entity); } //기본 기능부분 diff --git a/app/Services/Customer/CouponService.php b/app/Services/Customer/CouponService.php index 35fbace..a86206e 100644 --- a/app/Services/Customer/CouponService.php +++ b/app/Services/Customer/CouponService.php @@ -46,7 +46,7 @@ class CouponService extends CustomerService { //고객정보정의 $entity->setClient($this->getClient($entity->getClientUID())); - return $entity; + return parent::setRelatedEntity($entity); } //기본 기능부분 diff --git a/app/Services/Customer/PointService.php b/app/Services/Customer/PointService.php index c9f108f..dd49cf0 100644 --- a/app/Services/Customer/PointService.php +++ b/app/Services/Customer/PointService.php @@ -46,7 +46,7 @@ class PointService extends CustomerService { //고객정보정의 $entity->setClient($this->getClient($entity->getClientUID())); - return $entity; + return parent::setRelatedEntity($entity); } //기본 기능부분 diff --git a/app/Services/Customer/ServiceHistoryService.php b/app/Services/Customer/ServiceHistoryService.php index 902aa44..9647dbb 100644 --- a/app/Services/Customer/ServiceHistoryService.php +++ b/app/Services/Customer/ServiceHistoryService.php @@ -55,8 +55,8 @@ class ServiceHistoryService extends CustomerService protected function setRelatedEntity(mixed $entity): ServiceHistoryEntity { //서비스정보정의 - $entity->setService($this->getClient($entity->getClientUID())); - return $entity; + $entity->setService($this->getServiceService()->getEntity($entity->getServiceUid())); + return parent::setRelatedEntity($entity); } //기본 기능부분 } diff --git a/app/Services/Customer/ServiceItemService.php b/app/Services/Customer/ServiceItemService.php index 95b1494..23342a1 100644 --- a/app/Services/Customer/ServiceItemService.php +++ b/app/Services/Customer/ServiceItemService.php @@ -68,8 +68,8 @@ class ServiceItemService extends CustomerService protected function setRelatedEntity(mixed $entity): ServiceItemEntity { //서비스정보정의 - $entity->setService($this->getClient($entity->getClientUID())); - return $entity; + $entity->setService($this->getServiceService()->getEntity($entity->getServiceUid())); + return parent::setRelatedEntity($entity); } //기본 기능부분 public function create(array $formDatas, mixed $entity = null): ServiceItemEntity diff --git a/app/Services/Customer/ServicePaymentService.php b/app/Services/Customer/ServicePaymentService.php index 988324c..8799d15 100644 --- a/app/Services/Customer/ServicePaymentService.php +++ b/app/Services/Customer/ServicePaymentService.php @@ -64,10 +64,10 @@ class ServicePaymentService extends CustomerService protected function setRelatedEntity(mixed $entity): ServicePaymentEntity { //서비스정보정의 - $entity->setService($this->getClient($entity->getClientUID())); + $entity->setService($this->getServiceService()->getEntity($entity->getServiceUid())); //관리자정보정의 $entity->setOwner($this->getClient($entity->getOwnerUID())); - return $entity; + return parent::setRelatedEntity($entity); } //기본 기능부분 diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 899a153..cfabddd 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -69,7 +69,7 @@ class ServiceService extends CustomerService $entity->setClient($this->getClient($entity->getClientUID())); //관리자정보정의 $entity->setOwner($this->getClient($entity->getOwnerUID())); - return $entity; + return parent::setRelatedEntity($entity); } //기본 기능부분