feat: nhắc gia hạn QR theo dịch vụ, failover server hosting, CCCD admin, log cấp phát dịch vụ
- Mail campaign: mẫu nhắc gia hạn thanh toán QR, chọn dịch vụ + chu kỳ từng dòng (renewal_services) - Hosting: nhiều server Plesk cho một gói (service_plan_servers), chuyển server khi server chết - Admin xem/sửa giấy tờ định danh khách, tuỳ chọn gia hạn cho khách, nhật ký cấp phát dịch vụ - Đánh dấu mẫu email dịch vụ là non-marketing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
047c23beff
commit
55a834a2f8
@@ -22,6 +22,7 @@ use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use App\Support\ServiceProvisionLog;
|
||||
|
||||
use App\Jobs\VirtualMachine\Provision\Concerns\ManagesIpReservation;
|
||||
/**
|
||||
@@ -228,6 +229,8 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
'attempt' => $attempt,
|
||||
]);
|
||||
|
||||
ServiceProvisionLog::forVm($this->moduleVmwareId, 'provision_step', 'Đã gán IP cho máy chủ', ['ip' => $ip]);
|
||||
|
||||
// CPU/RAM config was already applied by UpdateVmConfigJob before IP assignment.
|
||||
ChangePasswordViaVsphereJob::dispatch(
|
||||
$this->moduleVmwareId,
|
||||
@@ -247,6 +250,7 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
|
||||
ModuleVmware::where('id', $this->moduleVmwareId)->update(['status' => 0]);
|
||||
Service::where('vm_id', $this->moduleVmwareId)->update(['status' => 'failed']);
|
||||
ServiceProvisionLog::forVm($this->moduleVmwareId, 'provision_failed', "Gán IP thất bại sau {$maxAttempts} lần thử", ['stage' => 'assign_ip']);
|
||||
|
||||
// Notify admin via Telegram with order/customer context
|
||||
try {
|
||||
@@ -311,6 +315,7 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
|
||||
ModuleVmware::where('id', $this->moduleVmwareId)->update(['status' => 0]);
|
||||
Service::where('vm_id', $this->moduleVmwareId)->update(['status' => 'failed']);
|
||||
ServiceProvisionLog::forVm($this->moduleVmwareId, 'provision_failed', 'Gán IP thất bại — ' . $e->getMessage(), ['stage' => 'assign_ip']);
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user