diff --git a/app/Services/Customer/Wallet/WalletService.php b/app/Services/Customer/Wallet/WalletService.php index c9dd6cd..b94aced 100644 --- a/app/Services/Customer/Wallet/WalletService.php +++ b/app/Services/Customer/Wallet/WalletService.php @@ -21,6 +21,9 @@ abstract class WalletService extends CustomerService protected function create_process(array $formDatas): CommonEntity { //고객 정보 + if (empty($formDatas['clientinfo_uid'])) { + throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 고객정보(clientinfo_uid)가 전송되지 않았습니다."); + } $clientEntity = service('customer_clientservice')->getEntity($formDatas['clientinfo_uid']); if (!$clientEntity instanceof ClientEntity) { throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$formDatas['clientinfo_uid']}에 해당하는 고객정보를 찾을수 없습니다."); @@ -36,7 +39,8 @@ abstract class WalletService extends CustomerService $entity = parent::create_process($formDatas); if (!$entity) { throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 고객의 Wallet정보 생성에 실패하였습니다."); - }; + } + ; return $entity; } //입금,쿠폰 충전 처리 @@ -61,9 +65,9 @@ abstract class WalletService extends CustomerService } $formDatas = [ 'clientinfo_uid' => $paymentEntity->getClientInfoUid(), - 'title' => $paymentEntity->getTitle(), - 'amount' => $paymentEntity->getAmount(), - 'status' => STATUS['WITHDRAWAL'], + 'title' => $paymentEntity->getTitle(), + 'amount' => $paymentEntity->getAmount(), + 'status' => STATUS['WITHDRAWAL'], ]; $this->create_process($formDatas); }