|
...
|
...
|
@@ -72,9 +72,6 @@ class BlogCategoryLogic extends BaseLogic |
|
|
|
//随机获取最后一级id
|
|
|
|
$replacement = $this->getLastId($id);
|
|
|
|
if(!empty($blogList)){
|
|
|
|
foreach ($blogList as $v){
|
|
|
|
str_replace($pid,$replacement);
|
|
|
|
}
|
|
|
|
//存在博客时,移动所有博客到当前分类最后一级
|
|
|
|
$blogModel->where('category_id', 'like', '%,' . $pid . ',%')
|
|
|
|
->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]);
|
...
|
...
|
|