feat(service): huỷ dịch vụ, SSL, đổi mật khẩu hosting, lịch sử thanh toán theo hình thức

- Lịch sử thanh toán hoá đơn trả thêm `method` (tự động gia hạn / số dư / admin / chuyển khoản / hoàn tiền), bỏ đuôi `(method)` khỏi ghi chú
- `DnsServer::panelUrl()` = https://<domain>/ dùng cho email cấp hosting và nút Plesk của khách
- Order item trả thêm `uuid`/`type` của dịch vụ để FE dẫn tới trang quản lý
- Yêu cầu huỷ dịch vụ, chứng chỉ SSL, lịch sử gia hạn, đổi mật khẩu hosting cho khách

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-28 16:40:24 +07:00
co-authored by Claude Sonnet 5.5
parent a6b641015e
commit b44a88bb52
72 changed files with 1701 additions and 231 deletions
@@ -20,6 +20,10 @@ class AdminProductRepository implements AdminProductRepositoryInterface
$query->where('product_type', $type);
}
if ($categoryId = $filters['product_categories_id'] ?? null) {
$query->where('product_categories_id', $categoryId);
}
if (isset($filters['is_active']) && $filters['is_active'] !== '') {
$query->where('is_active', filter_var($filters['is_active'], FILTER_VALIDATE_BOOLEAN));
}
@@ -3,6 +3,7 @@
namespace App\Repositories\Api\ServiceClient;
use App\Support\ProductBillingCycles;
use App\Support\ServiceGroup;
use App\Models\Service;
use App\Repositories\Api\BaseApiRepository;
@@ -16,7 +17,7 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
/**
* Lấy toàn bộ dịch vụ của customer (mọi trạng thái)
*/
public function getActiveServices(int $customerId, ?string $productType = null, ?int $limit = 10)
public function getActiveServices(int $customerId, ?string $productType = null, ?int $limit = 10, ?string $group = null)
{
$query = $this->model
->with([
@@ -33,6 +34,10 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
$query->where('type', $productType);
}
if ($group) {
$query->whereHas('product', fn ($products) => ServiceGroup::constrain($products, $group));
}
return $limit === null ? $query->get() : $query->paginate($limit);
}
@@ -9,7 +9,7 @@ interface ServiceClientRepositoryInterface extends BaseRepositoryInterface
/**
* Lấy danh sách sản phẩm đang hoạt động
*/
public function getActiveServices(int $customerId, ?string $productType = null, ?int $limit = 10);
public function getActiveServices(int $customerId, ?string $productType = null, ?int $limit = 10, ?string $group = null);
public function findActiveBySlug(string $slug);