用户权限重构

This commit is contained in:
暮光:城中城
2021-12-10 23:20:42 +08:00
parent 6eda8f48c7
commit a2553097bd
31 changed files with 377 additions and 115 deletions

View File

@@ -7,10 +7,12 @@ import com.zyplayer.doc.core.json.DocResponseJson;
import com.zyplayer.doc.core.json.ResponseJson;
import com.zyplayer.doc.data.config.security.DocUserDetails;
import com.zyplayer.doc.data.config.security.DocUserUtil;
import com.zyplayer.doc.data.config.security.UserAuthVo;
import com.zyplayer.doc.data.repository.manage.entity.*;
import com.zyplayer.doc.data.repository.manage.mapper.UserGroupAuthMapper;
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.data.repository.support.consts.UserMsgType;
import com.zyplayer.doc.data.service.manage.*;
import com.zyplayer.doc.wiki.controller.vo.UserPageAuthVo;
@@ -68,7 +70,7 @@ public class WikiPageAuthController {
if (canConfigAuth != null) {
return DocResponseJson.warn(canConfigAuth);
}
List<String> authNameList = Stream.of(WikiAuthType.values()).map(WikiAuthType::getName).collect(Collectors.toList());
List<String> authNameList = Stream.of(WikiAuthType.values()).map(WikiAuthType::getCode).collect(Collectors.toList());
QueryWrapper<AuthInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.in("auth_name", authNameList);
Collection<AuthInfo> authInfoList = authInfoService.list(queryWrapper);
@@ -84,27 +86,27 @@ public class WikiPageAuthController {
for (UserPageAuthVo authVo : authVoList) {
List<UserAuth> userAuthList = new LinkedList<>();
if (Objects.equals(authVo.getEditPage(), 1)) {
Long authId = authInfoMap.get(WikiAuthType.EDIT_PAGE.getName());
Long authId = authInfoMap.get(WikiAuthType.EDIT_PAGE.getCode());
UserAuth userAuth = this.createUserAuth(pageId, currentUser.getUserId(), authVo.getUserId(), authId);
userAuthList.add(userAuth);
}
if (Objects.equals(authVo.getDeletePage(), 1)) {
Long authId = authInfoMap.get(WikiAuthType.DELETE_PAGE.getName());
Long authId = authInfoMap.get(WikiAuthType.DELETE_PAGE.getCode());
UserAuth userAuth = this.createUserAuth(pageId, currentUser.getUserId(), authVo.getUserId(), authId);
userAuthList.add(userAuth);
}
if (Objects.equals(authVo.getPageFileUpload(), 1)) {
Long authId = authInfoMap.get(WikiAuthType.PAGE_FILE_UPLOAD.getName());
Long authId = authInfoMap.get(WikiAuthType.PAGE_FILE_UPLOAD.getCode());
UserAuth userAuth = this.createUserAuth(pageId, currentUser.getUserId(), authVo.getUserId(), authId);
userAuthList.add(userAuth);
}
if (Objects.equals(authVo.getPageFileDelete(), 1)) {
Long authId = authInfoMap.get(WikiAuthType.PAGE_FILE_DELETE.getName());
Long authId = authInfoMap.get(WikiAuthType.PAGE_FILE_DELETE.getCode());
UserAuth userAuth = this.createUserAuth(pageId, currentUser.getUserId(), authVo.getUserId(), authId);
userAuthList.add(userAuth);
}
if (Objects.equals(authVo.getPageAuthManage(), 1)) {
Long authId = authInfoMap.get(WikiAuthType.PAGE_AUTH_MANAGE.getName());
Long authId = authInfoMap.get(WikiAuthType.PAGE_AUTH_MANAGE.getCode());
UserAuth userAuth = this.createUserAuth(pageId, currentUser.getUserId(), authVo.getUserId(), authId);
userAuthList.add(userAuth);
}
@@ -115,13 +117,13 @@ public class WikiPageAuthController {
userAuthService.saveBatch(userAuthList);
// 给相关人发送消息
UserInfo userInfo = userInfoService.getById(authVo.getUserId());
UserMessage userMessage = userMessageService.createUserMessage(currentUser, pageId, wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_AUTH);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, pageId, wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_AUTH);
userMessage.setAffectUserId(userInfo.getId());
userMessage.setAffectUserName(userInfo.getUserName());
userMessageService.addWikiMessage(userMessage);
// 刷新用户权限
Set<String> userAuthSet = userAuthService.getUserAuthSet(authVo.getUserId());
DocUserUtil.setUserAuth(authVo.getUserId(), userAuthSet);
List<UserAuthVo> userAuthListNew = userAuthService.getUserAuthSet(authVo.getUserId());
DocUserUtil.setUserAuth(authVo.getUserId(), userAuthListNew);
}
return DocResponseJson.ok();
}
@@ -166,13 +168,15 @@ public class WikiPageAuthController {
return DocResponseJson.ok(authVoList);
}
private Integer haveAuth(Set<String> authNameSet, WikiAuthType wikiAuthType){
return authNameSet.contains(wikiAuthType.getName()) ? 1 : 0;
private Integer haveAuth(Set<String> authNameSet, WikiAuthType wikiAuthType) {
return authNameSet.contains(wikiAuthType.getCode()) ? 1 : 0;
}
private UserAuth createUserAuth(Long pageId, Long loginUserId, Long userId, Long authId){
private UserAuth createUserAuth(Long pageId, Long loginUserId, Long userId, Long authId) {
UserAuth userAuth = new UserAuth();
userAuth.setAuthCustomSuffix(DocAuthConst.WIKI + pageId);
userAuth.setSysType(DocSysType.WIKI.getType());
userAuth.setSysModuleType(DocSysModuleType.Wiki.PAGE.getType());
userAuth.setSysModuleId(pageId);
userAuth.setCreationTime(new Date());
userAuth.setCreateUid(loginUserId);
userAuth.setDelFlag(0);

View File

@@ -10,7 +10,7 @@ import com.zyplayer.doc.data.repository.manage.entity.UserMessage;
import com.zyplayer.doc.data.repository.manage.entity.WikiPage;
import com.zyplayer.doc.data.repository.manage.entity.WikiPageComment;
import com.zyplayer.doc.data.repository.manage.entity.WikiSpace;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.data.repository.support.consts.UserMsgType;
import com.zyplayer.doc.data.service.manage.UserMessageService;
import com.zyplayer.doc.data.service.manage.WikiPageCommentService;
@@ -98,7 +98,7 @@ public class WikiPageCommentController {
pageComment.setDelFlag(1);
wikiPageCommentService.updateById(pageComment);
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_COMMENT_DEL);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_COMMENT_DEL);
userMessage.setAffectUserId(wikiPageSel.getCreateUserId());
userMessage.setAffectUserName(wikiPageSel.getCreateUserName());
userMessageService.addWikiMessage(userMessage);
@@ -144,7 +144,7 @@ public class WikiPageCommentController {
wikiPageCommentService.save(pageComment);
}
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_COMMENT);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_COMMENT);
userMessage.setAffectUserId(wikiPageSel.getCreateUserId());
userMessage.setAffectUserName(wikiPageSel.getCreateUserName());
userMessageService.addWikiMessage(userMessage);

View File

@@ -15,7 +15,7 @@ import com.zyplayer.doc.data.repository.manage.mapper.WikiPageContentMapper;
import com.zyplayer.doc.data.repository.manage.mapper.WikiPageMapper;
import com.zyplayer.doc.data.repository.manage.param.SearchByEsParam;
import com.zyplayer.doc.data.repository.manage.vo.SpaceNewsVo;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.data.repository.support.consts.UserMsgType;
import com.zyplayer.doc.data.service.manage.*;
import com.zyplayer.doc.data.utils.CachePrefix;
@@ -242,7 +242,7 @@ public class WikiPageController {
wrapper.eq("page_id", pageId);
wikiPageContentService.update(pageContent, wrapper);
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_UPDATE);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_UPDATE);
userMessageService.addWikiMessage(userMessage);
} else {
WikiSpace wikiSpaceSel = wikiSpaceService.getById(wikiPage.getSpaceId());
@@ -278,7 +278,7 @@ public class WikiPageController {
pageContent.setCreateUserName(currentUser.getUsername());
wikiPageContentService.save(pageContent);
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPage.getId(), wikiPage.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_CREATE);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPage.getId(), wikiPage.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_CREATE);
userMessageService.addWikiMessage(userMessage);
}
try {

View File

@@ -2,7 +2,6 @@ package com.zyplayer.doc.wiki.controller;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil;
import com.zyplayer.doc.core.annotation.AuthMan;
import com.zyplayer.doc.core.json.DocResponseJson;
import com.zyplayer.doc.core.json.ResponseJson;
@@ -12,7 +11,7 @@ import com.zyplayer.doc.data.repository.manage.entity.UserMessage;
import com.zyplayer.doc.data.repository.manage.entity.WikiPage;
import com.zyplayer.doc.data.repository.manage.entity.WikiPageFile;
import com.zyplayer.doc.data.repository.manage.entity.WikiSpace;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.data.repository.support.consts.UserMsgType;
import com.zyplayer.doc.data.service.manage.UserMessageService;
import com.zyplayer.doc.data.service.manage.WikiPageFileService;
@@ -94,7 +93,7 @@ public class WikiPageFileController {
wikiPageFile.setUpdateTime(new Date());
wikiPageFileService.updateById(wikiPageFile);
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_FILE_DEL);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_FILE_DEL);
userMessage.setAffectUserId(wikiPageSel.getCreateUserId());
userMessage.setAffectUserName(wikiPageSel.getCreateUserName());
userMessageService.addWikiMessage(userMessage);
@@ -134,7 +133,7 @@ public class WikiPageFileController {
return docResponseJson;
}
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, pageId, wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_UPLOAD);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, pageId, wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_UPLOAD);
userMessage.setAffectUserId(wikiPageSel.getCreateUserId());
userMessage.setAffectUserName(wikiPageSel.getCreateUserName());
userMessageService.addWikiMessage(userMessage);

