Commit ecf8c45f authored by hj's avatar hj

更新提交

parent 222b8520
......@@ -60,50 +60,10 @@ class WuxiLabNewJobCommand extends Command
$service = app(WuxiLabNewService::class);
switch($action_type){
case 'initProductToExcel' :
if(!isset($params) || $params == 0){
$params['limit'] = 1000;
case 'batchUpdateProducts': $service->batchUpdateProducts($params);break;
case 'batchUpdateProductPrice': $service->batchUpdateProductPrice($params);break;
case 'batchUpdateProductStock': $service->batchUpdateProductStock($params);break;
}
$service->initCreateProductsToExcel($params['limit']);
break;
case 'batchUpdatePackages' :
if(!isset($params) || $params == 0){
$params['limit'] = 1000;
}
$service->batchUpdatePackagesInfo($params);
break;
case 'batchUploadProducts' :
$service->batchUploadProducts();
break;
case 'batchUpdateToWuxiLab' :
$service->batchUpdateToWuxiLab();
break;
case 'batchUpdateProduct' :
$service->batchUpdateProducts();
break;
case 'test' :
$service->test($params);
break;
case 'test1' :
$service->test1();
break;
case 'batchUploadNewProducts' :
$service->batchUploadNewProducts();
break;
case 'batchUpdateProductPackages' :
$service->batchUploadPackages();
break;
case 'batchUpdateProductsShelves' :
$service->batchUpdateProductsShelves();
break;
case 'initToken' :
$service->initToken();
break;
default:
}
/*$productUpdateJob = (new WuxiLabJob($action_type,$params))->delay(100)->onQueue('slow');
app('Illuminate\Contracts\Bus\Dispatcher')->dispatch($productUpdateJob);*/
}
}
......
......@@ -67,6 +67,26 @@ class RhawnProductService
}
}
public function getProductsListThroughPids($pIds)
{
try{
$dbConnect = DB::connection('rhawn_mysql');
$product = $dbConnect->table('products')
->whereIn('p_id',(array)$pIds)
->get()->toArray();
if(count($product) > 0){
return $product;
}
return null;
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':getRawProductsThroughPid ','error');
throw $exception;
}
}
/**
* 通过产品code查找
* @param $pCode
......
......@@ -31,7 +31,6 @@ abstract class PlatformAbstractService
}
protected function setPlatformName($platformName){
$this->platformName = '';
$this->platformName = $platformName;
}
......
......@@ -107,6 +107,22 @@ return [
'timezone' => env('CHEMSITE_DB_TIMEZONE', '+00:00'),
],
'baike_mysql' => [
'driver' => 'mysql',
'host' => env('BAIKE_DB_HOST', '127.0.0.1'),
'port' => env('BAIKE_DB_PORT', 3306),
'database' => env('BAIKE_DB_DATABASE', 'forge'),
'username' => env('BAIKE_DB_USERNAME', 'forge'),
'password' => env('BAIKE_DB_PASSWORD', ''),
'unix_socket' => env('BAIKE_DB_SOCKET', ''),
'charset' => env('BAIKE_DB_CHARSET', 'utf8mb4'),
'collation' => env('BAIKE_DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => env('BAIKE_DB_PREFIX', ''),
'strict' => env('BAIKE_DB_STRICT_MODE', true),
'engine' => env('BAIKE_DB_ENGINE', null),
'timezone' => env('BAIKE_DB_TIMEZONE', '+00:00'),
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
......
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