注释完善
This commit is contained in:
@@ -1,35 +1,41 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||
import com.zyplayer.doc.core.json.ResponseJson;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.AuthInfo;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.service.manage.AuthInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户授权信息控制器
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/auth/info")
|
||||
@AuthMan(DocAuthConst.AUTH_MANAGE)
|
||||
public class AuthInfoController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@Resource
|
||||
AuthInfoService authInfoService;
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
public ResponseJson<Object> list() {
|
||||
List<AuthInfo> authList = authInfoService.list();
|
||||
return DocResponseJson.ok(authList);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/delete")
|
||||
public ResponseJson<Object> delete(Long id) {
|
||||
AuthInfo authInfo = authInfoService.getById(id);
|
||||
@@ -39,7 +45,7 @@ public class AuthInfoController {
|
||||
authInfoService.removeById(id);
|
||||
return DocResponseJson.ok();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
public ResponseJson<Object> update(Long id, String authName, String authDesc) {
|
||||
AuthInfo authInfo = new AuthInfo();
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -8,6 +8,9 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* 使用路劲的方式访问页面
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2019-06-05
|
||||
*/
|
||||
@Controller
|
||||
public class DocSystemController {
|
||||
@@ -49,12 +52,4 @@ public class DocSystemController {
|
||||
modelAndView.setStatus(HttpStatus.OK);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@AuthMan
|
||||
@GetMapping("/doc-es")
|
||||
public ModelAndView es() {
|
||||
ModelAndView modelAndView = new ModelAndView("/doc-es.html");
|
||||
modelAndView.setStatus(HttpStatus.OK);
|
||||
return modelAndView;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
@@ -9,7 +8,7 @@ import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.UserInfo;
|
||||
import com.zyplayer.doc.data.service.manage.UserAuthService;
|
||||
import com.zyplayer.doc.data.service.manage.UserInfoService;
|
||||
import com.zyplayer.doc.manage.web.manage.param.LdapPerson;
|
||||
import com.zyplayer.doc.manage.web.param.LdapPerson;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -33,6 +32,9 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户登录控制器
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-08
|
||||
*/
|
||||
@RestController
|
||||
public class LoginController {
|
||||
@@ -1,19 +1,25 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||
import com.zyplayer.doc.core.json.ResponseJson;
|
||||
import com.zyplayer.doc.manage.utils.UpgradeUtil;
|
||||
import com.zyplayer.doc.manage.task.UpgradeUtil;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 系统信息控制器
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2019-04-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/info")
|
||||
public class SystemInfoController {
|
||||
|
||||
|
||||
@PostMapping("/upgrade")
|
||||
public ResponseJson<Object> upgradeInfo() {
|
||||
return DocResponseJson.ok(UpgradeUtil.upgradeInfo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||
import com.zyplayer.doc.core.json.ResponseJson;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.AuthInfo;
|
||||
@@ -16,20 +16,27 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户权限控制器
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/auth")
|
||||
@AuthMan(DocAuthConst.AUTH_ASSIGN)
|
||||
public class UserAuthController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@Resource
|
||||
AuthInfoService authInfoService;
|
||||
@Autowired
|
||||
@Resource
|
||||
UserAuthService userAuthService;
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
public ResponseJson<Object> list(Long userId) {
|
||||
QueryWrapper<UserAuth> userAuthWrapper = new QueryWrapper<>();
|
||||
@@ -43,13 +50,13 @@ public class UserAuthController {
|
||||
List<AuthInfo> authList = authInfoService.list(authQueryWrapper);
|
||||
return DocResponseJson.ok(authList);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/delete")
|
||||
public ResponseJson<Object> delete(Long id) {
|
||||
userAuthService.removeById(id);
|
||||
return DocResponseJson.ok();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/insert")
|
||||
public ResponseJson<Object> insert(Long id, Long userId, Long authId) {
|
||||
DocUserDetails currentUser = DocUserUtil.getCurrentUser();
|
||||
@@ -66,5 +73,5 @@ public class UserAuthController {
|
||||
}
|
||||
return DocResponseJson.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
@@ -22,10 +22,16 @@ import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户分组控制器
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2021-02-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/group")
|
||||
public class UserGroupController {
|
||||
|
||||
|
||||
@Resource
|
||||
UserGroupService userGroupService;
|
||||
@Resource
|
||||
@@ -1,9 +1,10 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
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;
|
||||
@@ -18,12 +19,11 @@ import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.service.manage.AuthInfoService;
|
||||
import com.zyplayer.doc.data.service.manage.UserAuthService;
|
||||
import com.zyplayer.doc.data.service.manage.UserInfoService;
|
||||
import com.zyplayer.doc.manage.web.manage.param.UserListParam;
|
||||
import com.zyplayer.doc.manage.web.manage.vo.AuthInfoVo;
|
||||
import com.zyplayer.doc.manage.web.manage.vo.UserAuthVo;
|
||||
import com.zyplayer.doc.manage.web.manage.vo.UserInfoAuthVo;
|
||||
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 com.github.dozermapper.core.Mapper;
|
||||
import org.springframework.util.DigestUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -34,10 +34,16 @@ import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户信息控制器
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/info")
|
||||
public class UserInfoController {
|
||||
|
||||
|
||||
@Resource
|
||||
UserInfoService userInfoService;
|
||||
@Resource
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
package com.zyplayer.doc.manage.web;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -1,118 +0,0 @@
|
||||
package com.zyplayer.doc.manage.web.manage.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-05
|
||||
*/
|
||||
public class AuthInfoVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键自增ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 是否选中
|
||||
*/
|
||||
private Integer checked;
|
||||
|
||||
/**
|
||||
* 权限名
|
||||
*/
|
||||
private String authName;
|
||||
|
||||
/**
|
||||
* 权限说明
|
||||
*/
|
||||
private String authDesc;
|
||||
|
||||
/**
|
||||
* 是否可编辑 0=否 1=是
|
||||
*/
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createUid;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date creationTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getAuthName() {
|
||||
return authName;
|
||||
}
|
||||
|
||||
public void setAuthName(String authName) {
|
||||
this.authName = authName;
|
||||
}
|
||||
public String getAuthDesc() {
|
||||
return authDesc;
|
||||
}
|
||||
|
||||
public void setAuthDesc(String authDesc) {
|
||||
this.authDesc = authDesc;
|
||||
}
|
||||
public Integer getCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(Integer canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
public Long getCreateUid() {
|
||||
return createUid;
|
||||
}
|
||||
|
||||
public void setCreateUid(Long createUid) {
|
||||
this.createUid = createUid;
|
||||
}
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AuthInfo{" +
|
||||
"id=" + id +
|
||||
", authName=" + authName +
|
||||
", authDesc=" + authDesc +
|
||||
", canEdit=" + canEdit +
|
||||
", createUid=" + createUid +
|
||||
", creationTime=" + creationTime +
|
||||
"}";
|
||||
}
|
||||
|
||||
public Integer getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(Integer checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
}
|
||||
@@ -17,9 +17,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package com.zyplayer.doc.manage.web.manage.param;
|
||||
|
||||
package com.zyplayer.doc.manage.web.param;
|
||||
|
||||
/**
|
||||
* 域账号用户信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2021年8月2日
|
||||
*/
|
||||
public class LdapPerson {
|
||||
|
||||
/**
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.zyplayer.doc.manage.web.manage.param;
|
||||
package com.zyplayer.doc.manage.web.param;
|
||||
|
||||
/**
|
||||
* 域账号用户列表查询参数
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2021年8月2日
|
||||
*/
|
||||
public class UserListParam {
|
||||
private Integer type;
|
||||
private String keyword;
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zyplayer.doc.manage.web.swagger;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.zyplayer.doc.data.repository.manage.mapper.ZyplayerStorageMapper;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/zyplayer/storage")
|
||||
public class ZyplayerStorageController {
|
||||
|
||||
@Autowired
|
||||
ZyplayerStorageMapper zyplayerStorageMapper;
|
||||
|
||||
@RequestMapping("/mapper")
|
||||
public String mapper() {
|
||||
Integer selectTop = zyplayerStorageMapper.selectTop();
|
||||
return "selectTop:" + selectTop;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.zyplayer.doc.manage.web.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户授权信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-15
|
||||
*/
|
||||
public class AuthInfoVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键自增ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 是否选中
|
||||
*/
|
||||
private Integer checked;
|
||||
|
||||
/**
|
||||
* 权限名
|
||||
*/
|
||||
private String authName;
|
||||
|
||||
/**
|
||||
* 权限说明
|
||||
*/
|
||||
private String authDesc;
|
||||
|
||||
/**
|
||||
* 是否可编辑 0=否 1=是
|
||||
*/
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createUid;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date creationTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAuthName() {
|
||||
return authName;
|
||||
}
|
||||
|
||||
public void setAuthName(String authName) {
|
||||
this.authName = authName;
|
||||
}
|
||||
|
||||
public String getAuthDesc() {
|
||||
return authDesc;
|
||||
}
|
||||
|
||||
public void setAuthDesc(String authDesc) {
|
||||
this.authDesc = authDesc;
|
||||
}
|
||||
|
||||
public Integer getCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(Integer canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
public Long getCreateUid() {
|
||||
return createUid;
|
||||
}
|
||||
|
||||
public void setCreateUid(Long createUid) {
|
||||
this.createUid = createUid;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AuthInfo{" +
|
||||
"id=" + id +
|
||||
", authName=" + authName +
|
||||
", authDesc=" + authDesc +
|
||||
", canEdit=" + canEdit +
|
||||
", createUid=" + createUid +
|
||||
", creationTime=" + creationTime +
|
||||
"}";
|
||||
}
|
||||
|
||||
public Integer getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(Integer checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.zyplayer.doc.manage.web.manage.vo;
|
||||
package com.zyplayer.doc.manage.web.vo;
|
||||
|
||||
/**
|
||||
* 用户权限信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-15
|
||||
*/
|
||||
public class UserAuthVo {
|
||||
private boolean userManage;
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package com.zyplayer.doc.manage.web.manage.vo;
|
||||
package com.zyplayer.doc.manage.web.vo;
|
||||
|
||||
import com.zyplayer.doc.data.repository.manage.entity.UserInfo;
|
||||
|
||||
/**
|
||||
* 用户授权信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-05
|
||||
*/
|
||||
public class UserInfoAuthVo {
|
||||
private UserInfo userInfo;
|
||||
private UserAuthVo userAuth;
|
||||
Reference in New Issue
Block a user