dbmsv2 init...1
This commit is contained in:
parent
d98392cce7
commit
f5dec0c746
@ -28,7 +28,7 @@ class PaymentService extends ParentService implements ServiceInterface
|
||||
public function createService(ServiceEntity $serviceEntity): ServiceEntity
|
||||
{
|
||||
//필수정보처리 후 결제정보등록
|
||||
$entity = $this->create($this->action_process($serviceEntity));
|
||||
$entity = parent::create($this->action_process($serviceEntity));
|
||||
//서비스정보 Entity에 결제정보 설정
|
||||
return $serviceEntity->setPaymentEntity($entity);
|
||||
}
|
||||
@ -37,14 +37,14 @@ class PaymentService extends ParentService implements ServiceInterface
|
||||
//결제정보 가져오기
|
||||
$entity = $serviceEntity->getPaymentEntity();
|
||||
if (!$entity instanceof PaymentEntity) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: {$serviceEntity->getPK()}에 해당하는 결제정보를 찾을수 없습니다.");
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보[{$serviceEntity->getPK()}]에 해당하는 결제정보를 찾을수 없습니다.");
|
||||
}
|
||||
//미납상태확인
|
||||
if ($entity->getStatus() !== STATUS['UNPAID']) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 완료된 결제는 수정이 불가합니다.");
|
||||
}
|
||||
//필수정보처리 후 결제정보수정
|
||||
$entity = $this->modify($entity, $this->action_process($serviceEntity));
|
||||
$entity = parent::modify($entity, $this->action_process($serviceEntity));
|
||||
//서비스정보 Entity에 결제정보 설정
|
||||
return $serviceEntity->setPaymentEntity($entity);
|
||||
}
|
||||
|
||||
@ -20,12 +20,12 @@ class ServerService extends ParentService implements ServiceInterface
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서버상태가 설정되지 않았습니다.");
|
||||
}
|
||||
//서버정보 가져오기
|
||||
$entity = $this->getEntity(['serviceinfo_uid' => $serviceEntity->getPK()]);
|
||||
$entity = $serviceEntity->getServerEntity();
|
||||
if (!$entity instanceof ServerEntity) {
|
||||
throw new \Exception("서비스정보[{$serviceEntity->getPK()}]에 해당하는 서버정보를 찾을수없습니다.");
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보[{$serviceEntity->getPK()}]에 해당하는 서버정보를 찾을수없습니다.");
|
||||
}
|
||||
//서버정보 수정
|
||||
return $this->modify($entity, $formDatas);
|
||||
return parent::modify($entity, $formDatas);
|
||||
}
|
||||
public function createService(ServiceEntity $serviceEntity): ServiceEntity
|
||||
{
|
||||
|
||||
@ -221,6 +221,7 @@ class ServiceService extends CustomerService
|
||||
$entity = $this->getServerService()->$action($entity);
|
||||
$entity = $this->getPaymentService()->$action($entity);
|
||||
//결제정보PK정의
|
||||
dd($entity);
|
||||
$entity = parent::modify($entity, ['payment_uid' => $entity->getPaymentEntity()->getPK()]);
|
||||
return $entity;
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class CSService extends ParentService implements ServerPartInterface
|
||||
throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 CS정보를 찾을수없습니다.");
|
||||
}
|
||||
//CS정보 수정
|
||||
return $this->modify($entity, $formDatas);
|
||||
return parent::modify($entity, $formDatas);
|
||||
}
|
||||
public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity
|
||||
{
|
||||
|
||||
@ -26,7 +26,7 @@ class IPService extends ParentService implements ServerPartInterface
|
||||
throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 IP정보를 찾을수없습니다.");
|
||||
}
|
||||
//IP정보 수정
|
||||
return $this->modify($entity, $formDatas);
|
||||
return parent::modify($entity, $formDatas);
|
||||
}
|
||||
public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity
|
||||
{
|
||||
|
||||
@ -33,7 +33,7 @@ class PartService extends ParentService implements ServerPartInterface
|
||||
}
|
||||
$formDatas['stock'] = $entity->getStock() - $serverPartEntity->getCnt();
|
||||
}
|
||||
return $this->modify($entity, $formDatas);
|
||||
return parent::modify($entity, $formDatas);
|
||||
}
|
||||
|
||||
public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity
|
||||
|
||||
@ -40,7 +40,7 @@ class PaymentService extends ParentService implements ServerPartInterface
|
||||
//당일결체일로 설정
|
||||
$formDatas['billing_at'] = date("Y-m-d");
|
||||
//결제정보등록
|
||||
$entity = $this->create($formDatas);
|
||||
$entity = parent::create($formDatas);
|
||||
//서버연결정보 Entity에 결제정보 설정
|
||||
return $serverPartEntity->setPaymentEntity($entity);
|
||||
}
|
||||
@ -54,7 +54,7 @@ class PaymentService extends ParentService implements ServerPartInterface
|
||||
//필수정보처리 후 FormData 가져오기
|
||||
$formDatas = $this->action_process($serverPartEntity);
|
||||
//결제정보수정
|
||||
$entity = $this->modify($entity, $formDatas);
|
||||
$entity = parent::modify($entity, $formDatas);
|
||||
//서버연결정보 Entity에 결제정보 설정
|
||||
return $serverPartEntity->setPaymentEntity($entity);
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class SwitchService extends ParentService implements ServerPartInterface
|
||||
throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 Switch정보를 찾을수없습니다.");
|
||||
}
|
||||
//Switch정보 수정
|
||||
return $this->modify($entity, $formDatas);
|
||||
return parent::modify($entity, $formDatas);
|
||||
}
|
||||
public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity
|
||||
{
|
||||
|
||||
@ -166,6 +166,9 @@ class ServerPartService extends EquipmentService
|
||||
public function getFormOption(string $field, array $options = []): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serverinfo_uid':
|
||||
$options = $this->getServerService()->getEntities();
|
||||
break;
|
||||
case 'part_uid':
|
||||
$partOptions = [];
|
||||
foreach (SERVERPART['ALL_PARTTYPES'] as $partType) {
|
||||
|
||||
@ -157,11 +157,6 @@ class ServerService extends EquipmentService
|
||||
}
|
||||
return $formDatas;
|
||||
}
|
||||
// 수정
|
||||
public function modify(mixed $entity, array $formDatas): ServerEntity
|
||||
{
|
||||
return parent::modify($entity, $formDatas);
|
||||
}
|
||||
//삭제
|
||||
public function delete(mixed $entity): ServerEntity
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user