partial update fix sync data pbg

This commit is contained in:
arifal
2025-08-07 22:04:40 +07:00
parent dd1cd72450
commit 3902a486f7
11 changed files with 114 additions and 9 deletions

View File

@@ -106,7 +106,7 @@ class ServicePbgTask
};
do {
$url = "{$this->simbg_host}/api/pbg/v1/list/?page={$currentPage}&size={$this->fetch_per_page}&sort=ASC";
$url = "{$this->simbg_host}/api/pbg/v1/list/?page={$currentPage}&size={$this->fetch_per_page}&sort=ASC&date&search&status&slf_status&type&sort_by=created_at&application_type=1&start_date&end_date";
$fetch_data = $fetchData($url);
if (!$fetch_data) {
@@ -123,6 +123,8 @@ class ServicePbgTask
$data = $response['data'];
$totalPage = isset($response['total_page']) ? (int) $response['total_page'] : 1;
Log::info("Total data scraping {$totalPage}");
$saved_data = [];
foreach ($data as $item) {
$saved_data[] = [