dbmsv4 init...4

This commit is contained in:
최준흠 2026-01-06 13:13:03 +09:00
parent 3c9d6d78d1
commit cba596fa0a

View File

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