|
|
@ -159,6 +159,16 @@ public class SysContentServiceImpl extends ServiceImpl<SysContentMapper, SysCont |
|
|
|
//获取当前文章所属栏目id
|
|
|
|
//获取当前文章所属栏目id
|
|
|
|
Integer columnId = content.getColumnId(); |
|
|
|
Integer columnId = content.getColumnId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取栏目下全部文章的数量与当前输入的序号判断 如果要更改的序号大于当前有的数量,直接替换
|
|
|
|
|
|
|
|
QueryWrapper<SysContent> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq("column_id", columnId); |
|
|
|
|
|
|
|
queryWrapper.eq("deleted", 1); |
|
|
|
|
|
|
|
List<SysContent> contentList = baseMapper.selectList(queryWrapper); |
|
|
|
|
|
|
|
if (sequenceNumber >= contentList.size()) { |
|
|
|
|
|
|
|
sequenceNumber = contentList.size(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currentSerialNumber.equals(sequenceNumber)) { |
|
|
|
if (currentSerialNumber.equals(sequenceNumber)) { |
|
|
|
return R.success(); |
|
|
|
return R.success(); |
|
|
|
} |
|
|
|
} |
|
|
|