wiki空间管理,页面支持拖动管理

This commit is contained in:
暮光:城中城
2019-03-08 22:40:50 +08:00
parent 05142096f7
commit 840f6b457b
8 changed files with 142 additions and 46 deletions

View File

@@ -50,7 +50,7 @@ public class WikiPageController {
UpdateWrapper<WikiPage> wrapper = new UpdateWrapper<>();
wrapper.eq("del_flag", 0);
wrapper.eq("space_id", wikiPage.getSpaceId());
wrapper.isNull(wikiPage.getParentId() == null, "parent_id");
wrapper.eq(wikiPage.getParentId() == null, "parent_id", 0);
wrapper.eq(wikiPage.getParentId() != null, "parent_id", wikiPage.getParentId());
List<WikiPage> authList = wikiPageService.list(wrapper);
return DocResponseJson.ok(authList);

View File

@@ -36,6 +36,7 @@ public class WikiSpaceController {
public ResponseJson<List<WikiSpace>> list(WikiSpace wikiSpace) {
DocUserDetails currentUser = DocUserUtil.getCurrentUser();
UpdateWrapper<WikiSpace> wrapper = new UpdateWrapper<>();
wrapper.eq("del_flag", 0);
if(wikiSpace.getType() == null) {
wrapper.in("type", 1, 2);
} else if(wikiSpace.getType() == 1 || wikiSpace.getType() == 2) {
@@ -49,7 +50,7 @@ public class WikiSpaceController {
}
@PostMapping("/update")
public ResponseJson<Object> update(WikiSpace wikiSpace) {
public ResponseJson<WikiSpace> update(WikiSpace wikiSpace) {
Long id = wikiSpace.getId();
if (id != null && id > 0) {
wikiSpaceService.updateById(wikiSpace);