View File

@@ -9,8 +9,6 @@ import com.zyplayer.doc.core.json.ResponseJson;
import com.zyplayer.doc.data.config.security.DocUserDetails;
import com.zyplayer.doc.data.config.security.DocUserUtil;
import com.zyplayer.doc.data.repository.manage.entity.*;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.UserMsgType;
import com.zyplayer.doc.data.service.manage.*;
import com.zyplayer.doc.wiki.framework.consts.SpaceType;
import com.zyplayer.doc.wiki.service.git.GitService;

View File

@@ -10,7 +10,7 @@ import com.zyplayer.doc.data.repository.manage.entity.UserMessage;
import com.zyplayer.doc.data.repository.manage.entity.WikiPage;
import com.zyplayer.doc.data.repository.manage.entity.WikiPageZan;
import com.zyplayer.doc.data.repository.manage.entity.WikiSpace;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.data.repository.support.consts.UserMsgType;
import com.zyplayer.doc.data.service.manage.UserMessageService;
import com.zyplayer.doc.data.service.manage.WikiPageService;
@@ -86,7 +86,7 @@ public class WikiPageZanController {
}
wikiPageZanService.zanPage(wikiPageZan);
// 给相关人发送消息
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), UserMsgSysType.WIKI, UserMsgType.WIKI_PAGE_ZAN);
UserMessage userMessage = userMessageService.createUserMessage(currentUser, wikiPageSel.getId(), wikiPageSel.getName(), DocSysType.WIKI, UserMsgType.WIKI_PAGE_ZAN);
if (!Objects.equals(wikiPageZan.getYn(), 1)) {
userMessage.setMsgType(UserMsgType.WIKI_PAGE_ZAN_CANCEL.getType());
}

