|
...
|
...
|
@@ -9,6 +9,7 @@ |
|
|
|
|
|
|
|
namespace App\Console\Commands\DeleteCategory;
|
|
|
|
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Models\Com\NoticeLog;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\CategoryRelated;
|
|
...
|
...
|
@@ -118,8 +119,8 @@ class DeleteProductCategory extends Command |
|
|
|
unset($category_id_arr[$k]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//更新当前字段
|
|
|
|
$productModel->edit(['category_id'=>','.json_encode($category_id_arr).','],['id'=>$v['id']]);
|
|
|
|
$str = ','.Arr::arrToSet($category_id_arr).',';
|
|
|
|
$productModel->edit(['category_id'=>$str],['id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
$page++;
|
|
|
|
}
|
...
|
...
|
|