diff --git a/login/pom.xml b/login/pom.xml
index c83be31..95d6af7 100644
--- a/login/pom.xml
+++ b/login/pom.xml
@@ -131,6 +131,13 @@
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+
+
@@ -144,16 +151,17 @@
3.11.0
-
- org.mapstruct
- mapstruct-processor
- 1.6.0.Beta1
-
+
org.projectlombok
lombok
1.18.34
+
+ org.mapstruct
+ mapstruct-processor
+ 1.6.0.Beta1
+
diff --git a/login/src/main/java/com/guwan/Interceptor/TokenInterceptor.java b/login/src/main/java/com/guwan/Interceptor/TokenInterceptor.java
index de4721d..6caefde 100644
--- a/login/src/main/java/com/guwan/Interceptor/TokenInterceptor.java
+++ b/login/src/main/java/com/guwan/Interceptor/TokenInterceptor.java
@@ -26,11 +26,7 @@ public class TokenInterceptor implements HandlerInterceptor {
// 验证 Token 的有效性
boolean isValid = tokenService.checkToken(token);
if (isValid) {
- // 如果 Token 有效,可能需要更新 Token 并将新的 Token 添加到响应头中
- /* String newToken = tokenService.refreshToken(token);
- if (newToken != null) {
- response.setHeader("Authorization", newToken);
- }*/
+ tokenService.validateAndExtendToken(token);
return true; // Token 有效,继续处理请求
} else {
// 如果 Token 无效,返回未授权状态码
@@ -38,7 +34,6 @@ public class TokenInterceptor implements HandlerInterceptor {
return false; // 拦截请求
}
}
-
// 如果没有 Token,返回未授权状态码
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
return false; // 拦截请求
diff --git a/login/src/main/java/com/guwan/LoginApplication.java b/login/src/main/java/com/guwan/LoginApplication.java
index 252b7ce..911e3f5 100644
--- a/login/src/main/java/com/guwan/LoginApplication.java
+++ b/login/src/main/java/com/guwan/LoginApplication.java
@@ -1,6 +1,7 @@
package com.guwan;
import cn.dev33.satoken.SaManager;
+import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/login/src/main/java/com/guwan/RBAC/RouterMeta.java b/login/src/main/java/com/guwan/RBAC/RouterMeta.java
new file mode 100644
index 0000000..77aed81
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/RouterMeta.java
@@ -0,0 +1,25 @@
+package com.guwan.RBAC;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class RouterMeta {
+
+ /*@ApiModelProperty(value = "标题")*/
+ private String title;
+
+ /*@ApiModelProperty(value = "排序权重")*/
+ private List auths;
+
+ /*@ApiModelProperty(value = "角色列表")*/
+ private List roles;
+
+
+}
diff --git a/login/src/main/java/com/guwan/RBAC/SystemMenu.java b/login/src/main/java/com/guwan/RBAC/SystemMenu.java
new file mode 100644
index 0000000..4bf9f07
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/SystemMenu.java
@@ -0,0 +1,223 @@
+package com.guwan.RBAC;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Data;
+
+/**
+ * 菜单权限表
+ * @TableName system_menu
+ */
+@TableName(value ="system_menu")
+@Data
+public class SystemMenu implements Serializable {
+ /**
+ * 菜单ID
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 菜单名称
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 权限标识
+ */
+ @TableField(value = "permission")
+ private String permission;
+
+ /**
+ * 菜单类型
+ */
+ @TableField(value = "type")
+ private Integer type;
+
+ /**
+ * 显示顺序
+ */
+ @TableField(value = "sort")
+ private Integer sort;
+
+ /**
+ * 父菜单ID
+ */
+ @TableField(value = "parent_id")
+ private Long parentId;
+
+ /**
+ * 路由地址
+ */
+ @TableField(value = "path")
+ private String path;
+
+ /**
+ * 菜单图标
+ */
+ @TableField(value = "icon")
+ private String icon;
+
+ /**
+ * 组件路径
+ */
+ @TableField(value = "component")
+ private String component;
+
+ /**
+ * 组件名
+ */
+ @TableField(value = "component_name")
+ private String componentName;
+
+ /**
+ * 菜单状态
+ */
+ @TableField(value = "status")
+ private Integer status;
+
+ /**
+ * 是否可见
+ */
+ @TableField(value = "visible")
+ private Boolean visible;
+
+ /**
+ * 是否缓存
+ */
+ @TableField(value = "keep_alive")
+ private Boolean keepAlive;
+
+ /**
+ * 是否总是显示
+ */
+ @TableField(value = "always_show")
+ private Boolean alwaysShow;
+
+ /**
+ * 创建者
+ */
+ @TableField(value = "creator")
+ private String creator;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新者
+ */
+ @TableField(value = "updater")
+ private String updater;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 是否删除
+ */
+ @TableField(value = "deleted")
+ private Boolean deleted;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ SystemMenu other = (SystemMenu) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+ && (this.getPermission() == null ? other.getPermission() == null : this.getPermission().equals(other.getPermission()))
+ && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
+ && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
+ && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
+ && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
+ && (this.getIcon() == null ? other.getIcon() == null : this.getIcon().equals(other.getIcon()))
+ && (this.getComponent() == null ? other.getComponent() == null : this.getComponent().equals(other.getComponent()))
+ && (this.getComponentName() == null ? other.getComponentName() == null : this.getComponentName().equals(other.getComponentName()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getVisible() == null ? other.getVisible() == null : this.getVisible().equals(other.getVisible()))
+ && (this.getKeepAlive() == null ? other.getKeepAlive() == null : this.getKeepAlive().equals(other.getKeepAlive()))
+ && (this.getAlwaysShow() == null ? other.getAlwaysShow() == null : this.getAlwaysShow().equals(other.getAlwaysShow()))
+ && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+ result = prime * result + ((getPermission() == null) ? 0 : getPermission().hashCode());
+ result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
+ result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
+ result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
+ result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
+ result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
+ result = prime * result + ((getComponent() == null) ? 0 : getComponent().hashCode());
+ result = prime * result + ((getComponentName() == null) ? 0 : getComponentName().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getVisible() == null) ? 0 : getVisible().hashCode());
+ result = prime * result + ((getKeepAlive() == null) ? 0 : getKeepAlive().hashCode());
+ result = prime * result + ((getAlwaysShow() == null) ? 0 : getAlwaysShow().hashCode());
+ result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", name=").append(name);
+ sb.append(", permission=").append(permission);
+ sb.append(", type=").append(type);
+ sb.append(", sort=").append(sort);
+ sb.append(", parentId=").append(parentId);
+ sb.append(", path=").append(path);
+ sb.append(", icon=").append(icon);
+ sb.append(", component=").append(component);
+ sb.append(", componentName=").append(componentName);
+ sb.append(", status=").append(status);
+ sb.append(", visible=").append(visible);
+ sb.append(", keepAlive=").append(keepAlive);
+ sb.append(", alwaysShow=").append(alwaysShow);
+ sb.append(", creator=").append(creator);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updater=").append(updater);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", deleted=").append(deleted);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/RBAC/SystemRole.java b/login/src/main/java/com/guwan/RBAC/SystemRole.java
new file mode 100644
index 0000000..202c95d
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/SystemRole.java
@@ -0,0 +1,187 @@
+package com.guwan.RBAC;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Data;
+
+/**
+ * 角色信息表
+ * @TableName system_role
+ */
+@TableName(value ="system_role")
+@Data
+public class SystemRole implements Serializable {
+ /**
+ * 角色ID
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 角色名称
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 角色权限字符串
+ */
+ @TableField(value = "code")
+ private String code;
+
+ /**
+ * 显示顺序
+ */
+ @TableField(value = "sort")
+ private Integer sort;
+
+ /**
+ * 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
+ */
+ @TableField(value = "data_scope")
+ private Integer dataScope;
+
+ /**
+ * 数据范围(指定部门数组)
+ */
+ @TableField(value = "data_scope_dept_ids")
+ private String dataScopeDeptIds;
+
+ /**
+ * 角色状态(0正常 1停用)
+ */
+ @TableField(value = "status")
+ private Integer status;
+
+ /**
+ * 角色类型
+ */
+ @TableField(value = "type")
+ private Integer type;
+
+ /**
+ * 备注
+ */
+ @TableField(value = "remark")
+ private String remark;
+
+ /**
+ * 创建者
+ */
+ @TableField(value = "creator")
+ private String creator;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新者
+ */
+ @TableField(value = "updater")
+ private String updater;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 是否删除
+ */
+ @TableField(value = "deleted")
+ private Boolean deleted;
+
+ /**
+ * 租户编号
+ */
+ @TableField(value = "tenant_id")
+ private Long tenantId;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ SystemRole other = (SystemRole) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+ && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
+ && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
+ && (this.getDataScope() == null ? other.getDataScope() == null : this.getDataScope().equals(other.getDataScope()))
+ && (this.getDataScopeDeptIds() == null ? other.getDataScopeDeptIds() == null : this.getDataScopeDeptIds().equals(other.getDataScopeDeptIds()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+ && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
+ && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+ result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
+ result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
+ result = prime * result + ((getDataScope() == null) ? 0 : getDataScope().hashCode());
+ result = prime * result + ((getDataScopeDeptIds() == null) ? 0 : getDataScopeDeptIds().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
+ result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", name=").append(name);
+ sb.append(", code=").append(code);
+ sb.append(", sort=").append(sort);
+ sb.append(", dataScope=").append(dataScope);
+ sb.append(", dataScopeDeptIds=").append(dataScopeDeptIds);
+ sb.append(", status=").append(status);
+ sb.append(", type=").append(type);
+ sb.append(", remark=").append(remark);
+ sb.append(", creator=").append(creator);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updater=").append(updater);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", deleted=").append(deleted);
+ sb.append(", tenantId=").append(tenantId);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/RBAC/SystemRoleMenu.java b/login/src/main/java/com/guwan/RBAC/SystemRoleMenu.java
new file mode 100644
index 0000000..c882989
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/SystemRoleMenu.java
@@ -0,0 +1,133 @@
+package com.guwan.RBAC;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Data;
+
+/**
+ * 角色和菜单关联表
+ * @TableName system_role_menu
+ */
+@TableName(value ="system_role_menu")
+@Data
+public class SystemRoleMenu implements Serializable {
+ /**
+ * 自增编号
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 角色ID
+ */
+ @TableField(value = "role_id")
+ private Long roleId;
+
+ /**
+ * 菜单ID
+ */
+ @TableField(value = "menu_id")
+ private Long menuId;
+
+ /**
+ * 创建者
+ */
+ @TableField(value = "creator")
+ private String creator;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新者
+ */
+ @TableField(value = "updater")
+ private String updater;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 是否删除
+ */
+ @TableField(value = "deleted")
+ private Boolean deleted;
+
+ /**
+ * 租户编号
+ */
+ @TableField(value = "tenant_id")
+ private Long tenantId;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ SystemRoleMenu other = (SystemRoleMenu) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
+ && (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()))
+ && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
+ && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
+ result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
+ result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
+ result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", roleId=").append(roleId);
+ sb.append(", menuId=").append(menuId);
+ sb.append(", creator=").append(creator);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updater=").append(updater);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", deleted=").append(deleted);
+ sb.append(", tenantId=").append(tenantId);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/RBAC/SystemUserRole.java b/login/src/main/java/com/guwan/RBAC/SystemUserRole.java
new file mode 100644
index 0000000..988b209
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/SystemUserRole.java
@@ -0,0 +1,133 @@
+package com.guwan.RBAC;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Data;
+
+/**
+ * 用户和角色关联表
+ * @TableName system_user_role
+ */
+@TableName(value ="system_user_role")
+@Data
+public class SystemUserRole implements Serializable {
+ /**
+ * 自增编号
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 用户ID
+ */
+ @TableField(value = "user_id")
+ private Long userId;
+
+ /**
+ * 角色ID
+ */
+ @TableField(value = "role_id")
+ private Long roleId;
+
+ /**
+ * 创建者
+ */
+ @TableField(value = "creator")
+ private String creator;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新者
+ */
+ @TableField(value = "updater")
+ private String updater;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 是否删除
+ */
+ @TableField(value = "deleted")
+ private Boolean deleted;
+
+ /**
+ * 租户编号
+ */
+ @TableField(value = "tenant_id")
+ private Long tenantId;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ SystemUserRole other = (SystemUserRole) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+ && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
+ && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
+ && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+ result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
+ result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
+ result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", userId=").append(userId);
+ sb.append(", roleId=").append(roleId);
+ sb.append(", creator=").append(creator);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updater=").append(updater);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", deleted=").append(deleted);
+ sb.append(", tenantId=").append(tenantId);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/RBAC/SystemUsers.java b/login/src/main/java/com/guwan/RBAC/SystemUsers.java
new file mode 100644
index 0000000..1871de6
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/SystemUsers.java
@@ -0,0 +1,232 @@
+package com.guwan.RBAC;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Data;
+
+/**
+ * 用户信息表
+ * @TableName system_users
+ */
+@TableName(value ="system_users")
+@Data
+public class SystemUsers implements Serializable {
+ /**
+ * 用户ID
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 用户账号
+ */
+ @TableField(value = "username")
+ private String username;
+
+ /**
+ * 密码
+ */
+ @TableField(value = "password")
+ private String password;
+
+ /**
+ * 用户昵称
+ */
+ @TableField(value = "nickname")
+ private String nickname;
+
+ /**
+ * 备注
+ */
+ @TableField(value = "remark")
+ private String remark;
+
+ /**
+ * 部门ID
+ */
+ @TableField(value = "dept_id")
+ private Long deptId;
+
+ /**
+ * 岗位编号数组
+ */
+ @TableField(value = "post_ids")
+ private String postIds;
+
+ /**
+ * 用户邮箱
+ */
+ @TableField(value = "email")
+ private String email;
+
+ /**
+ * 手机号码
+ */
+ @TableField(value = "mobile")
+ private String mobile;
+
+ /**
+ * 用户性别
+ */
+ @TableField(value = "sex")
+ private Integer sex;
+
+ /**
+ * 头像地址
+ */
+ @TableField(value = "avatar")
+ private String avatar;
+
+ /**
+ * 帐号状态(0正常 1停用)
+ */
+ @TableField(value = "status")
+ private Integer status;
+
+ /**
+ * 最后登录IP
+ */
+ @TableField(value = "login_ip")
+ private String loginIp;
+
+ /**
+ * 最后登录时间
+ */
+ @TableField(value = "login_date")
+ private LocalDateTime loginDate;
+
+ /**
+ * 创建者
+ */
+ @TableField(value = "creator")
+ private String creator;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新者
+ */
+ @TableField(value = "updater")
+ private String updater;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 是否删除
+ */
+ @TableField(value = "deleted")
+ private Boolean deleted;
+
+ /**
+ * 租户编号
+ */
+ @TableField(value = "tenant_id")
+ private Long tenantId;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ SystemUsers other = (SystemUsers) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
+ && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
+ && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+ && (this.getDeptId() == null ? other.getDeptId() == null : this.getDeptId().equals(other.getDeptId()))
+ && (this.getPostIds() == null ? other.getPostIds() == null : this.getPostIds().equals(other.getPostIds()))
+ && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
+ && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
+ && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
+ && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getLoginIp() == null ? other.getLoginIp() == null : this.getLoginIp().equals(other.getLoginIp()))
+ && (this.getLoginDate() == null ? other.getLoginDate() == null : this.getLoginDate().equals(other.getLoginDate()))
+ && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
+ && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
+ result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
+ result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ result = prime * result + ((getDeptId() == null) ? 0 : getDeptId().hashCode());
+ result = prime * result + ((getPostIds() == null) ? 0 : getPostIds().hashCode());
+ result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
+ result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
+ result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
+ result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getLoginIp() == null) ? 0 : getLoginIp().hashCode());
+ result = prime * result + ((getLoginDate() == null) ? 0 : getLoginDate().hashCode());
+ result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
+ result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", username=").append(username);
+ sb.append(", password=").append(password);
+ sb.append(", nickname=").append(nickname);
+ sb.append(", remark=").append(remark);
+ sb.append(", deptId=").append(deptId);
+ sb.append(", postIds=").append(postIds);
+ sb.append(", email=").append(email);
+ sb.append(", mobile=").append(mobile);
+ sb.append(", sex=").append(sex);
+ sb.append(", avatar=").append(avatar);
+ sb.append(", status=").append(status);
+ sb.append(", loginIp=").append(loginIp);
+ sb.append(", loginDate=").append(loginDate);
+ sb.append(", creator=").append(creator);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updater=").append(updater);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", deleted=").append(deleted);
+ sb.append(", tenantId=").append(tenantId);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/RBAC/TempVo.java b/login/src/main/java/com/guwan/RBAC/TempVo.java
new file mode 100644
index 0000000..8e4dd42
--- /dev/null
+++ b/login/src/main/java/com/guwan/RBAC/TempVo.java
@@ -0,0 +1,32 @@
+package com.guwan.RBAC;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import lombok.Builder;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Data
+@Accessors(chain = true)
+public class TempVo {
+ /**
+ * 路径
+ */
+ private String path;
+ /**
+ * 名称
+ */
+ private String name;
+ /**
+ * 元数据
+ */
+ private RouterMeta meta;
+ /**
+ * 子路由
+ */
+ private List children;
+
+}
diff --git a/login/src/main/java/com/guwan/config/WebSocketConfig.java b/login/src/main/java/com/guwan/config/WebSocketConfig.java
new file mode 100644
index 0000000..c1f5c65
--- /dev/null
+++ b/login/src/main/java/com/guwan/config/WebSocketConfig.java
@@ -0,0 +1,17 @@
+
+package com.guwan.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.socket.server.standard.ServerEndpointExporter;
+
+@Configuration
+public class WebSocketConfig {
+
+
+// 注入一个ServerEndpointExporter,该Bean会自动注册使用@ServerEndpoint注解声明的websocket endpoint
+ @Bean
+ public ServerEndpointExporter serverEndpointExporter() {
+ return new ServerEndpointExporter();
+ }
+}
diff --git a/login/src/main/java/com/guwan/controller/login/DemoController.java b/login/src/main/java/com/guwan/controller/login/DemoController.java
new file mode 100644
index 0000000..257263e
--- /dev/null
+++ b/login/src/main/java/com/guwan/controller/login/DemoController.java
@@ -0,0 +1,24 @@
+package com.guwan.controller.login;
+
+import com.guwan.RBAC.TempVo;
+import com.guwan.common.R;
+import jakarta.annotation.Resource;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/demo")
+public class DemoController {
+
+ @Resource
+ private service.SystemUsersService systemUsersService;
+
+ @GetMapping("1")
+ public R test(){
+ systemUsersService.getRouterAsync();
+
+ return R.ok().put("data", new TempVo().setName("1111"));
+ }
+
+}
diff --git a/login/src/main/java/com/guwan/controller/login/UserController.java b/login/src/main/java/com/guwan/controller/login/UserController.java
index 1a2e9cc..8657d03 100644
--- a/login/src/main/java/com/guwan/controller/login/UserController.java
+++ b/login/src/main/java/com/guwan/controller/login/UserController.java
@@ -4,16 +4,15 @@ import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guwan.common.R;
import com.guwan.config.GlobalValue;
-import com.guwan.mapdemo.SimpleDestination;
-import com.guwan.mapdemo.SimpleSource;
-import com.guwan.mapdemo.SimpleSourceDestinationMapper;
-import com.guwan.mapdemo.SimpleSourceDestinationMapperImpl;
+import com.guwan.controller.login.vo.LoginSuccessInfo;
+import com.guwan.mapstruct.SimpleDestination;
+import com.guwan.mapstruct.SimpleSource;
+import com.guwan.mapstruct.SimpleSourceDestinationMapper;
import com.guwan.service.TokenService;
import com.guwan.util.*;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.security.PermitAll;
import jakarta.servlet.http.HttpServletRequest;
-import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -23,7 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
-import java.nio.file.Path;
+import java.util.ArrayList;
import java.util.List;
@RestController
@@ -138,6 +137,27 @@ public class UserController {
return voiceServiceClient.voiceToText(file, model);
}
+ @GetMapping("/demoLogin")
+ public R demo888() {
+ System.out.println("tokenService = " + tokenService);
+ LoginSuccessInfo loginSuccessInfo = new LoginSuccessInfo();
+ loginSuccessInfo.setAvatar("www.baidu.com");
+ loginSuccessInfo.setUsername("zhangsan");
+ loginSuccessInfo.setNickname("zhangsan");
+ ArrayList roles = new ArrayList<>();
+ roles.add("Admin");
+ loginSuccessInfo.setRoles(roles);
+ ArrayList permissions = new ArrayList<>();
+ permissions.add("*:*:*");
+ loginSuccessInfo.setPermissions(permissions);
+ loginSuccessInfo.setAccessToken("123456");
+ loginSuccessInfo.setRefreshToken("123456");
+ loginSuccessInfo.setExpires("2024-08-09 12:55:32");
+ return R.ok().put("data", loginSuccessInfo);
+
+
+ }
+
}
diff --git a/login/src/main/java/com/guwan/controller/login/vo/LoginSuccessInfo.java b/login/src/main/java/com/guwan/controller/login/vo/LoginSuccessInfo.java
new file mode 100644
index 0000000..dd8a82c
--- /dev/null
+++ b/login/src/main/java/com/guwan/controller/login/vo/LoginSuccessInfo.java
@@ -0,0 +1,44 @@
+package com.guwan.controller.login.vo;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+public class LoginSuccessInfo {
+ /**
+ * 头像
+ */
+ private String avatar;
+ /**
+ * 用户名
+ */
+ private String username;
+ /**
+ * 昵称
+ */
+ private String nickname;
+ /**
+ * 用户角色权限
+ */
+ private List roles;
+ /**
+ * 操作权限
+ */
+ private List permissions;
+ /**
+ * 登录token
+ */
+ private String accessToken;
+ /**
+ * 刷新token
+ */
+ private String refreshToken;
+ /**
+ * token过期时间
+ */
+ private String expires;
+
+}
diff --git a/login/src/main/java/com/guwan/mapdemo/SimpleDestination.java b/login/src/main/java/com/guwan/mapdemo/SimpleDestination.java
deleted file mode 100644
index 9438e1b..0000000
--- a/login/src/main/java/com/guwan/mapdemo/SimpleDestination.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.guwan.mapdemo;
-
-import lombok.Data;
-
-@Data
-public class SimpleDestination {
- private String name;
- private String description;
- // getters and setters
-}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/mapdemo/SimpleSource.java b/login/src/main/java/com/guwan/mapdemo/SimpleSource.java
deleted file mode 100644
index fc4222a..0000000
--- a/login/src/main/java/com/guwan/mapdemo/SimpleSource.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.guwan.mapdemo;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-public class SimpleSource {
- private String name;
- private String description;
-
-
- // getters and setters
-}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/mapper/SystemMenuMapper.java b/login/src/main/java/com/guwan/mapper/SystemMenuMapper.java
new file mode 100644
index 0000000..feaa0db
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapper/SystemMenuMapper.java
@@ -0,0 +1,21 @@
+package com.guwan.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.guwan.RBAC.SystemMenu;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author 12455
+* @description 针对表【system_menu(菜单权限表)】的数据库操作Mapper
+* @createDate 2024-11-13 15:58:26
+* @Entity generator.RBAC.SystemMenu
+*/
+@Mapper
+public interface SystemMenuMapper extends MPJBaseMapper {
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/mapper/SystemRoleMapper.java b/login/src/main/java/com/guwan/mapper/SystemRoleMapper.java
new file mode 100644
index 0000000..cbe5c07
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapper/SystemRoleMapper.java
@@ -0,0 +1,21 @@
+package com.guwan.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.guwan.RBAC.SystemRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author 12455
+* @description 针对表【system_role(角色信息表)】的数据库操作Mapper
+* @createDate 2024-11-13 15:58:26
+* @Entity generator.RBAC.SystemRole
+*/
+@Mapper
+public interface SystemRoleMapper extends MPJBaseMapper {
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/mapper/SystemRoleMenuMapper.java b/login/src/main/java/com/guwan/mapper/SystemRoleMenuMapper.java
new file mode 100644
index 0000000..6141914
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapper/SystemRoleMenuMapper.java
@@ -0,0 +1,21 @@
+package com.guwan.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.guwan.RBAC.SystemRoleMenu;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author 12455
+* @description 针对表【system_role_menu(角色和菜单关联表)】的数据库操作Mapper
+* @createDate 2024-11-13 15:58:26
+* @Entity generator.RBAC.SystemRoleMenu
+*/
+@Mapper
+public interface SystemRoleMenuMapper extends MPJBaseMapper {
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/mapper/SystemUserRoleMapper.java b/login/src/main/java/com/guwan/mapper/SystemUserRoleMapper.java
new file mode 100644
index 0000000..f287770
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapper/SystemUserRoleMapper.java
@@ -0,0 +1,21 @@
+package com.guwan.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.guwan.RBAC.SystemUserRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author 12455
+* @description 针对表【system_user_role(用户和角色关联表)】的数据库操作Mapper
+* @createDate 2024-11-13 15:58:26
+* @Entity generator.RBAC.SystemUserRole
+*/
+@Mapper
+public interface SystemUserRoleMapper extends MPJBaseMapper {
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/mapper/SystemUsersMapper.java b/login/src/main/java/com/guwan/mapper/SystemUsersMapper.java
new file mode 100644
index 0000000..87a83df
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapper/SystemUsersMapper.java
@@ -0,0 +1,21 @@
+package com.guwan.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.guwan.RBAC.SystemUsers;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author 12455
+* @description 针对表【system_users(用户信息表)】的数据库操作Mapper
+* @createDate 2024-11-13 15:58:26
+* @Entity generator.RBAC.SystemUsers
+*/
+@Mapper
+public interface SystemUsersMapper extends MPJBaseMapper {
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/mapstruct/Employee.java b/login/src/main/java/com/guwan/mapstruct/Employee.java
new file mode 100644
index 0000000..e86a157
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapstruct/Employee.java
@@ -0,0 +1,17 @@
+package com.guwan.mapstruct;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.web.bind.annotation.GetMapping;
+
+
+@Setter
+@Getter
+public class Employee {
+
+ private int id;
+ private String name;
+ // getters and setters
+
+
+}
diff --git a/login/src/main/java/com/guwan/mapstruct/EmployeeDTO.java b/login/src/main/java/com/guwan/mapstruct/EmployeeDTO.java
new file mode 100644
index 0000000..b4f1bdf
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapstruct/EmployeeDTO.java
@@ -0,0 +1,25 @@
+package com.guwan.mapstruct;
+
+public class EmployeeDTO {
+
+ private int employeeId;
+ private String employeeName;
+ // getters and setters
+
+
+ public int getEmployeeId() {
+ return employeeId;
+ }
+
+ public void setEmployeeId(int employeeId) {
+ this.employeeId = employeeId;
+ }
+
+ public String getEmployeeName() {
+ return employeeName;
+ }
+
+ public void setEmployeeName(String employeeName) {
+ this.employeeName = employeeName;
+ }
+}
diff --git a/login/src/main/java/com/guwan/mapstruct/EmployeeMapper.java b/login/src/main/java/com/guwan/mapstruct/EmployeeMapper.java
new file mode 100644
index 0000000..868454d
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapstruct/EmployeeMapper.java
@@ -0,0 +1,16 @@
+package com.guwan.mapstruct;
+
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+
+@Mapper
+public interface EmployeeMapper {
+
+ @Mapping(target = "employeeId", source = "id")
+ @Mapping(target = "employeeName", source = "name")
+ EmployeeDTO employeeToEmployeeDTO(Employee entity);
+
+ @Mapping(target = "id", source = "employeeId")
+ @Mapping(target = "name", source = "employeeName")
+ Employee employeeDTOtoEmployee(EmployeeDTO dto);
+}
diff --git a/login/src/main/java/com/guwan/mapstruct/SimpleDestination.java b/login/src/main/java/com/guwan/mapstruct/SimpleDestination.java
new file mode 100644
index 0000000..23dc8c7
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapstruct/SimpleDestination.java
@@ -0,0 +1,13 @@
+package com.guwan.mapstruct;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class SimpleDestination {
+ private String nameGu;
+ private String description;
+ // getters and setters
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/mapstruct/SimpleSource.java b/login/src/main/java/com/guwan/mapstruct/SimpleSource.java
new file mode 100644
index 0000000..c771a09
--- /dev/null
+++ b/login/src/main/java/com/guwan/mapstruct/SimpleSource.java
@@ -0,0 +1,32 @@
+package com.guwan.mapstruct;
+
+import lombok.*;
+
+@Getter
+@Setter
+@AllArgsConstructor
+@NoArgsConstructor
+public class SimpleSource {
+ private String nameHu;
+ private String description;
+
+
+ // getters and setters
+
+
+ public String getNameHu() {
+ return nameHu;
+ }
+
+ public void setNameHu(String nameHu) {
+ this.nameHu = nameHu;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
\ No newline at end of file
diff --git a/login/src/main/java/com/guwan/mapdemo/SimpleSourceDestinationMapper.java b/login/src/main/java/com/guwan/mapstruct/SimpleSourceDestinationMapper.java
similarity index 58%
rename from login/src/main/java/com/guwan/mapdemo/SimpleSourceDestinationMapper.java
rename to login/src/main/java/com/guwan/mapstruct/SimpleSourceDestinationMapper.java
index b8d952f..c64b8fa 100644
--- a/login/src/main/java/com/guwan/mapdemo/SimpleSourceDestinationMapper.java
+++ b/login/src/main/java/com/guwan/mapstruct/SimpleSourceDestinationMapper.java
@@ -1,10 +1,14 @@
-package com.guwan.mapdemo;
+package com.guwan.mapstruct;
import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
@Mapper(componentModel = "spring")
public interface SimpleSourceDestinationMapper {
+
+ @Mapping(target = "nameGu", source = "source.nameHu")
SimpleDestination sourceToDestination(SimpleSource source);
+ @Mapping(target = "nameHu", source = "destination.nameGu")
SimpleSource destinationToSource(SimpleDestination destination);
}
diff --git a/login/src/main/java/com/guwan/service/SystemMenuService.java b/login/src/main/java/com/guwan/service/SystemMenuService.java
new file mode 100644
index 0000000..ff2507a
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/SystemMenuService.java
@@ -0,0 +1,13 @@
+package service;
+
+import com.guwan.RBAC.SystemMenu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 12455
+* @description 针对表【system_menu(菜单权限表)】的数据库操作Service
+* @createDate 2024-11-13 15:58:26
+*/
+public interface SystemMenuService extends IService {
+
+}
diff --git a/login/src/main/java/com/guwan/service/SystemRoleMenuService.java b/login/src/main/java/com/guwan/service/SystemRoleMenuService.java
new file mode 100644
index 0000000..aa2e528
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/SystemRoleMenuService.java
@@ -0,0 +1,13 @@
+package service;
+
+import com.guwan.RBAC.SystemRoleMenu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 12455
+* @description 针对表【system_role_menu(角色和菜单关联表)】的数据库操作Service
+* @createDate 2024-11-13 15:58:26
+*/
+public interface SystemRoleMenuService extends IService {
+
+}
diff --git a/login/src/main/java/com/guwan/service/SystemRoleService.java b/login/src/main/java/com/guwan/service/SystemRoleService.java
new file mode 100644
index 0000000..f0e5ad1
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/SystemRoleService.java
@@ -0,0 +1,13 @@
+package service;
+
+import com.guwan.RBAC.SystemRole;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 12455
+* @description 针对表【system_role(角色信息表)】的数据库操作Service
+* @createDate 2024-11-13 15:58:26
+*/
+public interface SystemRoleService extends IService {
+
+}
diff --git a/login/src/main/java/com/guwan/service/SystemUserRoleService.java b/login/src/main/java/com/guwan/service/SystemUserRoleService.java
new file mode 100644
index 0000000..643951a
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/SystemUserRoleService.java
@@ -0,0 +1,13 @@
+package service;
+
+import com.guwan.RBAC.SystemUserRole;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 12455
+* @description 针对表【system_user_role(用户和角色关联表)】的数据库操作Service
+* @createDate 2024-11-13 15:58:26
+*/
+public interface SystemUserRoleService extends IService {
+
+}
diff --git a/login/src/main/java/com/guwan/service/SystemUsersService.java b/login/src/main/java/com/guwan/service/SystemUsersService.java
new file mode 100644
index 0000000..e11105a
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/SystemUsersService.java
@@ -0,0 +1,16 @@
+package service;
+
+import com.guwan.RBAC.SystemUsers;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 12455
+* @description 针对表【system_users(用户信息表)】的数据库操作Service
+* @createDate 2024-11-13 15:58:26
+*/
+public interface SystemUsersService extends IService {
+
+
+ public void getRouterAsync();
+
+}
diff --git a/login/src/main/java/com/guwan/service/impl/SystemMenuServiceImpl.java b/login/src/main/java/com/guwan/service/impl/SystemMenuServiceImpl.java
new file mode 100644
index 0000000..22ce038
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/impl/SystemMenuServiceImpl.java
@@ -0,0 +1,23 @@
+package service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.guwan.RBAC.SystemMenu;
+import com.guwan.mapper.SystemMenuMapper;
+import service.SystemMenuService;
+
+import org.springframework.stereotype.Service;
+
+/**
+* @author 12455
+* @description 针对表【system_menu(菜单权限表)】的数据库操作Service实现
+* @createDate 2024-11-13 15:58:26
+*/
+@Service
+public class SystemMenuServiceImpl extends ServiceImpl
+ implements SystemMenuService{
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/service/impl/SystemRoleMenuServiceImpl.java b/login/src/main/java/com/guwan/service/impl/SystemRoleMenuServiceImpl.java
new file mode 100644
index 0000000..65a92d6
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/impl/SystemRoleMenuServiceImpl.java
@@ -0,0 +1,26 @@
+package com.guwan.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.guwan.RBAC.SystemRoleMenu;
+import com.guwan.mapper.SystemRoleMenuMapper;
+import service.SystemRoleMenuService;
+
+import org.springframework.stereotype.Service;
+
+/**
+* @author 12455
+* @description 针对表【system_role_menu(角色和菜单关联表)】的数据库操作Service实现
+* @createDate 2024-11-13 15:58:26
+*/
+@Service
+public class SystemRoleMenuServiceImpl extends ServiceImpl
+ implements SystemRoleMenuService{
+
+
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/service/impl/SystemRoleServiceImpl.java b/login/src/main/java/com/guwan/service/impl/SystemRoleServiceImpl.java
new file mode 100644
index 0000000..0a30a3e
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/impl/SystemRoleServiceImpl.java
@@ -0,0 +1,23 @@
+package com.guwan.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.guwan.RBAC.SystemRole;
+import com.guwan.mapper.SystemRoleMapper;
+import service.SystemRoleService;
+
+import org.springframework.stereotype.Service;
+
+/**
+* @author 12455
+* @description 针对表【system_role(角色信息表)】的数据库操作Service实现
+* @createDate 2024-11-13 15:58:26
+*/
+@Service
+public class SystemRoleServiceImpl extends ServiceImpl
+ implements SystemRoleService{
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/service/impl/SystemUserRoleServiceImpl.java b/login/src/main/java/com/guwan/service/impl/SystemUserRoleServiceImpl.java
new file mode 100644
index 0000000..1d027fd
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/impl/SystemUserRoleServiceImpl.java
@@ -0,0 +1,23 @@
+package com.guwan.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.guwan.RBAC.SystemUserRole;
+import com.guwan.mapper.SystemUserRoleMapper;
+import service.SystemUserRoleService;
+
+import org.springframework.stereotype.Service;
+
+/**
+* @author 12455
+* @description 针对表【system_user_role(用户和角色关联表)】的数据库操作Service实现
+* @createDate 2024-11-13 15:58:26
+*/
+@Service
+public class SystemUserRoleServiceImpl extends ServiceImpl
+ implements SystemUserRoleService{
+
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/service/impl/SystemUsersServiceImpl.java b/login/src/main/java/com/guwan/service/impl/SystemUsersServiceImpl.java
new file mode 100644
index 0000000..2105a17
--- /dev/null
+++ b/login/src/main/java/com/guwan/service/impl/SystemUsersServiceImpl.java
@@ -0,0 +1,105 @@
+package com.guwan.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.guwan.RBAC.*;
+import com.guwan.mapper.*;
+import lombok.RequiredArgsConstructor;
+
+import org.springframework.stereotype.Service;
+import service.SystemUsersService;
+
+import java.util.List;
+
+/**
+* @author 12455
+* @description 针对表【system_users(用户信息表)】的数据库操作Service实现
+* @createDate 2024-11-13 15:58:26
+*/
+@Service
+@RequiredArgsConstructor
+public class SystemUsersServiceImpl extends ServiceImpl
+ implements SystemUsersService{
+
+
+ private final SystemUsersMapper systemUsersMapper;
+
+ private final SystemUserRoleMapper systemUserRoleMapper;
+ //system_role_menu
+ private final SystemRoleMenuMapper systemRoleMenuMapper;
+ private final SystemMenuMapper systemMenuMapper;
+ private final SystemRoleMapper systemRoleMapper;
+
+
+ @Override
+ public void getRouterAsync() {
+
+
+ /* List roleList = ;
+
+
+ System.out.println("角色list = " + roleList);
+
+ //SELECT * FROM system_menu WHERE id in (SELECT menu_id FROM system_role_menu where role_id in (101, 1 ,2))
+
+ List menuList = ;
+
+ System.out.println("menuList = " + menuList);*/
+
+
+ List roleList = systemUserRoleMapper
+ .selectObjs(new LambdaQueryWrapper()
+ .eq(SystemUserRole::getUserId,
+ systemUsersMapper.selectOne(new LambdaQueryWrapper()
+ .eq(SystemUsers::getUsername, "yudao"))
+ .getId()).select(SystemUserRole::getRoleId));
+
+ System.out.println("roleList = " + roleList);
+
+
+ List roleName = systemRoleMapper.selectObjs(new LambdaQueryWrapper()
+ .in(SystemRole::getId, roleList).select(SystemRole::getCode));
+
+ System.out.println("roleName = " + roleName);
+
+
+ List systemMenus = systemMenuMapper
+ .selectList(new LambdaQueryWrapper()
+ .in(SystemMenu::getId, systemRoleMenuMapper
+ .selectObjs(new LambdaQueryWrapper()
+ .in(SystemRoleMenu::getRoleId, systemUserRoleMapper
+ .selectObjs(new LambdaQueryWrapper()
+ .eq(SystemUserRole::getUserId,
+ systemUsersMapper.selectOne(new LambdaQueryWrapper()
+ .eq(SystemUsers::getUsername, "yudao"))
+ .getId()).select(SystemUserRole::getRoleId)))
+ .select(SystemRoleMenu::getMenuId))));
+
+ // System.out.println("systemMenus = " + systemMenus);
+
+ systemMenus.stream().filter(systemMenu -> !systemMenu.getDeleted() && systemMenu.getVisible())
+ .map(systemMenu -> {
+
+ // 角色码列表
+ List roleCodeList;
+ roleCodeList = roleName;
+
+ // 权限码列表
+ List powerCodeList;
+
+
+ RouterMeta meta = new RouterMeta();
+
+
+ return null;
+
+ }).distinct().toList();
+
+
+
+ }
+}
+
+
+
+
diff --git a/login/src/main/java/com/guwan/util/ToTextExample.java b/login/src/main/java/com/guwan/util/ToTextExample.java
index d053b22..c75ebbf 100644
--- a/login/src/main/java/com/guwan/util/ToTextExample.java
+++ b/login/src/main/java/com/guwan/util/ToTextExample.java
@@ -18,6 +18,10 @@ import org.springframework.web.client.RestTemplate;
import java.io.InputStream;
+
+/**
+ * 语音转文本1
+ */
@Component
public class ToTextExample {
@@ -55,10 +59,10 @@ public class ToTextExample {
System.out.println(text);
return text;
} else {
- System.out.println("1111");
+ System.out.println("识别发生错误");
}
} catch (Exception e) {
- System.out.println("2222");
+ System.out.println("识别发生错误");
}
return "识别发生错误!";
}
diff --git a/login/src/main/java/com/guwan/ws/VoiceWebSocketServer.java b/login/src/main/java/com/guwan/ws/VoiceWebSocketServer.java
new file mode 100644
index 0000000..df9c0ef
--- /dev/null
+++ b/login/src/main/java/com/guwan/ws/VoiceWebSocketServer.java
@@ -0,0 +1,50 @@
+package com.guwan.ws;
+
+import jakarta.websocket.*;
+import jakarta.websocket.server.PathParam;
+import jakarta.websocket.server.ServerEndpoint;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.nio.ByteBuffer;
+
+@Slf4j
+@Component
+@ServerEndpoint(value = "/ws/voice")
+public class VoiceWebSocketServer {
+
+ @OnOpen
+ public void onOpen(Session session) {
+ log.info("WebSocket 连接已建立,session ID: {}", session.getId());
+ }
+
+ @OnMessage
+ public void onMessage(Session session, String audioData) {
+ System.out.println("WebSocket 连接已处理 = " + session);
+ sendMessage(session, audioData);
+ }
+
+ @OnClose
+ public void onClose(Session session) {
+ log.info("WebSocket 连接已关闭,session ID: {}", session.getId());
+ }
+
+ @OnError
+ public void onError(Throwable error) {
+ log.error("onError", error);
+ }
+
+ private void sendMessage(Session session, String text) {
+ try {
+ session.getBasicRemote().sendText(text);
+ } catch (Exception e) {
+ log.error("Error sending message", e);
+ }
+ }
+
+ // 语音识别服务方法(示例)
+ private String transcribeAudio() {
+ // 模拟的语音识别
+ return "识别到的文本内容";
+ }
+}
diff --git a/pom.xml b/pom.xml
index fbd9414..c9120b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,6 +119,12 @@
6.1.0
+
+ com.github.yulichang
+ mybatis-plus-join-boot-starter
+ 1.5.0
+
+
diff --git a/qrcode.png b/qrcode.png
index 970739f..cccf5b7 100644
Binary files a/qrcode.png and b/qrcode.png differ
diff --git a/src/main/java/com/guwan/generator/RBAC/SystemMenu.java b/src/main/java/com/guwan/generator/RBAC/SystemMenu.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/RBAC/SystemRole.java b/src/main/java/com/guwan/generator/RBAC/SystemRole.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/RBAC/SystemRoleMenu.java b/src/main/java/com/guwan/generator/RBAC/SystemRoleMenu.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/RBAC/SystemUserRole.java b/src/main/java/com/guwan/generator/RBAC/SystemUserRole.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/RBAC/SystemUsers.java b/src/main/java/com/guwan/generator/RBAC/SystemUsers.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/mapper/SystemMenuMapper.java b/src/main/java/com/guwan/generator/mapper/SystemMenuMapper.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/mapper/SystemRoleMapper.java b/src/main/java/com/guwan/generator/mapper/SystemRoleMapper.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/mapper/SystemRoleMenuMapper.java b/src/main/java/com/guwan/generator/mapper/SystemRoleMenuMapper.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/mapper/SystemUserRoleMapper.java b/src/main/java/com/guwan/generator/mapper/SystemUserRoleMapper.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/mapper/SystemUsersMapper.java b/src/main/java/com/guwan/generator/mapper/SystemUsersMapper.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/SystemMenuService.java b/src/main/java/com/guwan/generator/service/SystemMenuService.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/SystemRoleMenuService.java b/src/main/java/com/guwan/generator/service/SystemRoleMenuService.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/SystemRoleService.java b/src/main/java/com/guwan/generator/service/SystemRoleService.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/SystemUserRoleService.java b/src/main/java/com/guwan/generator/service/SystemUserRoleService.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/SystemUsersService.java b/src/main/java/com/guwan/generator/service/SystemUsersService.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/impl/SystemMenuServiceImpl.java b/src/main/java/com/guwan/generator/service/impl/SystemMenuServiceImpl.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/impl/SystemRoleMenuServiceImpl.java b/src/main/java/com/guwan/generator/service/impl/SystemRoleMenuServiceImpl.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/impl/SystemRoleServiceImpl.java b/src/main/java/com/guwan/generator/service/impl/SystemRoleServiceImpl.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/impl/SystemUserRoleServiceImpl.java b/src/main/java/com/guwan/generator/service/impl/SystemUserRoleServiceImpl.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/java/com/guwan/generator/service/impl/SystemUsersServiceImpl.java b/src/main/java/com/guwan/generator/service/impl/SystemUsersServiceImpl.java
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/resources/mapper/SystemMenuMapper.xml b/src/main/resources/mapper/SystemMenuMapper.xml
new file mode 100644
index 0000000..6eeb134
--- /dev/null
+++ b/src/main/resources/mapper/SystemMenuMapper.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,name,permission,
+ type,sort,parent_id,
+ path,icon,component,
+ component_name,status,visible,
+ keep_alive,always_show,creator,
+ create_time,updater,update_time,
+ deleted
+
+
diff --git a/src/main/resources/mapper/SystemRoleMapper.xml b/src/main/resources/mapper/SystemRoleMapper.xml
new file mode 100644
index 0000000..9d9fbd3
--- /dev/null
+++ b/src/main/resources/mapper/SystemRoleMapper.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,name,code,
+ sort,data_scope,data_scope_dept_ids,
+ status,type,remark,
+ creator,create_time,updater,
+ update_time,deleted,tenant_id
+
+
diff --git a/src/main/resources/mapper/SystemRoleMenuMapper.xml b/src/main/resources/mapper/SystemRoleMenuMapper.xml
new file mode 100644
index 0000000..baed255
--- /dev/null
+++ b/src/main/resources/mapper/SystemRoleMenuMapper.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,role_id,menu_id,
+ creator,create_time,updater,
+ update_time,deleted,tenant_id
+
+
diff --git a/src/main/resources/mapper/SystemUserRoleMapper.xml b/src/main/resources/mapper/SystemUserRoleMapper.xml
new file mode 100644
index 0000000..ba87ad1
--- /dev/null
+++ b/src/main/resources/mapper/SystemUserRoleMapper.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,user_id,role_id,
+ creator,create_time,updater,
+ update_time,deleted,tenant_id
+
+
diff --git a/src/main/resources/mapper/SystemUsersMapper.xml b/src/main/resources/mapper/SystemUsersMapper.xml
new file mode 100644
index 0000000..faf3e38
--- /dev/null
+++ b/src/main/resources/mapper/SystemUsersMapper.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,username,password,
+ nickname,remark,dept_id,
+ post_ids,email,mobile,
+ sex,avatar,status,
+ login_ip,login_date,creator,
+ create_time,updater,update_time,
+ deleted,tenant_id
+
+