Commit 8fbbe0b5 authored by hangjun83's avatar hangjun83

药明康德更新

parent 3de813f6
......@@ -456,6 +456,7 @@ class WuxiLabService
$storeEntries = [];
}
}
$updateSuccessStoreEntries = $this->apiService->getPlatformDataEntries('wuxiLab_update_success_products','data_values');
//更新成功的商品
foreach($result['successProduct'] as $successProduct){
if(!is_null($storeEntries) && !empty($storeEntries['products'])){
......@@ -465,8 +466,16 @@ class WuxiLabService
}else{
$storeEntries['products'][] = $successProduct;
}
if(!is_null($updateSuccessStoreEntries) && !empty($updateSuccessStoreEntries['products'])){
if(!in_array($successProduct,$updateSuccessStoreEntries['products'])){
array_push($updateSuccessStoreEntries['products'],$successProduct);
}
}else{
$updateSuccessStoreEntries['products'][] = $successProduct;
}
}
$this->apiService->storePlatformDataEntries('wuxiLab_do_not_update_products',['products' => $storeEntries['products']]);
$this->apiService->storePlatformDataEntries('wuxiLab_update_success_products',['products' => $updateSuccessStoreEntries['products']]);
}
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment