dbms_init...1

This commit is contained in:
choi.jh 2025-06-20 12:16:51 +09:00
parent 0ade1f86ea
commit f420bfbd1e
2 changed files with 8 additions and 13 deletions

View File

@ -47,20 +47,8 @@ class Payment extends BaseController
//Transaction Start //Transaction Start
$this->getServiceService()->getModel()->transStart(); $this->getServiceService()->getModel()->transStart();
try { try {
//서비스중인 서버중 결제일이 오늘인 서비스 확인 //서비스중인 서버중 결제일이 오늘인 서비스 확인후 연장처리
//결제일이 오늘이 서비스를 모두 연장처리
$this->getServiceService()->extendBillingAt(date('Y-m-d'), DEFAULTS['STATUS']); $this->getServiceService()->extendBillingAt(date('Y-m-d'), DEFAULTS['STATUS']);
//결제일이 오늘보다 큰 서비스가져오기
foreach ($this->getServiceService()->getEntities(['billing_at >' => date("Y-m-d")]) as $serviceEntity) {
echo $serviceEntity->getPK() . ":" . $serviceEntity->getBillingAt() . "\n";
foreach ($this->getServiceItemService()->getEntities(['serviceinfo_uid' => $serviceEntity->getPK()]) as $itemEntity) {
if ($itemEntity->getBillingCycle() == "month") {
//결제정보 ServicePaymentService에 신규등록
$this->getServicePaymentService()->createPaymentByServiceItem($itemEntity);
}
}
}
// echo $this->getServiceService()->getModel()->getLastQuery() . "\n";
log_message("notice", "Billing 작업을 완료하였습니다."); log_message("notice", "Billing 작업을 완료하였습니다.");
$this->getServiceService()->getModel()->transCommit(); $this->getServiceService()->getModel()->transCommit();
} catch (\Exception $e) { } catch (\Exception $e) {

View File

@ -56,6 +56,13 @@ class ServicePaymentHelper extends CustomerHelper
// "onclick" => "return submitBatchJob()" // "onclick" => "return submitBatchJob()"
]); ]);
break; break;
case 'delete':
if ($viewDatas['entity']->getStatus() !== DEFAULTS['STATUS']) {
$action = "";
} else {
$action = parent::getListButton($action, $viewDatas, $extras);
}
break;
default: default:
$action = parent::getListButton($action, $viewDatas, $extras); $action = parent::getListButton($action, $viewDatas, $extras);
break; break;