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