|
@@ -160,9 +160,9 @@ class CustomModuleCategoryLogic extends BaseLogic |
|
@@ -160,9 +160,9 @@ class CustomModuleCategoryLogic extends BaseLogic |
|
160
|
$replacement = $this->getLastId($id);
|
160
|
$replacement = $this->getLastId($id);
|
|
161
|
if($newsCount > 0){
|
161
|
if($newsCount > 0){
|
|
162
|
//存在博客时,移动所有博客到当前分类最后一级
|
162
|
//存在博客时,移动所有博客到当前分类最后一级
|
|
163
|
- $newsCount->where('category_id', 'like', '%,' . $pid . ',%')->where('category_id', 'like', '%,' . $replacement . ',%')
|
163
|
+ $contentModel->where('category_id', 'like', '%,' . $pid . ',%')->where('category_id', 'like', '%,' . $replacement . ',%')
|
|
164
|
->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',')")]);
|
164
|
->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',')")]);
|
|
165
|
- $newsCount->where('category_id', 'like', '%,' . $pid . ',%')
|
165
|
+ $contentModel->where('category_id', 'like', '%,' . $pid . ',%')
|
|
166
|
->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]);
|
166
|
->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]);
|
|
167
|
}
|
167
|
}
|
|
168
|
}
|
168
|
}
|