删除不需要的代码,优化结构

This commit is contained in:
暮光:城中城
2022-12-07 20:21:18 +08:00
parent e82937297b
commit c62d733869
215 changed files with 334 additions and 57771 deletions

View File

@@ -1,6 +1,5 @@
package com.zyplayer.doc.manage.web;
import com.zyplayer.doc.core.annotation.AuthMan;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@@ -42,11 +41,4 @@ public class DocSystemController {
modelAndView.setStatus(HttpStatus.OK);
return modelAndView;
}
@GetMapping("/doc-dubbo")
public ModelAndView dubbo() {
ModelAndView modelAndView = new ModelAndView("/doc-dubbo.html");
modelAndView.setStatus(HttpStatus.OK);
return modelAndView;
}
}

View File

@@ -13,7 +13,7 @@ import com.zyplayer.doc.data.repository.manage.mapper.UserGroupMapper;
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
import com.zyplayer.doc.data.service.manage.UserGroupRelationService;
import com.zyplayer.doc.data.service.manage.UserGroupService;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@@ -4,9 +4,6 @@ import cn.hutool.core.util.RandomUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.dozermapper.core.Mapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zyplayer.doc.core.annotation.AuthMan;
import com.zyplayer.doc.core.json.DocResponseJson;
import com.zyplayer.doc.core.json.ResponseJson;
@@ -23,7 +20,8 @@ import com.zyplayer.doc.manage.web.param.UserListParam;
import com.zyplayer.doc.manage.web.vo.AuthInfoVo;
import com.zyplayer.doc.manage.web.vo.UserAuthVo;
import com.zyplayer.doc.manage.web.vo.UserInfoAuthVo;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -50,8 +48,6 @@ public class UserInfoController {
AuthInfoService authInfoService;
@Resource
UserAuthService userAuthService;
@Resource
Mapper mapper;
@AuthMan
@PostMapping("/selfInfo")
@@ -104,13 +100,13 @@ public class UserInfoController {
queryWrapper.like(param.getType() == 5, "email", param.getKeyword());
}
queryWrapper.ne("del_flag", 1);
PageHelper.startPage(param.getPageNum(), param.getPageSize(), true);
List<UserInfo> userInfoList = userInfoService.list(queryWrapper);
if (userInfoList != null && userInfoList.size() > 0) {
IPage<UserInfo> page = new Page<>(param.getPageNum(), param.getPageSize(), true);
userInfoService.page(page, queryWrapper);
List<UserInfo> userInfoList = page.getRecords();
if (CollectionUtils.isNotEmpty(userInfoList)) {
userInfoList.forEach(val -> val.setPassword(""));
}
PageInfo<UserInfo> pageInfo = new PageInfo<>(userInfoList);
return DocResponseJson.ok(pageInfo);
return DocResponseJson.ok(page);
}
@AuthMan(DocAuthConst.USER_MANAGE)
@@ -215,7 +211,7 @@ public class UserInfoController {
List<AuthInfoVo> authInfoVoList = new LinkedList<>();
authList.forEach(val -> {
UserAuth userAuth = userAuthMap.get(val.getId());
AuthInfoVo infoVo = mapper.map(val, AuthInfoVo.class);
AuthInfoVo infoVo = new AuthInfoVo(val);
infoVo.setChecked((userAuth == null) ? 0 : 1);
authInfoVoList.add(infoVo);
});

View File

@@ -10,7 +10,7 @@ import com.zyplayer.doc.data.config.security.DocUserDetails;
import com.zyplayer.doc.data.config.security.DocUserUtil;
import com.zyplayer.doc.data.repository.manage.entity.UserMessage;
import com.zyplayer.doc.data.service.manage.UserMessageService;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@@ -2,6 +2,7 @@ package com.zyplayer.doc.manage.web.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.zyplayer.doc.data.repository.manage.entity.AuthInfo;
import java.io.Serializable;
import java.util.Date;
@@ -52,6 +53,15 @@ public class AuthInfoVo implements Serializable {
*/
private Date creationTime;
public AuthInfoVo(AuthInfo authInfo) {
this.id = authInfo.getId();
this.authName = authInfo.getAuthName();
this.authDesc = authInfo.getAuthDesc();
this.canEdit = authInfo.getCanEdit();
this.createUid = authInfo.getCreateUid();
this.creationTime = authInfo.getCreationTime();
}
public Long getId() {
return id;
}