dbmsv3 init...1
This commit is contained in:
parent
2bbf2a5704
commit
aa749599c2
File diff suppressed because one or more lines are too long
@ -196,13 +196,15 @@ class ServiceService extends CustomerService
|
|||||||
// exit;
|
// exit;
|
||||||
return $caculatedAmount;
|
return $caculatedAmount;
|
||||||
}
|
}
|
||||||
public function setAmount(int $uid): serviceEntity
|
public function setAmount(int $uid): PaymentEntity
|
||||||
{
|
{
|
||||||
$entity = $this->getEntity($uid);
|
$entity = $this->getEntity($uid);
|
||||||
if (!$entity instanceof ServiceEntity) {
|
if (!$entity instanceof ServiceEntity) {
|
||||||
throw new \Exception(__METHOD__ . "에서 오류발생: [{$uid}]에 대한 서비스정보를 찾을수 없습니다.");
|
throw new \Exception(__METHOD__ . "에서 오류발생: [{$uid}]에 대한 서비스정보를 찾을수 없습니다.");
|
||||||
}
|
}
|
||||||
return parent::modify($entity, ['amount' => $this->getCaculatedAmount($entity)]);;
|
parent::modify($entity, ['amount' => $this->getCaculatedAmount($entity)]);;
|
||||||
|
//결제정보 수정
|
||||||
|
return $this->getPaymentService()->modifyService($entity);
|
||||||
}
|
}
|
||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
//FieldForm관련용
|
//FieldForm관련용
|
||||||
@ -229,7 +231,7 @@ class ServiceService extends CustomerService
|
|||||||
//지정된 서버정보에 서비스 설정
|
//지정된 서버정보에 서비스 설정
|
||||||
$serverEntity = $this->getServerService()->setService($entity, $entity->getServerInfoUID());
|
$serverEntity = $this->getServerService()->setService($entity, $entity->getServerInfoUID());
|
||||||
//서비스 총금액 설정
|
//서비스 총금액 설정
|
||||||
$entity = $this->setAmount($entity->getUID());
|
$paymentEntity = $this->setAmount($entity->getPK());
|
||||||
//결제정보 등록
|
//결제정보 등록
|
||||||
$paymentEntity = $this->getPaymentService()->createService($entity);
|
$paymentEntity = $this->getPaymentService()->createService($entity);
|
||||||
//추가 필수정보 수정용
|
//추가 필수정보 수정용
|
||||||
@ -257,9 +259,7 @@ class ServiceService extends CustomerService
|
|||||||
//지정된 서버정보에 서비스 설정
|
//지정된 서버정보에 서비스 설정
|
||||||
$serverEntity = $this->getServerService()->setService($entity, $entity->getServerInfoUID());
|
$serverEntity = $this->getServerService()->setService($entity, $entity->getServerInfoUID());
|
||||||
//서비스 총금액 설정
|
//서비스 총금액 설정
|
||||||
$entity = $this->setAmount($entity->getUID());
|
$paymentEntity = $this->setAmount($entity->getPK());
|
||||||
//결제정보 수정
|
|
||||||
$paymentEntity = $this->getPaymentService()->modifyService($entity);
|
|
||||||
//추가 필수정보 수정용
|
//추가 필수정보 수정용
|
||||||
$entity = parent::modify($entity, [
|
$entity = parent::modify($entity, [
|
||||||
'serverinfo_id' => $serverEntity->getPK(),
|
'serverinfo_id' => $serverEntity->getPK(),
|
||||||
|
|||||||
@ -309,7 +309,7 @@ class ServerPartService extends EquipmentService implements ServerInterface
|
|||||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보가 정의된 후에만 가능합니다.");
|
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보가 정의된 후에만 가능합니다.");
|
||||||
}
|
}
|
||||||
//서비스 금액만 재계산변경
|
//서비스 금액만 재계산변경
|
||||||
$this->getServiceService()->setAmount($this->getServiceService()->getEntity($entity->getServiceInfoUID()));
|
$this->getServiceService()->setAmount($entity->getServiceInfoUID());
|
||||||
break;
|
break;
|
||||||
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리
|
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리
|
||||||
$paymentEntity = $this->getPaymentService()->createServerPart($entity);
|
$paymentEntity = $this->getPaymentService()->createServerPart($entity);
|
||||||
@ -353,7 +353,7 @@ class ServerPartService extends EquipmentService implements ServerInterface
|
|||||||
case PAYMENT['BILLING']['MONTH']: //월별과금일때만 처리
|
case PAYMENT['BILLING']['MONTH']: //월별과금일때만 처리
|
||||||
if ($entity->getServiceInfoUID() !== null) { //서비스가 정의되어 있으면
|
if ($entity->getServiceInfoUID() !== null) { //서비스가 정의되어 있으면
|
||||||
//서비스 금액만 재계산변경
|
//서비스 금액만 재계산변경
|
||||||
$this->getServiceService()->setAmount($this->getServiceService()->getEntity($entity->getServiceInfoUID()));
|
$this->getServiceService()->setAmount($entity->getServiceInfoUID());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리
|
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리
|
||||||
|
|||||||
@ -21,7 +21,6 @@ class CSService extends PartService
|
|||||||
public function getFormFields(): array
|
public function getFormFields(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"serverinfo_uid",
|
|
||||||
"type",
|
"type",
|
||||||
"ip",
|
"ip",
|
||||||
"accountid",
|
"accountid",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user