View File

@@ -13,7 +13,7 @@ import com.zyplayer.doc.data.repository.manage.entity.UserGroupAuth;
import com.zyplayer.doc.data.repository.manage.entity.UserSetting;
import com.zyplayer.doc.data.repository.manage.entity.WikiSpace;
import com.zyplayer.doc.data.repository.manage.entity.WikiSpaceFavorite;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.data.repository.support.consts.UserSettingConst;
import com.zyplayer.doc.data.service.manage.UserGroupAuthService;
import com.zyplayer.doc.data.service.manage.UserSettingService;
@@ -181,7 +181,7 @@ public class WikiSpaceController {
// 先删除页面的所有用户的权限
QueryWrapper<UserGroupAuth> updateWrapper = new QueryWrapper<>();
updateWrapper.eq("data_id", spaceId);
updateWrapper.eq("project_type", UserMsgSysType.WIKI.getType());
updateWrapper.eq("project_type", DocSysType.WIKI.getType());
userGroupAuthService.remove(updateWrapper);
// 在创建权限
List<UserSpaceAuthVo> authVoList = JSON.parseArray(authList, UserSpaceAuthVo.class);
@@ -210,7 +210,7 @@ public class WikiSpaceController {
}
QueryWrapper<UserGroupAuth> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("data_id", spaceId);
queryWrapper.eq("project_type", UserMsgSysType.WIKI.getType());
queryWrapper.eq("project_type", DocSysType.WIKI.getType());
List<UserGroupAuth> authList = userGroupAuthService.list(queryWrapper);
if (CollectionUtils.isEmpty(authList)) {
return DocResponseJson.ok();
@@ -247,7 +247,7 @@ public class WikiSpaceController {
userAuth.setCreateTime(new Date());
userAuth.setCreateUserId(currentUser.getUserId());
userAuth.setCreateUserName(currentUser.getUsername());
userAuth.setProjectType(UserMsgSysType.WIKI.getType());
userAuth.setProjectType(DocSysType.WIKI.getType());
userAuth.setDelFlag(0);
userAuthList.add(userAuth);
}

View File

@@ -18,11 +18,11 @@ public enum WikiAuthType {
PAGE_AUTH_MANAGE(7, "WIKI_PAGE_AUTH_MANAGE_"),
;
private Integer type;
private String name;
private String code;
WikiAuthType(Integer type, String name) {
WikiAuthType(Integer type, String code) {
this.type = type;
this.name = name;
this.code = code;
}
public Integer getType() {
@@ -33,11 +33,11 @@ public enum WikiAuthType {
this.type = type;
}
public String getName() {
return name;
public String getCode() {
return code;
}
public void setName(String name) {
this.name = name;
public void setCode(String code) {
this.code = code;
}
}

View File

@@ -3,8 +3,8 @@ package com.zyplayer.doc.wiki.service.common;
import com.zyplayer.doc.data.config.security.DocUserUtil;
import com.zyplayer.doc.data.repository.manage.entity.WikiSpace;
import com.zyplayer.doc.data.repository.manage.mapper.UserGroupAuthMapper;
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
import com.zyplayer.doc.data.repository.support.consts.UserMsgSysType;
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
import com.zyplayer.doc.wiki.framework.consts.SpaceType;
import com.zyplayer.doc.wiki.framework.consts.WikiAuthType;
import org.springframework.stereotype.Service;
@@ -43,10 +43,10 @@ public class WikiPageAuthService {
}
// 空间不是自己的,也没有权限
if (SpaceType.isOthersPersonal(wikiSpaceSel.getType(), currentUserId, wikiSpaceSel.getCreateUserId())) {
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.EDIT_PAGE.getName(), DocAuthConst.WIKI + pageId);
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.EDIT_PAGE.getCode(), DocSysType.WIKI.getType(), DocSysModuleType.Wiki.PAGE.getType(), pageId);
if (!pageAuth) {
// 在空间上直接授权了分组的权限,在这个分组里就具有权限
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), UserMsgSysType.WIKI.getType(), WikiAuthType.EDIT_PAGE.getType(), currentUserId);
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), DocSysType.WIKI.getType(), WikiAuthType.EDIT_PAGE.getType(), currentUserId);
if (authId == null) {
return "您没有修改该文章的权限!";
}
@@ -68,9 +68,9 @@ public class WikiPageAuthService {
return "只有个人空间才可以编辑权限";
}
if (!Objects.equals(currentUserId, wikiSpaceSel.getCreateUserId())) {
if (!DocUserUtil.haveCustomAuth(WikiAuthType.PAGE_AUTH_MANAGE.getName(), DocAuthConst.WIKI + pageId)) {
if (!DocUserUtil.haveCustomAuth(WikiAuthType.PAGE_AUTH_MANAGE.getCode(), DocSysType.WIKI.getType(), DocSysModuleType.Wiki.PAGE.getType(), pageId)) {
// 在空间上直接授权了分组的权限,在这个分组里就具有权限
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), UserMsgSysType.WIKI.getType(), WikiAuthType.PAGE_AUTH_MANAGE.getType(), currentUserId);
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), DocSysType.WIKI.getType(), WikiAuthType.PAGE_AUTH_MANAGE.getType(), currentUserId);
if (authId == null) {
return "您不是创建人或没有权限";
}
@@ -94,10 +94,10 @@ public class WikiPageAuthService {
}
// 空间不是自己的,也没有权限
if (SpaceType.isOthersPersonal(wikiSpaceSel.getType(), currentUserId, wikiSpaceSel.getCreateUserId())) {
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.PAGE_FILE_UPLOAD.getName(), DocAuthConst.WIKI + pageId);
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.PAGE_FILE_UPLOAD.getCode(), DocSysType.WIKI.getType(), DocSysModuleType.Wiki.PAGE.getType(), pageId);
if (!pageAuth) {
// 在空间上直接授权了分组的权限,在这个分组里就具有权限
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), UserMsgSysType.WIKI.getType(), WikiAuthType.PAGE_FILE_UPLOAD.getType(), currentUserId);
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), DocSysType.WIKI.getType(), WikiAuthType.PAGE_FILE_UPLOAD.getType(), currentUserId);
if (authId == null) {
return "您没有上传该文章附件的权限!";
}
@@ -121,10 +121,10 @@ public class WikiPageAuthService {
}
// 空间不是自己的,也没有权限
if (SpaceType.isOthersPersonal(wikiSpaceSel.getType(), currentUserId, wikiSpaceSel.getCreateUserId())) {
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.PAGE_FILE_DELETE.getName(), DocAuthConst.WIKI + pageId);
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.PAGE_FILE_DELETE.getCode(), DocSysType.WIKI.getType(), DocSysModuleType.Wiki.PAGE.getType(), pageId);
if (!pageAuth) {
// 在空间上直接授权了分组的权限,在这个分组里就具有权限
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), UserMsgSysType.WIKI.getType(), WikiAuthType.PAGE_FILE_DELETE.getType(), currentUserId);
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), DocSysType.WIKI.getType(), WikiAuthType.PAGE_FILE_DELETE.getType(), currentUserId);
if (authId == null) {
return "您没有删除该文章附件的权限!";
}
@@ -152,10 +152,10 @@ public class WikiPageAuthService {
}
// 空间不是自己的,也没有权限
if (SpaceType.isOthersPersonal(wikiSpaceSel.getType(), currentUserId, wikiSpaceSel.getCreateUserId())) {
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.DELETE_PAGE.getName(), DocAuthConst.WIKI + pageId);
boolean pageAuth = DocUserUtil.haveCustomAuth(WikiAuthType.DELETE_PAGE.getCode(), DocSysType.WIKI.getType(), DocSysModuleType.Wiki.PAGE.getType(), pageId);
if (!pageAuth) {
// 在空间上直接授权了分组的权限,在这个分组里就具有权限
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), UserMsgSysType.WIKI.getType(), WikiAuthType.DELETE_PAGE.getType(), currentUserId);
Long authId = userGroupAuthMapper.haveAuth(wikiSpaceSel.getId(), DocSysType.WIKI.getType(), WikiAuthType.DELETE_PAGE.getType(), currentUserId);
if (authId == null) {
return "您没有删除该文章的权限!";
}