Compare commits
No commits in common. "dev" and "master" have entirely different histories.
|
@ -77,25 +77,5 @@
|
|||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>bootstrap</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>font-awesome</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>jquery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>13.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
package com.auth.common.event;
|
|
@ -0,0 +1 @@
|
|||
package com.auth.common.model.bo;
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "分页返回结果", title = "分页返回结果", description = "分页返回结果")
|
||||
@Schema(name = "PageResult 对象", title = "分页返回结果", description = "分页返回结果")
|
||||
public class PageResult<T> implements Serializable {
|
||||
|
||||
@Schema(name = "pageNo", title = "当前页")
|
||||
|
|
|
@ -5,9 +5,6 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
|
@ -18,8 +15,6 @@ public class Result<T> {
|
|||
private String message;
|
||||
// 返回数据
|
||||
private T data;
|
||||
// 权限范围
|
||||
private List<String> auths;
|
||||
|
||||
/**
|
||||
* 自定义返回体
|
||||
|
@ -33,60 +28,17 @@ public class Result<T> {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义返回体
|
||||
*
|
||||
* @param data 返回体
|
||||
* @param auths 权限范围
|
||||
* @return Result<T>
|
||||
*/
|
||||
protected static <T> Result<T> build(T data, List<String> auths) {
|
||||
Result<T> result = new Result<>();
|
||||
result.setData(data);
|
||||
result.setAuths(auths);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义返回体,使用ResultCodeEnum构建
|
||||
*
|
||||
* @param data 返回体
|
||||
* @param codeEnum 返回状态码
|
||||
* @return {@link Result<T>}
|
||||
*/
|
||||
public static <T> Result<T> build(T data, ResultCodeEnum codeEnum) {
|
||||
Result<T> result = build(data);
|
||||
result.setCode(codeEnum.getCode());
|
||||
result.setMessage(codeEnum.getMessage());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义返回体,使用ResultCodeEnum构建
|
||||
*
|
||||
* @param data 返回体
|
||||
* @param codeEnum 返回状态码
|
||||
* @return {@link Result<T>}
|
||||
*/
|
||||
public static <T> Result<T> build(T data, List<String> auths, ResultCodeEnum codeEnum) {
|
||||
Result<T> result = build(data);
|
||||
result.setCode(codeEnum.getCode());
|
||||
result.setMessage(codeEnum.getMessage());
|
||||
result.setAuths(auths);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义返回体,使用ResultCodeEnum构建
|
||||
*
|
||||
* @param body 返回体
|
||||
* @param codeEnum 返回状态码
|
||||
* @return Result<T>
|
||||
*/
|
||||
public static <T> Result<T> build(List<String> auths, ResultCodeEnum codeEnum) {
|
||||
Result<T> result = build(null);
|
||||
public static <T> Result<T> build(T body, ResultCodeEnum codeEnum) {
|
||||
Result<T> result = build(body);
|
||||
result.setCode(codeEnum.getCode());
|
||||
result.setMessage(codeEnum.getMessage());
|
||||
result.setAuths(auths);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -96,15 +48,13 @@ public class Result<T> {
|
|||
* @param body 返回体
|
||||
* @param code 返回状态码
|
||||
* @param message 返回消息
|
||||
* @param auths 权限范围
|
||||
* @return {@link Result<T>}
|
||||
* @return Result<T>
|
||||
*/
|
||||
public static <T> Result<T> build(T body, Integer code, String message, List<String> auths) {
|
||||
public static <T> Result<T> build(T body, Integer code, String message) {
|
||||
Result<T> result = build(body);
|
||||
result.setCode(code);
|
||||
result.setMessage(message);
|
||||
result.setData(null);
|
||||
result.setAuths(auths);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -126,16 +76,6 @@ public class Result<T> {
|
|||
return build(data, ResultCodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功
|
||||
*
|
||||
* @param data baseCategory1List
|
||||
* @param auths 权限范围
|
||||
*/
|
||||
public static <T> Result<T> success(T data, List<String> auths) {
|
||||
return build(data, auths, ResultCodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功-状态码
|
||||
*
|
||||
|
@ -145,33 +85,14 @@ public class Result<T> {
|
|||
return success(null, codeEnum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功-状态码
|
||||
*
|
||||
* @param codeEnum 状态码
|
||||
*/
|
||||
public static <T> Result<T> success(T data, ResultCodeEnum codeEnum) {
|
||||
return success(data, new ArrayList<>(), codeEnum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功-状态码
|
||||
*
|
||||
* @param codeEnum 状态码
|
||||
*/
|
||||
public static <T> Result<T> success(List<String> auths, ResultCodeEnum codeEnum) {
|
||||
return build(null, auths, codeEnum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功-自定义返回数据和状态码
|
||||
*
|
||||
* @param data 返回体
|
||||
* @param auths 权限范围
|
||||
* @param codeEnum 状态码
|
||||
*/
|
||||
public static <T> Result<T> success(T data, List<String> auths, ResultCodeEnum codeEnum) {
|
||||
return build(data, auths, codeEnum);
|
||||
public static <T> Result<T> success(T data, ResultCodeEnum codeEnum) {
|
||||
return build(data, codeEnum);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -181,7 +102,7 @@ public class Result<T> {
|
|||
* @param message 错误信息
|
||||
*/
|
||||
public static <T> Result<T> success(T data, String message) {
|
||||
return build(data, 200, message, new ArrayList<>());
|
||||
return build(data, 200, message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -192,7 +113,7 @@ public class Result<T> {
|
|||
* @param message 错误信息
|
||||
*/
|
||||
public static <T> Result<T> success(T data, Integer code, String message) {
|
||||
return build(data, code, message, new ArrayList<>());
|
||||
return build(data, code, message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -238,7 +159,7 @@ public class Result<T> {
|
|||
* @param message 错误信息
|
||||
*/
|
||||
public static <T> Result<T> error(T data, Integer code, String message) {
|
||||
return build(data, code, message, new ArrayList<>());
|
||||
return build(data, code, message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -248,6 +169,6 @@ public class Result<T> {
|
|||
* @param message 错误信息
|
||||
*/
|
||||
public static <T> Result<T> error(T data, String message) {
|
||||
return build(null, 500, message, new ArrayList<>());
|
||||
return build(null, 500, message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "DeptDTO-部门传输类", title = "部门", description = "部门的DTO对象")
|
||||
@Schema(name = "DeptDTO对象", title = "部门表", description = "部门表的DTO对象")
|
||||
public class DeptDto {
|
||||
|
||||
@Schema(name = "parentId", title = "父级id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "DictDTO-系统数据字典传输", title = "系统数据字典", description = "系统数据字典的DTO对象")
|
||||
@Schema(name = "DictDTO对象", title = "系统数据字典", description = "系统数据字典的DTO对象")
|
||||
public class DictDto {
|
||||
|
||||
@Schema(name = "dictType", title = "字典类型")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "EmailConfigDTO-系统邮件服务器配置传输对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的DTO对象")
|
||||
@Schema(name = "EmailConfigDTO对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的DTO对象")
|
||||
public class EmailConfigDto {
|
||||
|
||||
@Schema(name = "configName", title = "配置名称")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "EmailTemplateDTO-邮件模板传输对象", title = "邮件模板", description = "邮件模板的DTO对象")
|
||||
@Schema(name = "EmailTemplateDTO对象", title = "邮件模板表", description = "邮件模板表的DTO对象")
|
||||
public class EmailTemplateDto {
|
||||
|
||||
@Schema(name = "templateName", title = "模板名称")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "FileDTO-系统文件存储传输对象", title = "系统文件存储", description = "系统文件存储的DTO对象")
|
||||
@Schema(name = "FileDTO对象", title = "系统文件存储", description = "系统文件存储的DTO对象")
|
||||
public class FileDto {
|
||||
|
||||
@Schema(name = "fileUid", title = "文件唯一标识(可用于外部引用)")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "LoginLogDTO-系统用户登录日志传输对象", title = "系统用户登录日志", description = "系统用户登录日志的DTO对象")
|
||||
@Schema(name = "LoginLogDTO对象", title = "系统用户登录日志", description = "系统用户登录日志的DTO对象")
|
||||
public class LoginLogDto {
|
||||
|
||||
@Schema(name = "userId", title = "用户ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "MenuDTO-系统菜单权限传输对象", title = "系统菜单权限", description = "系统菜单权限的DTO对象")
|
||||
@Schema(name = "MenuDTO对象", title = "系统菜单权限", description = "系统菜单权限的DTO对象")
|
||||
public class MenuDto {
|
||||
|
||||
@Schema(name = "parentId", title = "父菜单ID(0表示一级菜单)")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "MenuRoleDTO-系统菜单角色关联传输对象", title = "系统菜单角色关联", description = "系统菜单角色关联的DTO对象")
|
||||
@Schema(name = "MenuRoleDTO对象", title = "系统菜单角色关联", description = "系统菜单角色关联的DTO对象")
|
||||
public class MenuRoleDto {
|
||||
|
||||
@Schema(name = "roleId", title = "角色ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "OperationLogDTO-系统操作日志传输对象", title = "系统操作日志", description = "系统操作日志的DTO对象")
|
||||
@Schema(name = "OperationLogDTO对象", title = "系统操作日志", description = "系统操作日志的DTO对象")
|
||||
public class OperationLogDto {
|
||||
|
||||
@Schema(name = "module", title = "操作模块")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "PermissionDTO-系统权限传输对象", title = "系统权限", description = "系统权限的DTO对象")
|
||||
@Schema(name = "PermissionDTO对象", title = "系统权限表", description = "系统权限表的DTO对象")
|
||||
public class PermissionDto {
|
||||
|
||||
@Schema(name = "parentId", title = "父级id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "RoleDataScopeDTO-系统角色数据权限范围传输对象", title = "系统角色数据权限范围", description = "系统角色数据权限范围的DTO对象")
|
||||
@Schema(name = "RoleDataScopeDTO对象", title = "系统角色数据权限范围", description = "系统角色数据权限范围的DTO对象")
|
||||
public class RoleDataScopeDto {
|
||||
|
||||
@Schema(name = "roleId", title = "角色ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "RoleDTO-系统角色传输对象", title = "系统角色", description = "系统角色的DTO对象")
|
||||
@Schema(name = "RoleDTO对象", title = "系统角色表", description = "系统角色表的DTO对象")
|
||||
public class RoleDto {
|
||||
|
||||
@Schema(name = "roleCode", title = "角色代码")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "RolePermissionDTO-系统角色权限传输对象", title = "系统角色权限", description = "系统角色权限的DTO对象")
|
||||
@Schema(name = "RolePermissionDTO对象", title = "系统角色权限表", description = "系统角色权限表的DTO对象")
|
||||
public class RolePermissionDto {
|
||||
|
||||
@Schema(name = "roleId", title = "角色id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "UserDeptDTO-部门用户关系传输对象", title = "部门用户关系", description = "部门用户关系的DTO对象")
|
||||
@Schema(name = "UserDeptDTO对象", title = "部门用户关系表", description = "部门用户关系表的DTO对象")
|
||||
public class UserDeptDto {
|
||||
|
||||
@Schema(name = "userId", title = "用户id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -13,7 +13,7 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "UserDTO-用户信息传输对象", title = "用户信息", description = "用户信息的DTO对象")
|
||||
@Schema(name = "UserDTO对象", title = "用户信息", description = "用户信息的DTO对象")
|
||||
public class UserDto {
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
|
@ -31,7 +31,7 @@ public class UserDto {
|
|||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(name = "avatar", title = "头像URL")
|
||||
@Schema(name = "avatar", title = "")
|
||||
private String avatar;
|
||||
|
||||
@Schema(name = "sex", title = "0:女 1:男")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.dto;
|
||||
package com.auth.common.model.dto.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "UserRoleDTO-系统用户角色关系传输对象", title = "系统用户角色关系", description = "系统用户角色关系的DTO对象")
|
||||
@Schema(name = "UserRoleDTO对象", title = "系统用户角色关系表", description = "系统用户角色关系表的DTO对象")
|
||||
public class UserRoleDto {
|
||||
|
||||
@Schema(name = "userId", title = "用户id")
|
|
@ -0,0 +1 @@
|
|||
package com.auth.common.model.dto;
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_dept")
|
||||
@Schema(name = "Dept-部门实体类", title = "部门", description = "部门的实体类对象")
|
||||
@Schema(name = "Dept对象", title = "部门表", description = "部门表的实体类对象")
|
||||
public class DeptEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "parentId", title = "父级id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_dict")
|
||||
@Schema(name = "Dict-系统数据字典实体类", title = "系统数据字典", description = "系统数据字典的实体类对象")
|
||||
@Schema(name = "Dict对象", title = "系统数据字典", description = "系统数据字典的实体类对象")
|
||||
public class DictEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "dictType", title = "字典类型")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_email_config")
|
||||
@Schema(name = "EmailConfig-系统邮件服务器配置实体类对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的实体类对象")
|
||||
@Schema(name = "EmailConfig对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的实体类对象")
|
||||
public class EmailConfigEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "configName", title = "配置名称")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_email_template")
|
||||
@Schema(name = "EmailTemplate-邮件模板实体类", title = "邮件模板", description = "邮件模板的实体类对象")
|
||||
@Schema(name = "EmailTemplate对象", title = "邮件模板表", description = "邮件模板表的实体类对象")
|
||||
public class EmailTemplateEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "templateName", title = "模板名称")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_file")
|
||||
@Schema(name = "File-系统文件存储实体类", title = "系统文件存储", description = "系统文件存储的实体类对象")
|
||||
@Schema(name = "File对象", title = "系统文件存储", description = "系统文件存储的实体类对象")
|
||||
public class FileEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "fileUid", title = "文件唯一标识(可用于外部引用)")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_login_log")
|
||||
@Schema(name = "LoginLog-系统用户登录日志实体类", title = "系统用户登录日志", description = "系统用户登录日志的实体类对象")
|
||||
@Schema(name = "LoginLog对象", title = "系统用户登录日志", description = "系统用户登录日志的实体类对象")
|
||||
public class LoginLogEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "userId", title = "用户ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_menu")
|
||||
@Schema(name = "Menu-系统菜单权限实体类", title = "系统菜单权限", description = "系统菜单权限的实体类对象")
|
||||
@Schema(name = "Menu对象", title = "系统菜单权限", description = "系统菜单权限的实体类对象")
|
||||
public class MenuEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "parentId", title = "父菜单ID(0表示一级菜单)")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_menu_role")
|
||||
@Schema(name = "MenuRole-系统菜单角色关联实体类", title = "系统菜单角色关联", description = "系统菜单角色关联的实体类对象")
|
||||
@Schema(name = "MenuRole对象", title = "系统菜单角色关联", description = "系统菜单角色关联的实体类对象")
|
||||
public class MenuRoleEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "roleId", title = "角色ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_operation_log")
|
||||
@Schema(name = "OperationLog-系统操作日志实体类", title = "系统操作日志", description = "系统操作日志的实体类对象")
|
||||
@Schema(name = "OperationLog对象", title = "系统操作日志", description = "系统操作日志的实体类对象")
|
||||
public class OperationLogEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "module", title = "操作模块")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_permission")
|
||||
@Schema(name = "Permission-系统权限实体类", title = "系统权限", description = "系统权限的实体类对象")
|
||||
@Schema(name = "Permission对象", title = "系统权限表", description = "系统权限表的实体类对象")
|
||||
public class PermissionEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "parentId", title = "父级id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_role_data_scope")
|
||||
@Schema(name = "RoleDataScope-系统角色数据权限范围实体类", title = "系统角色数据权限范围", description = "系统角色数据权限范围的实体类对象")
|
||||
@Schema(name = "RoleDataScope对象", title = "系统角色数据权限范围", description = "系统角色数据权限范围的实体类对象")
|
||||
public class RoleDataScopeEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "roleId", title = "角色ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_role")
|
||||
@Schema(name = "Role-系统角色实体类", title = "系统角色", description = "系统角色的实体类对象")
|
||||
@Schema(name = "Role对象", title = "系统角色表", description = "系统角色表的实体类对象")
|
||||
public class RoleEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "roleCode", title = "角色代码")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_role_permission")
|
||||
@Schema(name = "RolePermission-系统角色权限实体类", title = "系统角色权限", description = "系统角色权限的实体类对象")
|
||||
@Schema(name = "RolePermission对象", title = "系统角色权限表", description = "系统角色权限表的实体类对象")
|
||||
public class RolePermissionEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "roleId", title = "角色id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_user_dept")
|
||||
@Schema(name = "UserDept-部门用户关系实体类", title = "部门用户关系", description = "部门用户关系的实体类对象")
|
||||
@Schema(name = "UserDept对象", title = "部门用户关系表", description = "部门用户关系表的实体类对象")
|
||||
public class UserDeptEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "userId", title = "用户id")
|
|
@ -0,0 +1,127 @@
|
|||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.security.core.CredentialsContainer;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_user")
|
||||
@Schema(name = "User对象", title = "用户信息", description = "用户信息的实体类对象")
|
||||
public class UserEntity implements UserDetails, CredentialsContainer {
|
||||
|
||||
@Schema(name = "id", title = "唯一标识")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "nickname", title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@Schema(name = "email", title = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(name = "phone", title = "手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(name = "avatar", title = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(name = "sex", title = "0:女 1:男")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(name = "summary", title = "个人描述")
|
||||
private String summary;
|
||||
|
||||
@Schema(name = "ipAddress", title = "最后登录IP")
|
||||
private String ipAddress;
|
||||
|
||||
@Schema(name = "ipRegion", title = "最后登录ip归属地")
|
||||
private String ipRegion;
|
||||
|
||||
@Schema(name = "status", title = "1:禁用 0:正常")
|
||||
private Integer status;
|
||||
|
||||
@Schema(name = "isDeleted", title = "是否删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
@Schema(name = "salt", title = "密码盐值")
|
||||
private String salt;
|
||||
|
||||
@Schema(name = "gender", title = "性别(0=未知,1=男,2=女)")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(name = "birthday", title = "出生日期")
|
||||
private Date birthday;
|
||||
|
||||
@Schema(name = "introduction", title = "个人简介")
|
||||
private String introduction;
|
||||
|
||||
@Schema(name = "lastLoginIp", title = "最后登录IP")
|
||||
private String lastLoginIp;
|
||||
|
||||
@Schema(name = "lastLoginRegion", title = "最后登录地区")
|
||||
private String lastLoginRegion;
|
||||
|
||||
@Schema(name = "lastLoginTime", title = "最后登录时间")
|
||||
private LocalDateTime lastLoginTime;
|
||||
|
||||
@Schema(name = "deptId", title = "所属部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(name = "postId", title = "所属岗位ID")
|
||||
private Long postId;
|
||||
|
||||
@Schema(name = "createTime", title = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(name = "updateTime", title = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(name = "createUser", title = "创建用户")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long createUser;
|
||||
|
||||
@Schema(name = "updateUser", title = "操作用户")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long updateUser;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Set<? extends GrantedAuthority> authorities;
|
||||
|
||||
@Override
|
||||
public void eraseCredentials() {
|
||||
this.password = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<? extends GrantedAuthority> getAuthorities() {
|
||||
return this.authorities;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.dao.base.entity;
|
||||
package com.auth.common.model.entity.base;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
|
|||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_user_role")
|
||||
@Schema(name = "UserRole系统用户角色关系实体类", title = "系统用户角色关系", description = "系统用户角色关系的实体类对象")
|
||||
@Schema(name = "UserRole对象", title = "系统用户角色关系表", description = "系统用户角色关系表的实体类对象")
|
||||
public class UserRoleEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "userId", title = "用户id")
|
|
@ -0,0 +1 @@
|
|||
package com.auth.common.model.entity;
|
|
@ -5,4 +5,4 @@
|
|||
* 当这个概念可能被多个实体共享使用时
|
||||
* 当这个概念需要保证不变性和线程安全时
|
||||
*/
|
||||
package com.auth.model.base.value;
|
||||
package com.auth.common.model.value;
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "DeptVO-部门返回对象", title = "部门", description = "部门的VO对象")
|
||||
@Schema(name = "DeptVO对象", title = "部门表", description = "部门表的VO对象")
|
||||
public class DeptVo {
|
||||
|
||||
@Schema(name = "parentId", title = "父级id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "DictVO-系统数据字典返回对象", title = "系统数据字典", description = "系统数据字典的VO对象")
|
||||
@Schema(name = "DictVO对象", title = "系统数据字典", description = "系统数据字典的VO对象")
|
||||
public class DictVo {
|
||||
|
||||
@Schema(name = "dictType", title = "字典类型")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "EmailConfigVO-系统邮件服务器配置返回对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的VO对象")
|
||||
@Schema(name = "EmailConfigVO对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的VO对象")
|
||||
public class EmailConfigVo {
|
||||
|
||||
@Schema(name = "configName", title = "配置名称")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "EmailTemplateVO-邮件模板返回对象", title = "邮件模板", description = "邮件模板的VO对象")
|
||||
@Schema(name = "EmailTemplateVO对象", title = "邮件模板表", description = "邮件模板表的VO对象")
|
||||
public class EmailTemplateVo {
|
||||
|
||||
@Schema(name = "templateName", title = "模板名称")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "FileVO-系统文件存储返回对象", title = "系统文件存储", description = "系统文件存储的VO对象")
|
||||
@Schema(name = "FileVO对象", title = "系统文件存储", description = "系统文件存储的VO对象")
|
||||
public class FileVo {
|
||||
|
||||
@Schema(name = "fileUid", title = "文件唯一标识(可用于外部引用)")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "LoginLogVO-系统用户登录日志返回对象", title = "系统用户登录日志", description = "系统用户登录日志的VO对象")
|
||||
@Schema(name = "LoginLogVO对象", title = "系统用户登录日志", description = "系统用户登录日志的VO对象")
|
||||
public class LoginLogVo {
|
||||
|
||||
@Schema(name = "userId", title = "用户ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "MenuRoleVO-系统菜单角色关联返回对象", title = "系统菜单角色关联", description = "系统菜单角色关联的VO对象")
|
||||
@Schema(name = "MenuRoleVO对象", title = "系统菜单角色关联", description = "系统菜单角色关联的VO对象")
|
||||
public class MenuRoleVo {
|
||||
|
||||
@Schema(name = "roleId", title = "角色ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "MenuVO-系统菜单权限返回对象", title = "系统菜单权限", description = "系统菜单权限的VO对象")
|
||||
@Schema(name = "MenuVO对象", title = "系统菜单权限", description = "系统菜单权限的VO对象")
|
||||
public class MenuVo {
|
||||
|
||||
@Schema(name = "parentId", title = "父菜单ID(0表示一级菜单)")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "OperationLogVO-系统操作日志返回对象", title = "系统操作日志", description = "系统操作日志的VO对象")
|
||||
@Schema(name = "OperationLogVO对象", title = "系统操作日志", description = "系统操作日志的VO对象")
|
||||
public class OperationLogVo {
|
||||
|
||||
@Schema(name = "module", title = "操作模块")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "PermissionVO-系统权限返回对象", title = "系统权限", description = "系统权限的VO对象")
|
||||
@Schema(name = "PermissionVO对象", title = "系统权限表", description = "系统权限表的VO对象")
|
||||
public class PermissionVo {
|
||||
|
||||
@Schema(name = "parentId", title = "父级id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "RoleDataScopeVO-系统角色数据权限范围返回对象", title = "系统角色数据权限范围", description = "系统角色数据权限范围的VO对象")
|
||||
@Schema(name = "RoleDataScopeVO对象", title = "系统角色数据权限范围", description = "系统角色数据权限范围的VO对象")
|
||||
public class RoleDataScopeVo {
|
||||
|
||||
@Schema(name = "roleId", title = "角色ID")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "RolePermissionVO-系统角色权限返回对象", title = "系统角色权限", description = "系统角色权限的VO对象")
|
||||
@Schema(name = "RolePermissionVO对象", title = "系统角色权限表", description = "系统角色权限表的VO对象")
|
||||
public class RolePermissionVo {
|
||||
|
||||
@Schema(name = "roleId", title = "角色id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "RoleVO-系统角色对象", title = "系统角色", description = "系统角色的VO对象")
|
||||
@Schema(name = "RoleVO对象", title = "系统角色表", description = "系统角色表的VO对象")
|
||||
public class RoleVo {
|
||||
|
||||
@Schema(name = "roleCode", title = "角色代码")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "UserDeptVO-部门用户关系返回对象", title = "部门用户关系", description = "部门用户关系的VO对象")
|
||||
@Schema(name = "UserDeptVO对象", title = "部门用户关系表", description = "部门用户关系表的VO对象")
|
||||
public class UserDeptVo {
|
||||
|
||||
@Schema(name = "userId", title = "用户id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "UserRoleVO-系统用户角色关系返回对象", title = "系统用户角色关系", description = "系统用户角色关系的VO对象")
|
||||
@Schema(name = "UserRoleVO对象", title = "系统用户角色关系表", description = "系统用户角色关系表的VO对象")
|
||||
public class UserRoleVo {
|
||||
|
||||
@Schema(name = "userId", title = "用户id")
|
|
@ -1,4 +1,4 @@
|
|||
package com.auth.model.base.vo;
|
||||
package com.auth.common.model.vo.base;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -11,7 +11,7 @@ import java.util.Date;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(name = "用户信息返回对象", title = "用户信息", description = "用户信息的VO对象")
|
||||
@Schema(name = "UserVO对象", title = "用户信息", description = "用户信息的VO对象")
|
||||
public class UserVo {
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
|
@ -29,7 +29,7 @@ public class UserVo {
|
|||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(name = "avatar", title = "头像URL")
|
||||
@Schema(name = "avatar", title = "")
|
||||
private String avatar;
|
||||
|
||||
@Schema(name = "sex", title = "0:女 1:男")
|
|
@ -0,0 +1 @@
|
|||
package com.auth.common.model.vo;
|
|
@ -21,10 +21,6 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.auth</groupId>
|
||||
<artifactId>model-base</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
package com.auth.dao.base.entity;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_auth_log")
|
||||
@Schema(name = "AuthLog-系统授权日志实体类", title = "系统授权日志", description = "系统授权日志的实体类对象")
|
||||
public class AuthLogEntity extends BaseEntity {
|
||||
|
||||
@Schema(name = "eventType", title = "事件类型(GRANTED=授权成功,DENIED=授权拒绝)")
|
||||
private String eventType;
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "userId", title = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "requestIp", title = "请求IP")
|
||||
private String requestIp;
|
||||
|
||||
@Schema(name = "requestMethod", title = "请求方法(GET,POST等)")
|
||||
private String requestMethod;
|
||||
|
||||
@Schema(name = "requestUri", title = "请求URI")
|
||||
private String requestUri;
|
||||
|
||||
@Schema(name = "className", title = "类名")
|
||||
private String className;
|
||||
|
||||
@Schema(name = "methodName", title = "方法名")
|
||||
private String methodName;
|
||||
|
||||
@Schema(name = "methodParams", title = "方法参数(JSON格式)")
|
||||
private String methodParams;
|
||||
|
||||
@Schema(name = "requiredAuthority", title = "所需权限达式")
|
||||
private String requiredAuthority;
|
||||
|
||||
@Schema(name = "userAuthorities", title = "用户拥有的权限(JSON格式)")
|
||||
private String userAuthorities;
|
||||
|
||||
@Schema(name = "decisionReason", title = "决策原因")
|
||||
private String decisionReason;
|
||||
|
||||
@Schema(name = "exceptionMessage", title = "异常信息")
|
||||
private String exceptionMessage;
|
||||
|
||||
@Schema(name = "isDeleted", title = "删除标志(0=未删除 1=已删除)")
|
||||
private Boolean isDeleted;
|
||||
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
package com.auth.dao.base.entity;
|
||||
|
||||
import com.auth.common.model.common.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_user")
|
||||
@Schema(name = "User-用户信息实体类", title = "用户信息", description = "用户信息的实体类对象")
|
||||
// 💡 根据自己需求看是否需要自定义用户信息
|
||||
public class UserEntity extends BaseEntity /* implements UserDetails, CredentialsContainer */ {
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "nickname", title = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@Schema(name = "email", title = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(name = "phone", title = "手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(name = "avatar", title = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(name = "summary", title = "个人描述")
|
||||
private String summary;
|
||||
|
||||
@Schema(name = "ipAddress", title = "最后登录IP")
|
||||
private String ipAddress;
|
||||
|
||||
@Schema(name = "ipRegion", title = "最后登录ip归属地")
|
||||
private String ipRegion;
|
||||
|
||||
@Schema(name = "status", title = "1:禁用 0:正常")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(name = "salt", title = "密码盐值")
|
||||
private String salt;
|
||||
|
||||
@Schema(name = "gender", title = "性别(0=未知,1=男,2=女)")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(name = "birthday", title = "出生日期")
|
||||
private Date birthday;
|
||||
|
||||
@Schema(name = "introduction", title = "个人简介")
|
||||
private String introduction;
|
||||
|
||||
@Schema(name = "lastLoginIp", title = "最后登录IP")
|
||||
private String lastLoginIp;
|
||||
|
||||
@Schema(name = "lastLoginRegion", title = "最后登录地区")
|
||||
private String lastLoginRegion;
|
||||
|
||||
@Schema(name = "lastLoginTime", title = "最后登录时间")
|
||||
private LocalDateTime lastLoginTime;
|
||||
|
||||
@Schema(name = "deptId", title = "所属部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(name = "postId", title = "所属岗位ID")
|
||||
private Long postId;
|
||||
|
||||
@Schema(name = "isDeleted", title = "是否删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
// @TableField(exist = false)
|
||||
// private Set<? extends GrantedAuthority> authorities;
|
||||
//
|
||||
// @Override
|
||||
// public void eraseCredentials() {
|
||||
// this.password = null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Set<? extends GrantedAuthority> getAuthorities() {
|
||||
// return this.authorities;
|
||||
// }
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
|
||||
import com.auth.dao.base.entity.AuthLogEntity;
|
||||
import com.auth.model.base.dto.AuthLogDto;
|
||||
import com.auth.model.base.vo.AuthLogVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统授权日志表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author AuthoritySystem
|
||||
* @since 2025-07-19 14:26:58
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthLogMapper extends BaseMapper<AuthLogEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询系统授权日志表内容
|
||||
*
|
||||
* @param pageParams 系统授权日志表分页参数
|
||||
* @param dto 系统授权日志表查询表单
|
||||
* @return 系统授权日志表分页结果
|
||||
*/
|
||||
IPage<AuthLogVo> selectListByPage(@Param("page") Page<AuthLogEntity> pageParams, @Param("dto") AuthLogDto dto);
|
||||
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.DeptDto;
|
||||
import com.auth.model.base.vo.DeptVo;
|
||||
import com.auth.dao.base.entity.DeptEntity;
|
||||
import com.auth.common.model.dto.base.DeptDto;
|
||||
import com.auth.common.model.entity.base.DeptEntity;
|
||||
import com.auth.common.model.vo.base.DeptVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.DictDto;
|
||||
import com.auth.model.base.vo.DictVo;
|
||||
import com.auth.dao.base.entity.DictEntity;
|
||||
import com.auth.common.model.dto.base.DictDto;
|
||||
import com.auth.common.model.entity.base.DictEntity;
|
||||
import com.auth.common.model.vo.base.DictVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.EmailConfigDto;
|
||||
import com.auth.model.base.vo.EmailConfigVo;
|
||||
import com.auth.dao.base.entity.EmailConfigEntity;
|
||||
import com.auth.common.model.dto.base.EmailConfigDto;
|
||||
import com.auth.common.model.entity.base.EmailConfigEntity;
|
||||
import com.auth.common.model.vo.base.EmailConfigVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.EmailTemplateDto;
|
||||
import com.auth.model.base.vo.EmailTemplateVo;
|
||||
import com.auth.dao.base.entity.EmailTemplateEntity;
|
||||
import com.auth.common.model.dto.base.EmailTemplateDto;
|
||||
import com.auth.common.model.entity.base.EmailTemplateEntity;
|
||||
import com.auth.common.model.vo.base.EmailTemplateVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.FileDto;
|
||||
import com.auth.model.base.vo.FileVo;
|
||||
import com.auth.dao.base.entity.FileEntity;
|
||||
import com.auth.common.model.dto.base.FileDto;
|
||||
import com.auth.common.model.entity.base.FileEntity;
|
||||
import com.auth.common.model.vo.base.FileVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.LoginLogDto;
|
||||
import com.auth.model.base.vo.LoginLogVo;
|
||||
import com.auth.dao.base.entity.LoginLogEntity;
|
||||
import com.auth.common.model.dto.base.LoginLogDto;
|
||||
import com.auth.common.model.entity.base.LoginLogEntity;
|
||||
import com.auth.common.model.vo.base.LoginLogVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.MenuDto;
|
||||
import com.auth.model.base.vo.MenuVo;
|
||||
import com.auth.dao.base.entity.MenuEntity;
|
||||
import com.auth.common.model.dto.base.MenuDto;
|
||||
import com.auth.common.model.entity.base.MenuEntity;
|
||||
import com.auth.common.model.vo.base.MenuVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.MenuRoleDto;
|
||||
import com.auth.model.base.vo.MenuRoleVo;
|
||||
import com.auth.dao.base.entity.MenuRoleEntity;
|
||||
import com.auth.common.model.dto.base.MenuRoleDto;
|
||||
import com.auth.common.model.entity.base.MenuRoleEntity;
|
||||
import com.auth.common.model.vo.base.MenuRoleVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.OperationLogDto;
|
||||
import com.auth.model.base.vo.OperationLogVo;
|
||||
import com.auth.dao.base.entity.OperationLogEntity;
|
||||
import com.auth.common.model.dto.base.OperationLogDto;
|
||||
import com.auth.common.model.entity.base.OperationLogEntity;
|
||||
import com.auth.common.model.vo.base.OperationLogVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.PermissionDto;
|
||||
import com.auth.model.base.vo.PermissionVo;
|
||||
import com.auth.dao.base.entity.PermissionEntity;
|
||||
import com.auth.common.model.dto.base.PermissionDto;
|
||||
import com.auth.common.model.entity.base.PermissionEntity;
|
||||
import com.auth.common.model.vo.base.PermissionVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.RoleDataScopeDto;
|
||||
import com.auth.model.base.vo.RoleDataScopeVo;
|
||||
import com.auth.dao.base.entity.RoleDataScopeEntity;
|
||||
import com.auth.common.model.dto.base.RoleDataScopeDto;
|
||||
import com.auth.common.model.entity.base.RoleDataScopeEntity;
|
||||
import com.auth.common.model.vo.base.RoleDataScopeVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.RoleDto;
|
||||
import com.auth.model.base.vo.RoleVo;
|
||||
import com.auth.dao.base.entity.RoleEntity;
|
||||
import com.auth.common.model.dto.base.RoleDto;
|
||||
import com.auth.common.model.entity.base.RoleEntity;
|
||||
import com.auth.common.model.vo.base.RoleVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.RolePermissionDto;
|
||||
import com.auth.model.base.vo.RolePermissionVo;
|
||||
import com.auth.dao.base.entity.RolePermissionEntity;
|
||||
import com.auth.common.model.dto.base.RolePermissionDto;
|
||||
import com.auth.common.model.entity.base.RolePermissionEntity;
|
||||
import com.auth.common.model.vo.base.RolePermissionVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.UserDeptDto;
|
||||
import com.auth.model.base.vo.UserDeptVo;
|
||||
import com.auth.dao.base.entity.UserDeptEntity;
|
||||
import com.auth.common.model.dto.base.UserDeptDto;
|
||||
import com.auth.common.model.entity.base.UserDeptEntity;
|
||||
import com.auth.common.model.vo.base.UserDeptVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.dao.base.entity.PermissionEntity;
|
||||
import com.auth.dao.base.entity.RoleEntity;
|
||||
import com.auth.dao.base.entity.UserEntity;
|
||||
import com.auth.dao.base.view.UserRolePermission;
|
||||
import com.auth.model.base.dto.UserDto;
|
||||
import com.auth.model.base.vo.UserVo;
|
||||
import com.auth.common.model.dto.base.UserDto;
|
||||
import com.auth.common.model.entity.base.PermissionEntity;
|
||||
import com.auth.common.model.entity.base.RoleEntity;
|
||||
import com.auth.common.model.entity.base.UserEntity;
|
||||
import com.auth.common.model.vo.base.UserVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -35,12 +34,12 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
|||
IPage<UserVo> selectListByPage(@Param("page") Page<UserEntity> pageParams, @Param("dto") UserDto dto);
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户角色和权限信息
|
||||
* 根据用户名查询用户信息
|
||||
*
|
||||
* @param userId 用户Id
|
||||
* @param username 用户名
|
||||
* @return 用户实体类
|
||||
*/
|
||||
List<UserRolePermission> selectUserRolePermissionByUsername(Long userId);
|
||||
UserEntity selectByUsername(String username);
|
||||
|
||||
/**
|
||||
* 根据用户id查找该用户的角色内容
|
||||
|
@ -57,12 +56,4 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
|||
* @return 权限列表
|
||||
*/
|
||||
List<PermissionEntity> selectPermissionByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户名查询用户信息
|
||||
*
|
||||
* @param username 用户名
|
||||
* @return 用户实体类
|
||||
*/
|
||||
UserEntity selectByUsername(String username);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.auth.dao.base.mapper.v1;
|
||||
|
||||
import com.auth.model.base.dto.UserRoleDto;
|
||||
import com.auth.model.base.vo.UserRoleVo;
|
||||
import com.auth.dao.base.entity.UserRoleEntity;
|
||||
import com.auth.common.model.dto.base.UserRoleDto;
|
||||
import com.auth.common.model.entity.base.UserRoleEntity;
|
||||
import com.auth.common.model.vo.base.UserRoleVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
package com.auth.dao.base;
|
|
@ -1,65 +0,0 @@
|
|||
package com.auth.dao.base.view;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("v_user_role_permission")
|
||||
@Schema(name = "UserRolePermission-用户角色权限信息实体类", title = "用户角色权限信息", description = "用户角色权限信息的实体类对象")
|
||||
public class UserRolePermission {
|
||||
|
||||
// 用户角色关联信息
|
||||
private Long userId;
|
||||
|
||||
// 角色权限关联信息
|
||||
private Long roleId;
|
||||
private Long permissionId;
|
||||
|
||||
// 权限信息
|
||||
private String permissionCode;
|
||||
private String permissionName;
|
||||
private String permissionType;
|
||||
private String url;
|
||||
private String method;
|
||||
private Integer permissionLevel;
|
||||
private String permissionPath;
|
||||
private Integer permissionOrderNum;
|
||||
private Integer permissionStatus;
|
||||
private String permissionRemark;
|
||||
|
||||
// 用户信息
|
||||
private String username;
|
||||
private String nickname;
|
||||
private String email;
|
||||
private String phone;
|
||||
private String salt;
|
||||
private String password;
|
||||
private String avatar;
|
||||
private Integer gender;
|
||||
private Date birthday;
|
||||
private String introduction;
|
||||
private String lastLoginIp;
|
||||
private Date lastLoginTime;
|
||||
private String lastLoginRegion;
|
||||
private Integer status;
|
||||
private Long deptId;
|
||||
private Long postId;
|
||||
private Boolean isDeleted;
|
||||
|
||||
// 角色信息
|
||||
private String roleCode;
|
||||
private String roleName;
|
||||
private String roleType;
|
||||
private String roleDataScope;
|
||||
private Integer roleOrderNum;
|
||||
private Integer roleStatus;
|
||||
private String roleRemark;
|
||||
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.auth.dao.base.mapper.v1.AuthLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.AuthLogEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="event_type" property="eventType"/>
|
||||
<id column="username" property="username"/>
|
||||
<id column="user_id" property="userId"/>
|
||||
<id column="request_ip" property="requestIp"/>
|
||||
<id column="request_method" property="requestMethod"/>
|
||||
<id column="request_uri" property="requestUri"/>
|
||||
<id column="class_name" property="className"/>
|
||||
<id column="method_name" property="methodName"/>
|
||||
<id column="method_params" property="methodParams"/>
|
||||
<id column="required_authority" property="requiredAuthority"/>
|
||||
<id column="user_authorities" property="userAuthorities"/>
|
||||
<id column="decision_reason" property="decisionReason"/>
|
||||
<id column="exception_message" property="exceptionMessage"/>
|
||||
<id column="is_deleted" property="isDeleted"/>
|
||||
<id column="create_time" property="createTime"/>
|
||||
<id column="update_time" property="updateTime"/>
|
||||
<id column="create_user" property="createUser"/>
|
||||
<id column="update_user" property="updateUser"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, event_type,username,user_id,request_ip,request_method,request_uri,class_name,method_name,method_params,required_authority,user_authorities,decision_reason,exception_message,is_deleted, create_time, update_time, create_user, update_user
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询系统授权日志表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.AuthLogVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
update_user.username as update_username
|
||||
from sys_auth_log base
|
||||
left join sys_user create_user on create_user.id = base.create_user
|
||||
left join sys_user update_user on update_user.id = base.update_user
|
||||
<where>
|
||||
base.is_deleted = 0
|
||||
<if test="dto.eventType != null and dto.eventType != ''">
|
||||
and base.event_type like CONCAT('%',#{dto.eventType},'%')
|
||||
</if>
|
||||
<if test="dto.username != null and dto.username != ''">
|
||||
and base.username like CONCAT('%',#{dto.username},'%')
|
||||
</if>
|
||||
<if test="dto.userId != null and dto.userId != ''">
|
||||
and base.user_id like CONCAT('%',#{dto.userId},'%')
|
||||
</if>
|
||||
<if test="dto.requestIp != null and dto.requestIp != ''">
|
||||
and base.request_ip like CONCAT('%',#{dto.requestIp},'%')
|
||||
</if>
|
||||
<if test="dto.requestMethod != null and dto.requestMethod != ''">
|
||||
and base.request_method like CONCAT('%',#{dto.requestMethod},'%')
|
||||
</if>
|
||||
<if test="dto.requestUri != null and dto.requestUri != ''">
|
||||
and base.request_uri like CONCAT('%',#{dto.requestUri},'%')
|
||||
</if>
|
||||
<if test="dto.className != null and dto.className != ''">
|
||||
and base.class_name like CONCAT('%',#{dto.className},'%')
|
||||
</if>
|
||||
<if test="dto.methodName != null and dto.methodName != ''">
|
||||
and base.method_name like CONCAT('%',#{dto.methodName},'%')
|
||||
</if>
|
||||
<if test="dto.methodParams != null and dto.methodParams != ''">
|
||||
and base.method_params like CONCAT('%',#{dto.methodParams},'%')
|
||||
</if>
|
||||
<if test="dto.requiredAuthority != null and dto.requiredAuthority != ''">
|
||||
and base.required_authority like CONCAT('%',#{dto.requiredAuthority},'%')
|
||||
</if>
|
||||
<if test="dto.userAuthorities != null and dto.userAuthorities != ''">
|
||||
and base.user_authorities like CONCAT('%',#{dto.userAuthorities},'%')
|
||||
</if>
|
||||
<if test="dto.decisionReason != null and dto.decisionReason != ''">
|
||||
and base.decision_reason like CONCAT('%',#{dto.decisionReason},'%')
|
||||
</if>
|
||||
<if test="dto.exceptionMessage != null and dto.exceptionMessage != ''">
|
||||
and base.exception_message like CONCAT('%',#{dto.exceptionMessage},'%')
|
||||
</if>
|
||||
<if test="dto.isDeleted != null and dto.isDeleted != ''">
|
||||
and base.is_deleted like CONCAT('%',#{dto.isDeleted},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.DeptMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.DeptEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.DeptEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="parent_id" property="parentId"/>
|
||||
<id column="manager" property="manager"/>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询部门表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.DeptVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.DeptVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.DictMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.DictEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.DictEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="dict_type" property="dictType"/>
|
||||
<id column="dict_code" property="dictCode"/>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统数据字典内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.DictVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.DictVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.EmailConfigMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.EmailConfigEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.EmailConfigEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="config_name" property="configName"/>
|
||||
<id column="email" property="email"/>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统邮件服务器配置内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.EmailConfigVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.EmailConfigVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.EmailTemplateMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.EmailTemplateEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.EmailTemplateEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="template_name" property="templateName"/>
|
||||
<id column="email_user" property="emailUser"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询邮件模板表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.EmailTemplateVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.EmailTemplateVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.FileMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.FileEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.FileEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="file_uid" property="fileUid"/>
|
||||
<id column="original_name" property="originalName"/>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统文件存储内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.FileVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.FileVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.LoginLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.LoginLogEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.LoginLogEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="user_id" property="userId"/>
|
||||
<id column="username" property="username"/>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统用户登录日志内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.LoginLogVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.LoginLogVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.MenuMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.MenuEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.MenuEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="parent_id" property="parentId"/>
|
||||
<id column="menu_path" property="menuPath"/>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统菜单权限内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.MenuVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.MenuVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.MenuRoleMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.MenuRoleEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.MenuRoleEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="role_id" property="roleId"/>
|
||||
<id column="menu_id" property="menuId"/>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统菜单角色关联内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.MenuRoleVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.MenuRoleVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.OperationLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.OperationLogEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.OperationLogEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="module" property="module"/>
|
||||
<id column="operation_type" property="operationType"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统操作日志内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.OperationLogVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.OperationLogVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.PermissionMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.PermissionEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.PermissionEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="parent_id" property="parentId"/>
|
||||
<id column="power_code" property="powerCode"/>
|
||||
|
@ -36,7 +36,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统权限表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.PermissionVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.PermissionVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.RoleDataScopeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.RoleDataScopeEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.RoleDataScopeEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="role_id" property="roleId"/>
|
||||
<id column="dept_id" property="deptId"/>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统角色数据权限范围内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.RoleDataScopeVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.RoleDataScopeVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.RoleMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.RoleEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.RoleEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="role_code" property="roleCode"/>
|
||||
<id column="description" property="description"/>
|
||||
|
@ -28,7 +28,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统角色表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.RoleVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.RoleVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.RolePermissionMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.RolePermissionEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.RolePermissionEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="role_id" property="roleId"/>
|
||||
<id column="power_id" property="powerId"/>
|
||||
|
@ -22,7 +22,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统角色权限表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.RolePermissionVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.RolePermissionVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.UserDeptMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.UserDeptEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.UserDeptEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="user_id" property="userId"/>
|
||||
<id column="dept_id" property="deptId"/>
|
||||
|
@ -24,7 +24,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询部门用户关系表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.UserDeptVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.UserDeptVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.UserMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.UserEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.UserEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="username" property="username"/>
|
||||
<id column="nickname" property="nickname"/>
|
||||
|
@ -41,7 +41,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询用户信息内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.UserVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.UserVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
@ -117,17 +117,16 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据用户id查询用户角色和权限信息 -->
|
||||
<select id="selectUserRolePermissionByUsername" resultType="com.auth.dao.base.view.UserRolePermission">
|
||||
select *
|
||||
from v_user_role_permission vurp
|
||||
where vurp.user_id = #{userId}
|
||||
and vurp.is_deleteds = 0
|
||||
and vurp.status = 0
|
||||
<!-- 根据用户名查询用户信息 -->
|
||||
<select id="selectByUsername" resultType="com.auth.common.model.entity.base.UserEntity">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_user
|
||||
where username = #{username} and is_deleted = 0 and status = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据用户id查找该用户的角色内容 -->
|
||||
<select id="selectRolesByUserId" resultType="com.auth.dao.base.entity.RoleEntity">
|
||||
<select id="selectRolesByUserId" resultType="com.auth.common.model.entity.base.RoleEntity">
|
||||
SELECT tr.*
|
||||
FROM t_user_role tur
|
||||
JOIN t_role tr ON tur.role_id = tr.id
|
||||
|
@ -139,7 +138,7 @@
|
|||
</select>
|
||||
|
||||
<!-- 根据用户id查找当前用户的权限 -->
|
||||
<select id="selectPermissionByUserId" resultType="com.auth.dao.base.entity.PermissionEntity">
|
||||
<select id="selectPermissionByUserId" resultType="com.auth.common.model.entity.base.PermissionEntity">
|
||||
SELECT DISTINCT p.*
|
||||
FROM sys_permission p
|
||||
JOIN sys_role_permission rp ON p.id = rp.permission_id
|
||||
|
@ -147,12 +146,4 @@
|
|||
WHERE ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<!-- 根据用户名查询用户信息 -->
|
||||
<select id="selectByUsername" resultType="com.auth.dao.base.entity.UserEntity">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_user
|
||||
where username = #{username} and is_deleted = 0 and status = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.auth.dao.base.mapper.v1.UserRoleMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.auth.dao.base.entity.UserRoleEntity">
|
||||
<resultMap id="BaseResultMap" type="com.auth.common.model.entity.base.UserRoleEntity">
|
||||
<id column="id" property="id"/>
|
||||
<id column="user_id" property="userId"/>
|
||||
<id column="role_id" property="roleId"/>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</sql>
|
||||
|
||||
<!-- 分页查询系统用户角色关系表内容 -->
|
||||
<select id="selectListByPage" resultType="com.auth.model.base.vo.UserRoleVo">
|
||||
<select id="selectListByPage" resultType="com.auth.common.model.vo.base.UserRoleVo">
|
||||
select
|
||||
base.*,
|
||||
create_user.username as create_username,
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.auth</groupId>
|
||||
<artifactId>auth-common</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.auth</groupId>
|
||||
<artifactId>auth-model</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>model-base</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>model-base</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1 +0,0 @@
|
|||
package com.auth.model.base.bo;
|
|
@ -1,52 +0,0 @@
|
|||
package com.auth.model.base.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(name = "AuthLogDTO-系统授权日志", title = "系统授权日志", description = "系统授权日志的DTO对象")
|
||||
public class AuthLogDto {
|
||||
|
||||
@Schema(name = "eventType", title = "事件类型(GRANTED=授权成功,DENIED=授权拒绝)")
|
||||
private String eventType;
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "userId", title = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "requestIp", title = "请求IP")
|
||||
private String requestIp;
|
||||
|
||||
@Schema(name = "requestMethod", title = "请求方法(GET,POST等)")
|
||||
private String requestMethod;
|
||||
|
||||
@Schema(name = "requestUri", title = "请求URI")
|
||||
private String requestUri;
|
||||
|
||||
@Schema(name = "className", title = "类名")
|
||||
private String className;
|
||||
|
||||
@Schema(name = "methodName", title = "方法名")
|
||||
private String methodName;
|
||||
|
||||
@Schema(name = "methodParams", title = "方法参数(JSON格式)")
|
||||
private String methodParams;
|
||||
|
||||
@Schema(name = "requiredAuthority", title = "所需权限表达式")
|
||||
private String requiredAuthority;
|
||||
|
||||
@Schema(name = "userAuthorities", title = "用户拥有的权限(JSON格式)")
|
||||
private String userAuthorities;
|
||||
|
||||
@Schema(name = "decisionReason", title = "决策原因")
|
||||
private String decisionReason;
|
||||
|
||||
@Schema(name = "exceptionMessage", title = "异常信息")
|
||||
private String exceptionMessage;
|
||||
|
||||
@Schema(name = "isDeleted", title = "删除标志(0=未删除 1=已删除)")
|
||||
private Boolean isDeleted;
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue