正在显示
1 个修改的文件
包含
0 行增加
和
3 行删除
| @@ -72,9 +72,6 @@ class BlogCategoryLogic extends BaseLogic | @@ -72,9 +72,6 @@ class BlogCategoryLogic extends BaseLogic | ||
| 72 | //随机获取最后一级id | 72 | //随机获取最后一级id |
| 73 | $replacement = $this->getLastId($id); | 73 | $replacement = $this->getLastId($id); |
| 74 | if(!empty($blogList)){ | 74 | if(!empty($blogList)){ |
| 75 | - foreach ($blogList as $v){ | ||
| 76 | - str_replace($pid,$replacement); | ||
| 77 | - } | ||
| 78 | //存在博客时,移动所有博客到当前分类最后一级 | 75 | //存在博客时,移动所有博客到当前分类最后一级 |
| 79 | $blogModel->where('category_id', 'like', '%,' . $pid . ',%') | 76 | $blogModel->where('category_id', 'like', '%,' . $pid . ',%') |
| 80 | ->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]); | 77 | ->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]); |
-
请 注册 或 登录 后发表评论