Commit 9d277eb8 authored by jiawei's avatar jiawei

审核学习内容添加排序字段的值

parent 4d78f1e6
...@@ -520,6 +520,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements ...@@ -520,6 +520,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
.exhibitionBoardCatId(this.exhibitionBoardService.getById(exhibitionBoardId).getExhibitionBoardCatId()) .exhibitionBoardCatId(this.exhibitionBoardService.getById(exhibitionBoardId).getExhibitionBoardCatId())
.exhibitionBoardId(exhibitionBoardId) .exhibitionBoardId(exhibitionBoardId)
.build(); .build();
//
QueryWrapper<LearningContentBoard> learningContentBoardQueryWrapper = new QueryWrapper<>();
learningContentBoardQueryWrapper.select("max(sortorder) as sortorder");
LearningContentBoard one1 = learningContentBoardService.getOne(learningContentBoardQueryWrapper);
if (one1 != null && one1.getSortorder() != null) {
learningContentBoard.setSortorder(one.getSortorder() + 1);
} else {
learningContentBoard.setSortorder(1);
}
this.learningContentBoardService.save(learningContentBoard); this.learningContentBoardService.save(learningContentBoard);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment