fix: 移除租户id
This commit is contained in:
73
README.md
73
README.md
@@ -20,7 +20,6 @@
|
||||
|
||||

|
||||
|
||||
|
||||
<div align="center">
|
||||
<img alt="logo" width="100" height="100" src="https://foruda.gitee.com/images/1733417239320800627/3c5290fe_716974.png">
|
||||
<h2>youlai-boot</h2>
|
||||
@@ -50,39 +49,41 @@
|
||||
|
||||
## 📢 项目简介
|
||||
|
||||
基于 JDK 17、Spring Boot 3、Spring Security 6、JWT、Redis、Mybatis-Plus、Vue 3、Element-Plus 构建的前后端分离单体权限管理系统。 [Mybatis-Flex 版本](https://gitee.com/youlaiorg/youlai-boot-flex)
|
||||
基于 JDK 17、Spring Boot 3、Spring Security 6、JWT、Redis、Mybatis-Plus、Vue
|
||||
3、Element-Plus 构建的前后端分离单体权限管理系统。
|
||||
[Mybatis-Flex 版本](https://gitee.com/youlaiorg/youlai-boot-flex)
|
||||
|
||||
- **🚀 开发框架**: 使用 Spring Boot 3 和 Vue 3,以及 Element-Plus 等主流技术栈,实时更新。
|
||||
- **🚀 开发框架**: 使用 Spring Boot 3 和 Vue 3,以及 Element-Plus 等主流技术栈,
|
||||
实时更新。
|
||||
|
||||
- **🔐 安全认证**: 基于 Spring Security 6 原生架构,集成 JWT 令牌自动续期(无状态)和 Redis 会话多端互斥管理(实时强制离线)双重认证机制,构建企业级身份安全中枢。
|
||||
- **🔐 安全认证**: 基于 Spring Security 6 原生架构,集成 JWT 令牌自动续期(无状
|
||||
态)和 Redis 会话多端互斥管理(实时强制离线)双重认证机制,构建企业级身份安全
|
||||
中枢。
|
||||
|
||||
- **🔑 权限管理**: 基于 RBAC 模型,实现细粒度的权限控制,涵盖接口方法和按钮级别。
|
||||
- **🔑 权限管理**: 基于 RBAC 模型,实现细粒度的权限控制,涵盖接口方法和按钮级别
|
||||
。
|
||||
|
||||
- **🛠️ 功能模块**: 包括用户管理、角色管理、菜单管理、部门管理、字典管理等功能。
|
||||
|
||||
## 🌈 项目源码
|
||||
|
||||
| 项目类型 | Gitee | Github | GitCode |
|
||||
| --------------| ------------------------- | ------------------------------- | ------------------------------------- |
|
||||
| ✅ Java 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot) | [youlai-boot](https://gitcode.com/youlai/youlai-boot) |
|
||||
| vue3 前端 | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) |
|
||||
| 项目类型 | Gitee | Github | GitCode |
|
||||
| -------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------- |
|
||||
| ✅ Java 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot) | [youlai-boot](https://gitcode.com/youlai/youlai-boot) |
|
||||
| vue3 前端 | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) |
|
||||
| uni-app 移动端 | [vue-uniapp-template](https://gitee.com/youlaiorg/vue-uniapp-template) | [vue-uniapp-template](https://github.com/youlaitech/vue-uniapp-template) | [vue-uniapp-template](https://gitcode.com/youlai/vue-uniapp-template) |
|
||||
|
||||
|
||||
|
||||
## 📚 项目文档
|
||||
|
||||
| 文档名称 | 访问地址 |
|
||||
|---------------|-------------------------------------------------------------------------------------------|
|
||||
| 在线接口文档 | [https://www.apifox.cn/apidoc](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) |
|
||||
| 项目介绍与使用指南 | [https://www.youlai.tech/youlai-boot/](https://www.youlai.tech/youlai-boot/) |
|
||||
| 功能详解与操作手册 | [https://youlai.blog.csdn.net/article/details/145178880](https://youlai.blog.csdn.net/article/details/145178880) |
|
||||
| 新手入门指南(项目0到1) | [https://youlai.blog.csdn.net/article/details/145177011](https://youlai.blog.csdn.net/article/details/145177011) |
|
||||
|
||||
| 文档名称 | 访问地址 |
|
||||
| ------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| 在线接口文档 | [https://www.apifox.cn/apidoc](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) |
|
||||
| 项目介绍与使用指南 | [https://www.youlai.tech/youlai-boot/](https://www.youlai.tech/youlai-boot/) |
|
||||
| 功能详解与操作手册 | [https://youlai.blog.csdn.net/article/details/145178880](https://youlai.blog.csdn.net/article/details/145178880) |
|
||||
| 新手入门指南(项目 0 到 1) | [https://youlai.blog.csdn.net/article/details/145177011](https://youlai.blog.csdn.net/article/details/145177011) |
|
||||
|
||||
## 📁 项目目录
|
||||
|
||||
|
||||
<details>
|
||||
<summary> 目录结构 </summary>
|
||||
|
||||
@@ -146,15 +147,15 @@ youlai-boot
|
||||
│ │ │ └── vo # 视图对象
|
||||
│ │ └── service # 业务逻辑层
|
||||
│ └── YouLaiBootApplication # 启动类
|
||||
└── end
|
||||
└── end
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## 🚀 项目启动
|
||||
|
||||
📚 完整流程参考: [项目启动](https://www.youlai.tech/youlai-boot/1.%E9%A1%B9%E7%9B%AE%E5%90%AF%E5%8A%A8/)
|
||||
📚 完整流程参考:
|
||||
[项目启动](https://www.youlai.tech/youlai-boot/1.%E9%A1%B9%E7%9B%AE%E5%90%AF%E5%8A%A8/)
|
||||
|
||||
1. **克隆项目**
|
||||
|
||||
@@ -164,23 +165,29 @@ youlai-boot
|
||||
|
||||
2. **数据库初始化**
|
||||
|
||||
执行 [youlai_boot.sql](sql/mysql/youlai_boot.sql) 脚本完成数据库创建、表结构和基础数据的初始化。
|
||||
执行 [youlai_admin.sql](sql/mysql/youlai_admin.sql) 脚本完成数据库创建、表结
|
||||
构和基础数据的初始化。
|
||||
|
||||
3. **修改配置**
|
||||
|
||||
默认连接`有来`线上 MySQL/Redis(仅读权限),本地开发时请修改 [application-dev.yml](src/main/resources/application-dev.yml) 中的 MySQL 和 Redis 连接信息。
|
||||
默认连接`有来`线上 MySQL/Redis(仅读权限),本地开发时请修改
|
||||
[application-dev.yml](src/main/resources/application-dev.yml) 中的 MySQL 和
|
||||
Redis 连接信息。
|
||||
|
||||
4. **启动项目**
|
||||
|
||||
执行 [YoulaiBootApplication.java](src/main/java/com/youlai/boot/YoulaiBootApplication.java) 的 main 方法完成后端项目启动;
|
||||
|
||||
访问接口文档地址 [http://localhost:8989/doc.html](http://localhost:8989/doc.html) 验证项目启动是否成功。
|
||||
执行
|
||||
[YoulaiBootApplication.java](src/main/java/com/youlai/boot/YoulaiBootApplication.java)
|
||||
的 main 方法完成后端项目启动;
|
||||
|
||||
访问接口文档地址
|
||||
[http://localhost:8989/doc.html](http://localhost:8989/doc.html) 验证项目启动
|
||||
是否成功。
|
||||
|
||||
## 🚀 项目部署
|
||||
|
||||
参考官方文档: [项目部署指南](https://www.youlai.tech/youlai-boot/5.%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/)
|
||||
|
||||
参考官方文档:
|
||||
[项目部署指南](https://www.youlai.tech/youlai-boot/5.%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/)
|
||||
|
||||
## ✅ 项目统计
|
||||
|
||||
@@ -190,11 +197,11 @@ Thanks to all the contributors!
|
||||
|
||||
[](https://github.com/haoxianrui/youlai-boot/graphs/contributors)
|
||||
|
||||
|
||||
## 💖 加交流群
|
||||
|
||||
① 关注「有来技术」公众号,点击菜单 **交流群** 获取加群二维码(此举防止广告进群,感谢理解和支持)。
|
||||
① 关注「有来技术」公众号,点击菜单 **交流群** 获取加群二维码(此举防止广告进群,
|
||||
感谢理解和支持)。
|
||||
|
||||
② 直接添加微信 **`haoxianrui`** 备注「前端/后端/全栈」。
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -329,7 +329,6 @@ INSERT INTO `sys_role_menu` VALUES (2, 1001), (2, 1002);
|
||||
DROP TABLE IF EXISTS `sys_user`;
|
||||
CREATE TABLE `sys_user` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`tenant_id` bigint DEFAULT 1 COMMENT '租户ID',
|
||||
`username` varchar(64) COMMENT '用户名',
|
||||
`nickname` varchar(64) COMMENT '昵称',
|
||||
`gender` tinyint(1) DEFAULT 1 COMMENT '性别((1-男 2-女 0-保密)',
|
||||
@@ -346,16 +345,15 @@ CREATE TABLE `sys_user` (
|
||||
`is_deleted` tinyint(1) DEFAULT 0 COMMENT '逻辑删除标识(0-未删除 1-已删除)',
|
||||
`openid` char(28) COMMENT '微信 openid',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_username_tenant` (`username`, `tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`)
|
||||
UNIQUE KEY `uk_username` (`username`)
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统用户表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_user
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_user` VALUES (1, 1, 'root', '有来技术', 0, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', NULL, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345677', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0,NULL);
|
||||
INSERT INTO `sys_user` VALUES (2, 1, 'admin', '系统管理员', 1, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', 1, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345678', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0,NULL);
|
||||
INSERT INTO `sys_user` VALUES (3, 1, 'test', '测试小用户', 1, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', 3, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345679', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0,NULL);
|
||||
INSERT INTO `sys_user` VALUES (1, 'root', '有来技术', 0, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', NULL, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345677', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0,NULL);
|
||||
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', 1, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345678', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0,NULL);
|
||||
INSERT INTO `sys_user` VALUES (3, 'test', '测试小用户', 1, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', 3, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345679', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0,NULL);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user_role
|
||||
|
||||
Reference in New Issue
Block a user