Commit f087a40d authored by hj's avatar hj

更新提交

parent 198d3121
...@@ -82,7 +82,6 @@ class WuxiLabNewService ...@@ -82,7 +82,6 @@ class WuxiLabNewService
if(!empty($rawList)){ if(!empty($rawList)){
$this->apiService->pushQueue($queueParams,'wuxilab_api'); $this->apiService->pushQueue($queueParams,'wuxilab_api');
} }
break;
$page ++; $page ++;
} }
} }
...@@ -95,6 +94,7 @@ class WuxiLabNewService ...@@ -95,6 +94,7 @@ class WuxiLabNewService
*/ */
public function batchUpdateProductPrice() public function batchUpdateProductPrice()
{ {
try{
$status = $this->apiService->checkPlatformStatus(); $status = $this->apiService->checkPlatformStatus();
if($status){ if($status){
$dbConnect = DB::connection('rhawn_mysql'); $dbConnect = DB::connection('rhawn_mysql');
...@@ -127,12 +127,15 @@ class WuxiLabNewService ...@@ -127,12 +127,15 @@ class WuxiLabNewService
$result = $this->apiService->pushBatchUpdatePrice($updateProductPrice, $this->getToken()); $result = $this->apiService->pushBatchUpdatePrice($updateProductPrice, $this->getToken());
$this->processApiResponse($result); $this->processApiResponse($result);
} }
}
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error');
} }
} }
public function batchUpdateProductStock() public function batchUpdateProductStock()
{ {
try{
$status = $this->apiService->checkPlatformStatus(); $status = $this->apiService->checkPlatformStatus();
if($status){ if($status){
$dbConnect = DB::connection('rhawn_mysql'); $dbConnect = DB::connection('rhawn_mysql');
...@@ -159,12 +162,13 @@ class WuxiLabNewService ...@@ -159,12 +162,13 @@ class WuxiLabNewService
$tempData['packageStockLocation'] = 'CN-SH'; $tempData['packageStockLocation'] = 'CN-SH';
$tempData['stockStatus'] = $product->p_status == '1' ? 'ACTIVE' : 'INACTIVE';; $tempData['stockStatus'] = $product->p_status == '1' ? 'ACTIVE' : 'INACTIVE';;
$updateProductStock[] = $tempData; $updateProductStock[] = $tempData;
break;
} }
$result = $this->apiService->pushBatchUpdateStock($updateProductStock, $this->getToken()); $result = $this->apiService->pushBatchUpdateStock($updateProductStock, $this->getToken());
$this->processApiResponse($result); $this->processApiResponse($result);
} }
}
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error');
} }
} }
...@@ -197,7 +201,6 @@ class WuxiLabNewService ...@@ -197,7 +201,6 @@ class WuxiLabNewService
$tempData['packageStockLocation'] = 'CN-SH'; $tempData['packageStockLocation'] = 'CN-SH';
$tempData['stockStatus'] = $product['p_status'] == '1' ? 'ACTIVE' : 'INACTIVE';; $tempData['stockStatus'] = $product['p_status'] == '1' ? 'ACTIVE' : 'INACTIVE';;
$updateProductStock[] = $tempData; $updateProductStock[] = $tempData;
break;
} }
$result = $this->apiService->pushBatchUpdateStock($updateProductStock, $this->getToken()); $result = $this->apiService->pushBatchUpdateStock($updateProductStock, $this->getToken());
$this->processApiResponse($result); $this->processApiResponse($result);
...@@ -220,7 +223,6 @@ class WuxiLabNewService ...@@ -220,7 +223,6 @@ class WuxiLabNewService
}catch(\Throwable $exception){ }catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error'); SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error');
var_dump($exception->getMessage());
} }
} }
...@@ -245,7 +247,6 @@ class WuxiLabNewService ...@@ -245,7 +247,6 @@ class WuxiLabNewService
}catch(\Throwable $exception){ }catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error'); SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error');
var_dump($exception->getMessage());
} }
} }
...@@ -283,7 +284,6 @@ class WuxiLabNewService ...@@ -283,7 +284,6 @@ class WuxiLabNewService
}catch(\Throwable $exception){ }catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error'); SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':batchUpdateToWuxiLab', 'error');
var_dump($exception->getMessage());
} }
} }
......
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