Commit 6328edd1 authored by hangjun83's avatar hangjun83

更新

parent b95e6a4a
......@@ -304,17 +304,23 @@ class WuxiLabService
if($result){
if(isset($result['errorProduct']) && !empty($result['errorProduct'])){
$storeEntries = $this->apiService->getPlatformDataEntries('wuxiLab_not_exist_products','data_values');
/*if(!is_null($storeEntries) && count($storeEntries['products']) >= $this->apiService->getPlatformInfo('platform_params')['excelCreateLimit']){
SimpleKafka::produerSend(
if(!is_null($storeEntries) && count($storeEntries['products']) >= $this->apiService->getPlatformInfo('platform_params')['excelCreateLimit']){
$this->apiService->pushQueue([
'params' => ['products' => $storeEntries['products'],'type' => 'product'],
'consumer' => __CLASS__,
'method' => 'processProductsUpdateThroughtExcel'
],'wuxilab_product');
$this->apiService->removePlatformDataEntries('wuxiLab_not_exist_products');
/*SimpleKafka::produerSend(
[
'params' => ['products' => $storeEntries['products'],'type' => 'product'],
'consumer' => __CLASS__,
'method' => 'processProductsUpdateThroughtExcel'
]
);
$this->apiService->removePlatformDataEntries('wuxiLab_not_exist_products');
$this->apiService->removePlatformDataEntries('wuxiLab_not_exist_products');*/
$storeEntries = null;
}*/
}
foreach($result['errorProduct'] as $errorProduct){
if($errorProduct['reason'] == 'PRODUCT_NOT_EXIST'){
if(!is_null($storeEntries) && !empty($storeEntries['products'])){
......@@ -329,7 +335,7 @@ class WuxiLabService
$this->apiService->storePlatformDataEntries('wuxiLab_not_exist_products',['products' => $storeEntries['products']]);
}
//更新成功,批量更新包装规格
$storeEntries = $this->apiService->getPlatformDataEntries('wuxiLab_do_not_update_products','data_values');
/*$storeEntries = $this->apiService->getPlatformDataEntries('wuxiLab_do_not_update_products','data_values');
if(!is_null($storeEntries) && count($storeEntries['products']) >= $this->apiService->getPlatformInfo('platform_params')['excelCreateLimit']){
$this->apiService->pushQueue([
'params' => ['products' => $storeEntries['products'],'type' => 'package'],
......@@ -337,7 +343,8 @@ class WuxiLabService
'method' => 'processProductsUpdateThroughtExcel'
],'wuxilab_package');
$this->apiService->removePlatformDataEntries('wuxiLab_do_not_update_products');
}
}*/
//更新成功的商品
foreach($result['successProduct'] as $successProduct){
if(!is_null($storeEntries) && !empty($storeEntries['products'])){
if(!in_array($successProduct,$storeEntries['products'])){
......
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