|
...
|
...
|
@@ -55,7 +55,7 @@ class UpdateProductCategory extends Command |
|
|
|
foreach ($list as $v) {
|
|
|
|
echo date('Y-m-d H:i:s') . ' start: ' . $v['id'] . PHP_EOL;
|
|
|
|
ProjectServer::useProject($v['id']);
|
|
|
|
$this->getUpdateProductCategory($v['id']);
|
|
|
|
$this->getUpdateProductCategory();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
|
...
|
...
|
@@ -89,9 +89,7 @@ class UpdateProductCategory extends Command |
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/6 16:20
|
|
|
|
*/
|
|
|
|
public function handleCategory($id,$category){
|
|
|
|
$category = trim($category,',');
|
|
|
|
$cate_arr = explode(',',$category);
|
|
|
|
public function handleCategory($id,$cate_arr){
|
|
|
|
if(!empty($cate_arr) && is_array($cate_arr)){
|
|
|
|
foreach ($cate_arr as $v){
|
|
|
|
$categoryModel = new Category();
|
...
|
...
|
|