|
|
|
@ -94,8 +94,7 @@ public class SysColumnController { |
|
|
|
|
SysColumn sysColumn = new SysColumn(); |
|
|
|
|
BeanUtils.copyProperties(sort, sysColumn); |
|
|
|
|
service.updateById(sysColumn); |
|
|
|
|
|
|
|
|
|
//更改栏目下的文章 设置栏目id为新的栏目id
|
|
|
|
|
//依据当前循环获取的栏目id,查询到引用当前栏目的文章对其进行修改栏目id
|
|
|
|
|
QueryWrapper<SysContent> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("column_id", sysColumn.getId()); |
|
|
|
|
List<SysContent> contentList = contentService.list(queryWrapper); |
|
|
|
@ -103,7 +102,7 @@ public class SysColumnController { |
|
|
|
|
for (SysContent content : contentList) { |
|
|
|
|
UpdateWrapper<SysContent> updateWrapper = new UpdateWrapper<>(); |
|
|
|
|
updateWrapper.set("column_id", sysColumn.getId()); |
|
|
|
|
contentService.update(content,updateWrapper); |
|
|
|
|
contentService.update(content, updateWrapper); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|