dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-02 14:11:50 +09:00
parent 055f6f6731
commit 490ca2bf55

View File

@ -79,6 +79,7 @@ class PaymentController extends CustomerController
if (!$entity instanceof PaymentEntity) { if (!$entity instanceof PaymentEntity) {
throw new \Exception(__METHOD__ . "에서 {$uid}에 대한 결제정보를 찾을수 없습니다."); throw new \Exception(__METHOD__ . "에서 {$uid}에 대한 결제정보를 찾을수 없습니다.");
} }
if ($entity->getStatus() === STATUS['UNPAID']) { //미지급인경우
//entities에 고객 설정 //entities에 고객 설정
$clientEntity = $this->getClientService()->getEntity($entity->getClientInfoUID()); $clientEntity = $this->getClientService()->getEntity($entity->getClientInfoUID());
if (!$clientEntity instanceof ClientEntity) { if (!$clientEntity instanceof ClientEntity) {
@ -88,7 +89,7 @@ class PaymentController extends CustomerController
$rows[$clientEntity->getPK()] = [ $rows[$clientEntity->getPK()] = [
'name' => $clientEntity->getName(), 'name' => $clientEntity->getName(),
'total_amount' => 0, 'total_amount' => 0,
'services' => [] 'services' => [],
]; ];
} }
//entities에 서비스 설정 //entities에 서비스 설정
@ -100,13 +101,14 @@ class PaymentController extends CustomerController
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()] = [ $rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()] = [
'code' => $serviceEntity->getCode(), 'code' => $serviceEntity->getCode(),
'billing_at' => $serviceEntity->getBillingAt(), 'billing_at' => $serviceEntity->getBillingAt(),
'items' => [] 'items' => [],
]; ];
} }
//entities에 총 결제금액 설정 //entities에 총 결제금액 설정
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()]['items'][] = ['title' => $entity->getTitle(), 'amount' => $entity->getAmount()]; $rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()]['items'][] = ['title' => $entity->getTitle(), 'amount' => $entity->getAmount()];
$rows[$clientEntity->getPK()]['total_amount'] += $entity->getAmount(); $rows[$clientEntity->getPK()]['total_amount'] += $entity->getAmount();
} }
}
// dd($rows); // dd($rows);
$this->rows = $rows; $this->rows = $rows;
return $this->getResultSuccess(); return $this->getResultSuccess();