Commit 6328edd1 authored by hangjun83's avatar hangjun83

更新

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