dbms_init...1
This commit is contained in:
parent
f420bfbd1e
commit
5ab1c67c6c
@ -47,8 +47,19 @@ class Payment extends BaseController
|
||||
//Transaction Start
|
||||
$this->getServiceService()->getModel()->transStart();
|
||||
try {
|
||||
//서비스중인 서버중 결제일이 오늘인 서비스 확인후 연장처리
|
||||
//서비스중 결제일이 오늘인 서비스 모두 연장처리
|
||||
$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) {
|
||||
//결제정보 ServicePaymentService에 월별 결제만 신규등록
|
||||
if ($itemEntity->getBillingCycle() == "month") {
|
||||
$this->getServicePaymentService()->createPaymentByServiceItem($itemEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
// echo $this->getServiceService()->getModel()->getLastQuery() . "\n";
|
||||
log_message("notice", "Billing 작업을 완료하였습니다.");
|
||||
$this->getServiceService()->getModel()->transCommit();
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user