first commit
53
.gitignore
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
######################################################################
|
||||
# Build Tools
|
||||
|
||||
.gradle
|
||||
/build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
.flattened-pom.xml
|
||||
|
||||
######################################################################
|
||||
# IDE
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
nbproject/private/
|
||||
build/*
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
*.log
|
||||
*.xml.versionsBackup
|
||||
*.swp
|
||||
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
||||
application-my.yaml
|
||||
|
||||
/yskj-ui-app/unpackage/
|
BIN
.image/Java监控.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
.image/MySQL.jpg
Normal file
After Width: | Height: | Size: 142 KiB |
BIN
.image/OA请假-列表.jpg
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
.image/OA请假-发起.jpg
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
.image/OA请假-详情.jpg
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
.image/Redis.jpg
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
.image/admin-uniapp/01.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
.image/admin-uniapp/02.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
.image/admin-uniapp/03.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
.image/admin-uniapp/04.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
.image/admin-uniapp/05.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
.image/admin-uniapp/06.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
.image/admin-uniapp/07.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
.image/admin-uniapp/08.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
.image/admin-uniapp/09.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
.image/common/ai-feature.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
.image/common/ai-preview.gif
Normal file
After Width: | Height: | Size: 348 KiB |
BIN
.image/common/bpm-feature.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
.image/common/crm-feature.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
.image/common/erp-feature.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
.image/common/infra-feature.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
.image/common/mall-feature.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
.image/common/mall-preview.png
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
.image/common/project-vs.png
Normal file
After Width: | Height: | Size: 139 KiB |
BIN
.image/common/ruoyi-vue-pro-architecture.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
.image/common/ruoyi-vue-pro-biz.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
.image/common/system-feature.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
.image/common/yskj-cloud-architecture.png
Normal file
After Width: | Height: | Size: 201 KiB |
BIN
.image/common/yskj-roadmap.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
.image/个人中心.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
.image/代码生成.jpg
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
.image/令牌管理.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
.image/任务列表-审批.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
.image/任务列表-已办.jpg
Normal file
After Width: | Height: | Size: 160 KiB |
BIN
.image/任务列表-待办.jpg
Normal file
After Width: | Height: | Size: 150 KiB |
BIN
.image/任务日志.jpg
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
.image/商户信息.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
.image/在线用户.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
.image/大屏设计器-列表.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
.image/大屏设计器-编辑.jpg
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
.image/大屏设计器-预览.jpg
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
.image/字典数据.jpg
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
.image/字典类型.jpg
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
.image/定时任务.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
.image/岗位管理.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
.image/应用信息-列表.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
.image/应用信息-编辑.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
.image/应用管理.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
.image/我的流程-列表.jpg
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
.image/我的流程-发起.jpg
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
.image/我的流程-详情.jpg
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
.image/报表设计器-图形报表.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
.image/报表设计器-打印设计.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
.image/报表设计器-数据报表.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
.image/操作日志.jpg
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
.image/支付订单.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
.image/敏感词.jpg
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
.image/数据库文档.jpg
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
.image/文件管理.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
.image/文件管理2.jpg
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
.image/文件配置.jpg
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
.image/日志中心.jpg
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
.image/流程模型-列表.jpg
Normal file
After Width: | Height: | Size: 173 KiB |
BIN
.image/流程模型-定义.jpg
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
.image/流程模型-设计.jpg
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
.image/流程表单.jpg
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
.image/生成效果.jpg
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
.image/用户分组.jpg
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
.image/用户管理.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
.image/登录.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
.image/登录日志.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
.image/短信日志.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
.image/短信模板.jpg
Normal file
After Width: | Height: | Size: 248 KiB |
BIN
.image/短信渠道.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
.image/租户套餐.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
.image/租户管理.jpg
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
.image/系统接口.jpg
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
.image/菜单管理.jpg
Normal file
After Width: | Height: | Size: 129 KiB |
BIN
.image/表单构建.jpg
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
.image/角色管理.jpg
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
.image/访问日志.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
.image/退款订单.jpg
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
.image/通知公告.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
.image/部门管理.jpg
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
.image/配置管理.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
.image/链路追踪.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
.image/错误日志.jpg
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
.image/错误码管理.jpg
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
.image/首页.jpg
Normal file
After Width: | Height: | Size: 62 KiB |
20
LICENSE
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 ruoyi-vue-pro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
364
README.md
Normal file
@ -0,0 +1,364 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-3.3.1-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Vue-3.2-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/github/license/YunaiV/ruoyi-vue-pro" alt="Downloads" />
|
||||
</p>
|
||||
|
||||
**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!!**
|
||||
|
||||
**「我喜欢写代码,乐此不疲」**
|
||||
**「我喜欢做开源,以此为乐」**
|
||||
|
||||
我 🐶 在上海艰苦奋斗,早中晚在 top3 大厂认真搬砖,夜里为开源做贡献。
|
||||
|
||||
如果这个项目让你有所收获,记得 Star 关注哦,这对我是非常不错的鼓励与支持。
|
||||
|
||||
## 🐶 新手必读
|
||||
|
||||
* 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yskj.iocoder.cn>
|
||||
* 演示地址【Vue3 + vben(ant-design-vue)】:<http://dashboard-vben.yskj.iocoder.cn>
|
||||
* 演示地址【Vue2 + element-ui】:<http://dashboard.yskj.iocoder.cn>
|
||||
* 启动文档:<https://doc.iocoder.cn/quick-start/>
|
||||
* 视频教程:<https://doc.iocoder.cn/video/>
|
||||
|
||||
## 🐰 版本说明
|
||||
|
||||
| 版本 | JDK 8 + Spring Boot 2.7 | JDK 17/21 + Spring Boot 3.2 |
|
||||
|---------------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
|
||||
| 【完整版】[ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master-jdk17/) 分支 |
|
||||
| 【精简版】[yskj-boot-mini](https://gitee.com/yskjcode/yskj-boot-mini) | [`master`](https://gitee.com/yskjcode/yskj-boot-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yskjcode/yskj-boot-mini/tree/master-jdk17/) 分支 |
|
||||
|
||||
* 【完整版】:包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
|
||||
* 【精简版】:只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
|
||||
|
||||
可参考 [《迁移文档》](https://doc.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
|
||||
|
||||
## 🐯 平台简介
|
||||
|
||||
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
|
||||
|
||||
> 有任何问题,或者想要的功能,可以在 _Issues_ 中提给艿艿。
|
||||
>
|
||||
> 😜 给项目点点 Star 吧,这对我们真的很重要!
|
||||
|
||||
![架构图](/.image/common/ruoyi-vue-pro-architecture.png)
|
||||
|
||||
* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7,`master-jdk17` 分支为 JDK 17/21 + Spring Boot 3.2
|
||||
* 管理后台的电脑端:Vue3 提供 `element-plus`、`vben(ant-design-vue)` 两个版本,Vue2 提供 `element-ui` 版本
|
||||
* 管理后台的移动端:采用 `uni-app` 方案,一份代码多终端适配,同时支持 APP、小程序、H5!
|
||||
* 后端采用 Spring Boot 多模块架构、MySQL + MyBatis Plus、Redis + Redisson
|
||||
* 数据库可使用 MySQL、Oracle、PostgreSQL、SQL Server、MariaDB、国产达梦 DM、TiDB 等
|
||||
* 消息队列可使用 Event、Redis、RabbitMQ、Kafka、RocketMQ 等
|
||||
* 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统,支持 SSO 单点登录
|
||||
* 支持加载动态权限菜单,按钮级别权限控制,Redis 缓存提升性能
|
||||
* 支持 SaaS 多租户,可自定义每个租户的权限,提供透明化的多租户底层封装
|
||||
* 工作流使用 Flowable,支持动态表单、在线设计流程、会签 / 或签、多种任务分配方式
|
||||
* 高效率开发,使用代码生成器可以一键生成 Java、Vue 前后端代码、SQL 脚本、接口文档,支持单表、树表、主子表
|
||||
* 实时通信,采用 Spring WebSocket 实现,内置 Token 身份校验,支持 WebSocket 集群
|
||||
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆,集成支付宝、微信等支付与退款
|
||||
* 集成阿里云、腾讯云等短信渠道,集成 MinIO、阿里云、腾讯云、七牛云等云存储服务
|
||||
* 集成报表设计器、大屏设计器,通过拖拽即可生成酷炫的报表与大屏
|
||||
|
||||
## 🐳 项目关系
|
||||
|
||||
![架构演进](/.image/common/yskj-roadmap.png)
|
||||
|
||||
三个项目的功能对比,可见社区共同整理的 [国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn) 表格。
|
||||
|
||||
### 后端项目
|
||||
|
||||
| 项目 | Star | 简介 |
|
||||
|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
|
||||
| [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [![Gitee star](https://gitee.com/zhijiantianya/ruoyi-vue-pro/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/ruoyi-vue-pro) [![GitHub stars](https://img.shields.io/github/stars/YunaiV/ruoyi-vue-pro.svg?style=social&label=Stars)](https://github.com/YunaiV/ruoyi-vue-pro) | 基于 Spring Boot 多模块架构 |
|
||||
| [yskj-cloud](https://gitee.com/zhijiantianya/yskj-cloud) | [![Gitee star](https://gitee.com/zhijiantianya/yskj-cloud/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/yskj-cloud) [![GitHub stars](https://img.shields.io/github/stars/YunaiV/yskj-cloud.svg?style=social&label=Stars)](https://github.com/YunaiV/yskj-cloud) | 基于 Spring Cloud 微服务架构 |
|
||||
| [Spring-Boot-Labs](https://gitee.com/yskjcode/SpringBoot-Labs) | [![Gitee star](https://gitee.com/yskjcode/SpringBoot-Labs/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/yskj-cloud) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/SpringBoot-Labs.svg?style=social&label=Stars)](https://github.com/yskjcode/SpringBoot-Labs) | 系统学习 Spring Boot & Cloud 专栏 |
|
||||
|
||||
### 前端项目
|
||||
|
||||
| 项目 | Star | 简介 |
|
||||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
|
||||
| [yskj-ui-admin-vue3](https://gitee.com/yskjcode/yskj-ui-admin-vue3) | [![Gitee star](https://gitee.com/yskjcode/yskj-ui-admin-vue3/badge/star.svg?theme=white)](https://gitee.com/yskjcode/yskj-ui-admin-vue3) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/yskj-ui-admin-vue3.svg?style=social&label=Stars)](https://github.com/yskjcode/yskj-ui-admin-vue3) | 基于 Vue3 + element-plus 实现的管理后台 |
|
||||
| [yskj-ui-admin-vben](https://gitee.com/yskjcode/yskj-ui-admin-vben) | [![Gitee star](https://gitee.com/yskjcode/yskj-ui-admin-vben/badge/star.svg?theme=white)](https://gitee.com/yskjcode/yskj-ui-admin-vben) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/yskj-ui-admin-vben.svg?style=social&label=Stars)](https://github.com/yskjcode/yskj-ui-admin-vben) | 基于 Vue3 + vben(ant-design-vue) 实现的管理后台 |
|
||||
| [yskj-mall-uniapp](https://gitee.com/yskjcode/yskj-mall-uniapp) | [![Gitee star](https://gitee.com/yskjcode/yskj-mall-uniapp/badge/star.svg?theme=white)](https://gitee.com/yskjcode/yskj-mall-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/yskj-mall-uniapp.svg?style=social&label=Stars)](https://github.com/yskjcode/yskj-mall-uniapp) | 基于 uni-app 实现的商城小程序 |
|
||||
| [yskj-ui-admin-vue2](https://gitee.com/yskjcode/yskj-ui-admin-vue2) | [![Gitee star](https://gitee.com/yskjcode/yskj-ui-admin-vue2/badge/star.svg?theme=white)](https://gitee.com/yskjcode/yskj-ui-admin-vue2) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/yskj-ui-admin-vue2.svg?style=social&label=Stars)](https://github.com/yskjcode/yskj-ui-admin-vue2) | 基于 Vue2 + element-ui 实现的管理后台 |
|
||||
| [yskj-ui-admin-uniapp](https://gitee.com/yskjcode/yskj-ui-admin-uniapp) | [![Gitee star](https://gitee.com/yskjcode/yskj-ui-admin-uniapp/badge/star.svg?theme=white)](https://gitee.com/yskjcode/yskj-ui-admin-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/yskj-ui-admin-uniapp.svg?style=social&label=Stars)](https://github.com/yskjcode/yskj-ui-admin-uniapp) | 基于 Vue2 + element-ui 实现的管理后台 |
|
||||
| [yskj-ui-go-view](https://gitee.com/yskjcode/yskj-ui-go-view) | [![Gitee star](https://gitee.com/yskjcode/yskj-ui-go-view/badge/star.svg?theme=white)](https://gitee.com/yskjcode/yskj-ui-go-view) [![GitHub stars](https://img.shields.io/github/stars/yskjcode/yskj-ui-go-view.svg?style=social&label=Stars)](https://github.com/yskjcode/yskj-ui-go-view) | 基于 Vue3 + naive-ui 实现的大屏报表 |
|
||||
|
||||
## 😎 开源协议
|
||||
|
||||
**为什么推荐使用本项目?**
|
||||
|
||||
① 本项目采用比 Apache 2.0 更宽松的 [MIT License](https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE) 开源协议,个人与企业可 100% 免费使用,不用保留类作者、Copyright 信息。
|
||||
|
||||
② 代码全部开源,不会像其他项目一样,只开源部分代码,让你无法了解整个项目的架构设计。[国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn)
|
||||
|
||||
![开源项目对比](/.image/common/project-vs.png)
|
||||
|
||||
③ 代码整洁、架构整洁,遵循《阿里巴巴 Java 开发手册》规范,代码注释详细,113770 行 Java 代码,42462 行代码注释。
|
||||
|
||||
## 🤝 项目外包
|
||||
|
||||
我们也是接外包滴,如果你有项目想要外包,可以微信联系【**Aix9975**】。
|
||||
|
||||
团队包含专业的项目经理、架构师、前端工程师、后端工程师、测试工程师、运维工程师,可以提供全流程的外包服务。
|
||||
|
||||
项目可以是商城、SCRM 系统、OA 系统、物流系统、ERP 系统、CMS 系统、HIS 系统、支付系统、IM 聊天、微信公众号、微信小程序等等。
|
||||
|
||||
## 🐼 内置功能
|
||||
|
||||
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||
|
||||
![功能分层](/.image/common/ruoyi-vue-pro-biz.png)
|
||||
|
||||
* 通用模块(必选):系统功能、基础设施
|
||||
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
||||
* 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
|
||||
|
||||
> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
|
||||
>
|
||||
> * 额外新增的功能,我们使用 🚀 标记。
|
||||
> * 重新实现的功能,我们使用 ⭐️ 标记。
|
||||
|
||||
🙂 所有功能,都通过 **单元测试** 保证高质量。
|
||||
|
||||
### 系统功能
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|-------|---------------------------------|
|
||||
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
|
||||
| ⭐️ | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
|
||||
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
|
||||
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
|
||||
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
|
||||
| | 岗位管理 | 配置系统用户所属担任职务 |
|
||||
| 🚀 | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
|
||||
| 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
|
||||
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
|
||||
| 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
|
||||
| 🚀 | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 |
|
||||
| 🚀 | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 |
|
||||
| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
|
||||
| ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 |
|
||||
| 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
|
||||
| | 通知公告 | 系统通知公告信息发布维护 |
|
||||
| 🚀 | 敏感词 | 配置系统敏感词,支持标签分组 |
|
||||
| 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
|
||||
| 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 |
|
||||
|
||||
![功能图](/.image/common/system-feature.png)
|
||||
|
||||
### 工作流程
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|-------|----------------------------------------|
|
||||
| 🚀 | 流程模型 | 配置工作流的流程模型,支持文件导入与在线设计流程图,提供 7 种任务分配规则 |
|
||||
| 🚀 | 流程表单 | 拖动表单元素生成相应的工作流表单,覆盖 Element UI 所有的表单组件 |
|
||||
| 🚀 | 用户分组 | 自定义用户分组,可用于工作流的审批分组 |
|
||||
| 🚀 | 我的流程 | 查看我发起的工作流程,支持新建、取消流程等操作,高亮流程图、审批时间线 |
|
||||
| 🚀 | 待办任务 | 查看自己【未】审批的工作任务,支持通过、不通过、转发、委派、退回等操作 |
|
||||
| 🚀 | 已办任务 | 查看自己【已】审批的工作任务,未来会支持回退操作 |
|
||||
| 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 |
|
||||
|
||||
![功能图](/.image/common/bpm-feature.png)
|
||||
|
||||
### 支付系统
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|------|---------------------------|
|
||||
| 🚀 | 应用信息 | 配置商户的应用信息,对接支付宝、微信等多个支付渠道 |
|
||||
| 🚀 | 支付订单 | 查看用户发起的支付宝、微信等的【支付】订单 |
|
||||
| 🚀 | 退款订单 | 查看用户发起的支付宝、微信等的【退款】订单 |
|
||||
| 🚀 | 回调通知 | 查看支付回调业务的【支付】【退款】的通知结果 |
|
||||
| 🚀 | 接入示例 | 提供接入支付系统的【支付】【退款】的功能实战 |
|
||||
|
||||
### 基础设施
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|-----------|----------------------------------------------|
|
||||
| 🚀 | 代码生成 | 前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载 |
|
||||
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
|
||||
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
|
||||
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
|
||||
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
|
||||
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
|
||||
| 🚀 | 文件服务 | 支持将文件存储到 S3(MinIO、阿里云、腾讯云、七牛云)、本地、FTP、数据库等 |
|
||||
| 🚀 | WebSocket | 提供 WebSocket 接入示例,支持一对一、一对多发送方式 |
|
||||
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
|
||||
| | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 |
|
||||
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
|
||||
| 🚀 | 消息队列 | 基于 Redis 实现消息队列,Stream 提供集群消费,Pub/Sub 提供广播消费 |
|
||||
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
|
||||
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
|
||||
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
|
||||
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
|
||||
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
|
||||
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
|
||||
|
||||
![功能图](/.image/common/infra-feature.png)
|
||||
|
||||
### 数据报表
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|-------|--------------------|
|
||||
| 🚀 | 报表设计器 | 支持数据报表、图形报表、打印设计等 |
|
||||
| 🚀 | 大屏设计器 | 拖拽生成数据大屏,内置几十种图表组件 |
|
||||
|
||||
### 微信公众号
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|--------|-------------------------------|
|
||||
| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 |
|
||||
| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 |
|
||||
| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 |
|
||||
| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 |
|
||||
| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 |
|
||||
| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 |
|
||||
| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 |
|
||||
| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 |
|
||||
| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 |
|
||||
| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 |
|
||||
|
||||
### 商城系统
|
||||
|
||||
演示地址:<https://doc.iocoder.cn/mall-preview/>
|
||||
|
||||
![功能图](/.image/common/mall-feature.png)
|
||||
|
||||
![功能图](/.image/common/mall-preview.png)
|
||||
|
||||
### 会员中心
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|------|----------------------------------|
|
||||
| 🚀 | 会员管理 | 会员是 C 端的消费者,该功能用于会员的搜索与管理 |
|
||||
| 🚀 | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作 |
|
||||
| 🚀 | 会员等级 | 对会员的等级、成长值进行管理,可用于订单折扣等会员权益 |
|
||||
| 🚀 | 会员分组 | 对会员进行分组,用于用户画像、内容推送等运营手段 |
|
||||
| 🚀 | 积分签到 | 回馈给签到、消费等行为的积分,会员可订单抵现、积分兑换等途径消耗 |
|
||||
|
||||
### ERP 系统
|
||||
|
||||
演示地址:<https://doc.iocoder.cn/erp-preview/>
|
||||
|
||||
![功能图](/.image/common/erp-feature.png)
|
||||
|
||||
### CRM 系统
|
||||
|
||||
演示地址:<https://doc.iocoder.cn/crm-preview/>
|
||||
|
||||
![功能图](/.image/common/crm-feature.png)
|
||||
|
||||
### AI 大模型
|
||||
|
||||
演示地址:<https://doc.iocoder.cn/ai-preview/>
|
||||
|
||||
![功能图](/.image/common/ai-feature.png)
|
||||
|
||||
![功能图](/.image/common/ai-preview.gif)
|
||||
|
||||
## 🐨 技术栈
|
||||
|
||||
### 模块
|
||||
|
||||
| 项目 | 说明 |
|
||||
|-----------------------|--------------------|
|
||||
| `yskj-dependencies` | Maven 依赖版本管理 |
|
||||
| `yskj-framework` | Java 框架拓展 |
|
||||
| `yskj-server` | 管理后台 + 用户 APP 的服务端 |
|
||||
| `yskj-module-system` | 系统功能的 Module 模块 |
|
||||
| `yskj-module-member` | 会员中心的 Module 模块 |
|
||||
| `yskj-module-infra` | 基础设施的 Module 模块 |
|
||||
| `yskj-module-bpm` | 工作流程的 Module 模块 |
|
||||
| `yskj-module-pay` | 支付系统的 Module 模块 |
|
||||
| `yskj-module-mall` | 商城系统的 Module 模块 |
|
||||
| `yskj-module-erp` | ERP 系统的 Module 模块 |
|
||||
| `yskj-module-crm` | CRM 系统的 Module 模块 |
|
||||
| `yskj-module-ai` | AI 大模型的 Module 模块 |
|
||||
| `yskj-module-mp` | 微信公众号的 Module 模块 |
|
||||
| `yskj-module-report` | 大屏报表 Module 模块 |
|
||||
|
||||
### 框架
|
||||
|
||||
| 框架 | 说明 | 版本 | 学习指南 |
|
||||
|---------------------------------------------------------------------------------------------|------------------|----------------|----------------------------------------------------------------|
|
||||
| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 3.3.1 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
|
||||
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
|
||||
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.23 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yskj) |
|
||||
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.7 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yskj) |
|
||||
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 4.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yskj) |
|
||||
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 /7.0 | |
|
||||
| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.32.0 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yskj) |
|
||||
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 6.1.10 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yskj) |
|
||||
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 6.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yskj) |
|
||||
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 8.0.1 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yskj) |
|
||||
| [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 7.0.0 | [文档](https://doc.iocoder.cn/bpm/) |
|
||||
| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yskj) |
|
||||
| [Springdoc](https://springdoc.org/) | Swagger 文档 | 2.3.0 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yskj) |
|
||||
| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 9.0.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yskj) |
|
||||
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 3.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yskj) |
|
||||
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.17.1 | |
|
||||
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.5.5.Final | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yskj) |
|
||||
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.34 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yskj) |
|
||||
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.10.1 | - |
|
||||
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 5.7.0 | - |
|
||||
|
||||
## 🐷 演示图
|
||||
|
||||
### 系统功能
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
|----------|-----------------------------|---------------------------|--------------------------|
|
||||
| 登录 & 首页 | ![登录](/.image/登录.jpg) | ![首页](/.image/首页.jpg) | ![个人中心](/.image/个人中心.jpg) |
|
||||
| 用户 & 应用 | ![用户管理](/.image/用户管理.jpg) | ![令牌管理](/.image/令牌管理.jpg) | ![应用管理](/.image/应用管理.jpg) |
|
||||
| 租户 & 套餐 | ![租户管理](/.image/租户管理.jpg) | ![租户套餐](/.image/租户套餐.png) | - |
|
||||
| 部门 & 岗位 | ![部门管理](/.image/部门管理.jpg) | ![岗位管理](/.image/岗位管理.jpg) | - |
|
||||
| 菜单 & 角色 | ![菜单管理](/.image/菜单管理.jpg) | ![角色管理](/.image/角色管理.jpg) | - |
|
||||
| 审计日志 | ![操作日志](/.image/操作日志.jpg) | ![登录日志](/.image/登录日志.jpg) | - |
|
||||
| 短信 | ![短信渠道](/.image/短信渠道.jpg) | ![短信模板](/.image/短信模板.jpg) | ![短信日志](/.image/短信日志.jpg) |
|
||||
| 字典 & 敏感词 | ![字典类型](/.image/字典类型.jpg) | ![字典数据](/.image/字典数据.jpg) | ![敏感词](/.image/敏感词.jpg) |
|
||||
| 错误码 & 通知 | ![错误码管理](/.image/错误码管理.jpg) | ![通知公告](/.image/通知公告.jpg) | - |
|
||||
|
||||
### 工作流程
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
|---------|---------------------------------|---------------------------------|---------------------------------|
|
||||
| 流程模型 | ![流程模型-列表](/.image/流程模型-列表.jpg) | ![流程模型-设计](/.image/流程模型-设计.jpg) | ![流程模型-定义](/.image/流程模型-定义.jpg) |
|
||||
| 表单 & 分组 | ![流程表单](/.image/流程表单.jpg) | ![用户分组](/.image/用户分组.jpg) | - |
|
||||
| 我的流程 | ![我的流程-列表](/.image/我的流程-列表.jpg) | ![我的流程-发起](/.image/我的流程-发起.jpg) | ![我的流程-详情](/.image/我的流程-详情.jpg) |
|
||||
| 待办 & 已办 | ![任务列表-审批](/.image/任务列表-审批.jpg) | ![任务列表-待办](/.image/任务列表-待办.jpg) | ![任务列表-已办](/.image/任务列表-已办.jpg) |
|
||||
| OA 请假 | ![OA请假-列表](/.image/OA请假-列表.jpg) | ![OA请假-发起](/.image/OA请假-发起.jpg) | ![OA请假-详情](/.image/OA请假-详情.jpg) |
|
||||
|
||||
### 基础设施
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
|---------------|-------------------------------|-----------------------------|---------------------------|
|
||||
| 代码生成 | ![代码生成](/.image/代码生成.jpg) | ![生成效果](/.image/生成效果.jpg) | - |
|
||||
| 文档 | ![系统接口](/.image/系统接口.jpg) | ![数据库文档](/.image/数据库文档.jpg) | - |
|
||||
| 文件 & 配置 | ![文件配置](/.image/文件配置.jpg) | ![文件管理](/.image/文件管理2.jpg) | ![配置管理](/.image/配置管理.jpg) |
|
||||
| 定时任务 | ![定时任务](/.image/定时任务.jpg) | ![任务日志](/.image/任务日志.jpg) | - |
|
||||
| API 日志 | ![访问日志](/.image/访问日志.jpg) | ![错误日志](/.image/错误日志.jpg) | - |
|
||||
| MySQL & Redis | ![MySQL](/.image/MySQL.jpg) | ![Redis](/.image/Redis.jpg) | - |
|
||||
| 监控平台 | ![Java监控](/.image/Java监控.jpg) | ![链路追踪](/.image/链路追踪.jpg) | ![日志中心](/.image/日志中心.jpg) |
|
||||
|
||||
### 支付系统
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
|---------|---------------------------|---------------------------------|---------------------------------|
|
||||
| 商家 & 应用 | ![商户信息](/.image/商户信息.jpg) | ![应用信息-列表](/.image/应用信息-列表.jpg) | ![应用信息-编辑](/.image/应用信息-编辑.jpg) |
|
||||
| 支付 & 退款 | ![支付订单](/.image/支付订单.jpg) | ![退款订单](/.image/退款订单.jpg) | --- |
|
||||
### 数据报表
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
|-------|---------------------------------|---------------------------------|---------------------------------------|
|
||||
| 报表设计器 | ![数据报表](/.image/报表设计器-数据报表.jpg) | ![图形报表](/.image/报表设计器-图形报表.jpg) | ![报表设计器-打印设计](/.image/报表设计器-打印设计.jpg) |
|
||||
| 大屏设计器 | ![大屏列表](/.image/大屏设计器-列表.jpg) | ![大屏预览](/.image/大屏设计器-预览.jpg) | ![大屏编辑](/.image/大屏设计器-编辑.jpg) |
|
||||
|
||||
### 移动端(管理后台)
|
||||
|
||||
| biu | biu | biu |
|
||||
|----------------------------------|----------------------------------|----------------------------------|
|
||||
| ![](/.image/admin-uniapp/01.png) | ![](/.image/admin-uniapp/02.png) | ![](/.image/admin-uniapp/03.png) |
|
||||
| ![](/.image/admin-uniapp/04.png) | ![](/.image/admin-uniapp/05.png) | ![](/.image/admin-uniapp/06.png) |
|
||||
| ![](/.image/admin-uniapp/07.png) | ![](/.image/admin-uniapp/08.png) | ![](/.image/admin-uniapp/09.png) |
|
||||
|
||||
目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。
|
174
linghe-cwet/linghe-cwet-api/pom.xml
Normal file
@ -0,0 +1,174 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>linghe-cwet</artifactId>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<version>${revision}</version>
|
||||
<!-- 1. 修改 version 为 ${revision} -->
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>linghe-cwet-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>api 服务</description>
|
||||
<properties>
|
||||
<mybatisplus.version>3.5.6</mybatisplus.version>
|
||||
<satoken.version>1.37.0</satoken.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<artifactId>yskj-common</artifactId>
|
||||
</dependency>
|
||||
<!-- 业务组件 -->
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<artifactId>yskj-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<artifactId>yskj-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<artifactId>yskj-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test 测试相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<artifactId>yskj-spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.yskj.dev</groupId>
|
||||
<artifactId>yskj-spring-boot-starter-excel</artifactId>
|
||||
</dependency>
|
||||
<!-- MySQL数据库连接驱动 -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- 解决LocalDateTime 序列化问题-->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- 提供Redis连接池 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>javase</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Hutool综合工具包 -->
|
||||
<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.27</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<version>${mybatisplus.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-generator -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>${mybatisplus.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--配置模版生成器-->
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>2.3.31</version> <!-- 确保使用最新的稳定版本 -->
|
||||
</dependency>
|
||||
|
||||
<!-- Springfox Swagger 依赖 -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okio</groupId>
|
||||
<artifactId>okio</artifactId>
|
||||
<version>3.4.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--图像文字识别-->
|
||||
<!-- https://mvnrepository.com/artifact/net.sourceforge.tess4j/tess4j -->
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.tess4j</groupId>
|
||||
<artifactId>tess4j</artifactId>
|
||||
<version>5.12.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,141 @@
|
||||
package cn.yskj.linghe.module.common.aspect;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 接口访问日志输出
|
||||
*
|
||||
* @author hjp
|
||||
* @since 2024-07-10
|
||||
*/
|
||||
@Slf4j
|
||||
@Aspect
|
||||
@Component
|
||||
public class GlobalLogsAspect {
|
||||
|
||||
private static final String LOCAL_IPV4 = "127.0.0.1";
|
||||
private static final String LOCAL_IPV6 = "0:0:0:0:0:0:0:1";
|
||||
|
||||
@Resource
|
||||
private HttpServletRequest httpServletRequest;
|
||||
|
||||
@Pointcut(value = "execution(public com.yskj.acdr.common.response.GlobalResponse com.yskj.acdr.master.*..controller.*.*(..))")
|
||||
public void pointcut() {
|
||||
}
|
||||
|
||||
@Around(value = "pointcut()")
|
||||
public Object log(ProceedingJoinPoint pjp) throws Throwable {
|
||||
long s = System.currentTimeMillis();
|
||||
Object proceed;
|
||||
StringBuilder logInfo = new StringBuilder();
|
||||
try {
|
||||
String ip = getClientIp();
|
||||
logInfo.append("请求端地址:").append(ip).append(";");
|
||||
String type = httpServletRequest.getMethod();
|
||||
logInfo.append("请求类型:").append(type).append(";");
|
||||
String path = httpServletRequest.getServletPath();
|
||||
logInfo.append("请求方法:").append(path).append(";");
|
||||
|
||||
String args;
|
||||
String contentType = httpServletRequest.getContentType();
|
||||
if ("application/json".equals(contentType)) {
|
||||
args = "......";
|
||||
} else {
|
||||
MethodSignature signature = Convert.convert(MethodSignature.class, pjp.getSignature());
|
||||
String[] pns = signature.getParameterNames();
|
||||
Object[] pvs = pjp.getArgs();
|
||||
Dict entries = Dict.create();
|
||||
int pl = pns.length;
|
||||
for (int pi = 0; pi < pl; pi++) {
|
||||
String pn = pns[pi];
|
||||
Object pv = pvs[pi];
|
||||
if (!StrUtil.containsAnyIgnoreCase(pn, "pwd", "password")) {
|
||||
if (pv instanceof IPage || pv instanceof MultipartFile) {
|
||||
// 不记录分页信息和文件对象
|
||||
pv = pv.getClass().getSimpleName() + StrUtil.AT + pv.hashCode();
|
||||
}
|
||||
} else {
|
||||
pv = "********";
|
||||
}
|
||||
entries.set(pn, pv);
|
||||
}
|
||||
args = JSONUtil.toJsonStr(entries);
|
||||
}
|
||||
logInfo.append("请求参数:").append(args).append(";");
|
||||
|
||||
// 以上为前置通知
|
||||
proceed = pjp.proceed();
|
||||
// 以下为后置通知
|
||||
|
||||
//logInfo.append("响应数据:").append(proceed).append(";");
|
||||
|
||||
long e = System.currentTimeMillis();
|
||||
logInfo.append("响应耗时:").append(e - s).append("毫秒");
|
||||
log.info(logInfo.toString());
|
||||
} catch (Throwable throwable) {
|
||||
// 此处为异常通知
|
||||
long e = System.currentTimeMillis();
|
||||
logInfo.append("响应耗时:").append(e - s).append("毫秒");
|
||||
log.error(logInfo.toString());
|
||||
// 打印完日志后原样抛出,交给全局异常处理
|
||||
throw throwable;
|
||||
}
|
||||
return proceed;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户端IP
|
||||
*
|
||||
* @return 客户端IP
|
||||
*/
|
||||
public String getClientIp() {
|
||||
// 客户端IP地址
|
||||
String clientIp = LOCAL_IPV4;
|
||||
// 获取转发IP列表
|
||||
String xForwardFor = httpServletRequest.getHeader("X-Forwarded-For");
|
||||
if (xForwardFor != null) {
|
||||
// 转发IP列表不为空,循环列表找到真实IP
|
||||
String[] ips = xForwardFor.split(",");
|
||||
for (String ip : ips) {
|
||||
if (!LOCAL_IPV4.equals(ip) && !LOCAL_IPV6.equals(ip)) {
|
||||
clientIp = ip;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 转发IP列表为空,尝试获取Nginx记录的真实IP
|
||||
String xRealIp = httpServletRequest.getHeader("X-Real-IP");
|
||||
if (xRealIp != null) {
|
||||
// Nginx记录的真实IP不为空
|
||||
if (LOCAL_IPV6.equals(xRealIp)) {
|
||||
clientIp = xRealIp;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
Apache: Proxy-Client-IP
|
||||
WebLogic: WL-Proxy-Client-IP
|
||||
*/
|
||||
String remoteAddr = httpServletRequest.getRemoteAddr();
|
||||
if (LOCAL_IPV6.equals(remoteAddr)) {
|
||||
clientIp = remoteAddr;
|
||||
}
|
||||
}
|
||||
}
|
||||
return clientIp;
|
||||
}
|
||||
|
||||
}
|
118
linghe-cwet/linghe-cwet-api/src/main/java/cn/yskj/linghe/module/common/cache/GlobalRedisCache.java
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
package cn.yskj.linghe.module.common.cache;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Redis缓存工具
|
||||
*
|
||||
* @author hjp
|
||||
* @since 2024-07-10
|
||||
*/
|
||||
@Component
|
||||
public class GlobalRedisCache<T> {
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, T> redisTemplate;
|
||||
|
||||
/**
|
||||
* 获取Redis中存储的值
|
||||
*
|
||||
* @param key 键
|
||||
* @param defaultValue 默认值
|
||||
* @return 对应的值
|
||||
*/
|
||||
public T get(String key, T defaultValue) {
|
||||
T value = get(key);
|
||||
return value != null ? value : defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Redis中存储的值
|
||||
*
|
||||
* @param key 键
|
||||
* @return 对应的值
|
||||
*/
|
||||
public T get(String key) {
|
||||
return redisTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置键值对到Redis,默认不设置过期时间
|
||||
*
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
*/
|
||||
public void set(String key, T value) {
|
||||
redisTemplate.opsForValue().set(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置键值对到Redis,并设置过期时间
|
||||
*
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @param timeout 过期时间
|
||||
* @param unit 时间单位
|
||||
*/
|
||||
public void set(String key, T value, long timeout, TimeUnit unit) {
|
||||
redisTemplate.opsForValue().set(key, value, timeout, unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Redis中存储的值
|
||||
*
|
||||
* @param key 键
|
||||
* @return 是否成功删除
|
||||
*/
|
||||
public boolean delete(String key) {
|
||||
return Boolean.TRUE.equals(redisTemplate.delete(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定给定的键是否存在
|
||||
*
|
||||
* @param key 键
|
||||
* @return 是否存在
|
||||
*/
|
||||
public boolean hasKey(String key) {
|
||||
return Boolean.TRUE.equals(redisTemplate.hasKey(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模糊匹配键
|
||||
*
|
||||
* @param pattern 匹配键
|
||||
* @return 符合匹配键的Set
|
||||
*/
|
||||
public Set<String> keys(String pattern) {
|
||||
return redisTemplate.keys(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加计数器的值
|
||||
*
|
||||
* @param key 键
|
||||
* @param delta 增加的值
|
||||
* @return 增加后的值
|
||||
*/
|
||||
public Long increment(String key, long delta) {
|
||||
return redisTemplate.opsForValue().increment(key, delta);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定键的剩余时间
|
||||
*
|
||||
* @param key 键
|
||||
* @param unit 时间单位
|
||||
* @return 剩余时间
|
||||
*/
|
||||
public Long getExpire(String key, TimeUnit unit) {
|
||||
return redisTemplate.getExpire(key, unit);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
package cn.yskj.linghe.module.common.constant;
|
||||
|
||||
/**
|
||||
* 全局静态常量
|
||||
*
|
||||
* @author hjp
|
||||
* @since 2024-07-10
|
||||
*/
|
||||
public class GlobalConstant {
|
||||
|
||||
// 接口操作类型
|
||||
|
||||
/**
|
||||
* 制作
|
||||
*/
|
||||
public static final String CREATE = "制作";
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
public static final String UPSERT = "保存";
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public static final String INSERT = "添加";
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
public static final String UPDATE = "修改";
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public static final String DELETE = "删除";
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
public static final String SELECT = "查询";
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
public static final String IMPORT = "导入";
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
public static final String EXPORT = "导出";
|
||||
|
||||
/**
|
||||
* 分配
|
||||
*/
|
||||
public static final String ASSIGN = "分配";
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
public static final String SUBMIT = "提交";
|
||||
/**
|
||||
* 审核
|
||||
*/
|
||||
public static final String VERIFY = "审核";
|
||||
/**
|
||||
* 驳回
|
||||
*/
|
||||
public static final String REJECT = "驳回";
|
||||
|
||||
// 接口结果类型
|
||||
|
||||
/**
|
||||
* 操作成功
|
||||
*/
|
||||
public static final String SUCCESS = "成功";
|
||||
/**
|
||||
* 操作失败
|
||||
*/
|
||||
public static final String FAILURE = "失败";
|
||||
/**
|
||||
* 系统异常
|
||||
*/
|
||||
public static final String EXCEPTION = "异常";
|
||||
/**
|
||||
* 查询成功
|
||||
*/
|
||||
public static final String SELECT_OK = "查询成功";
|
||||
/**
|
||||
* 查询成功,但无数据
|
||||
*/
|
||||
public static final String SELECT_NO_DATA = "查询成功,但无数据";
|
||||
|
||||
// 状态码
|
||||
|
||||
/**
|
||||
* 默认
|
||||
*/
|
||||
public static final int CODE_100 = 100;
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
public static final int CODE_200 = 200;
|
||||
/**
|
||||
* 已创建
|
||||
*/
|
||||
public static final int CODE_201 = 201;
|
||||
/**
|
||||
* 已接受
|
||||
*/
|
||||
public static final int CODE_202 = 202;
|
||||
/**
|
||||
* 无内容
|
||||
*/
|
||||
public static final int CODE_204 = 204;
|
||||
/**
|
||||
* 错误请求
|
||||
*/
|
||||
public static final int CODE_400 = 400;
|
||||
/**
|
||||
* 未授权
|
||||
*/
|
||||
public static final int CODE_401 = 401;
|
||||
/**
|
||||
* 禁止访问
|
||||
*/
|
||||
public static final int CODE_403 = 403;
|
||||
/**
|
||||
* 未找到
|
||||
*/
|
||||
public static final int CODE_404 = 404;
|
||||
/**
|
||||
* 错误的请求方式
|
||||
*/
|
||||
public static final int CODE_405 = 405;
|
||||
/**
|
||||
* 请求超时
|
||||
*/
|
||||
public static final int CODE_408 = 408;
|
||||
/**
|
||||
* 已删除
|
||||
*/
|
||||
public static final int CODE_410 = 410;
|
||||
/**
|
||||
* 请求实体过大
|
||||
*/
|
||||
public static final int CODE_413 = 413;
|
||||
/**
|
||||
* 系统异常
|
||||
*/
|
||||
public static final int CODE_500 = 500;
|
||||
/**
|
||||
* 未实现
|
||||
*/
|
||||
public static final int CODE_501 = 501;
|
||||
/**
|
||||
* 错误网关
|
||||
*/
|
||||
public static final int CODE_502 = 502;
|
||||
/**
|
||||
* 被限流
|
||||
*/
|
||||
public static final int CODE_503 = 503;
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package cn.yskj.linghe.module.common.encrypt;
|
||||
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import cn.hutool.crypto.asymmetric.KeyType;
|
||||
import cn.hutool.crypto.asymmetric.RSA;
|
||||
import cn.hutool.crypto.symmetric.AES;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* AES、RSA 加密&解密
|
||||
*
|
||||
* @author hjp
|
||||
* @since 2024-07-10
|
||||
*/
|
||||
public class GlobalEncryptHelper {
|
||||
|
||||
/**
|
||||
* AES签名加密解密
|
||||
*/
|
||||
private static AES aes;
|
||||
|
||||
public static void init() {
|
||||
// 初始化AES
|
||||
aes = SecureUtil.aes("acdtr98lnsmvftrvoafg".getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
/**
|
||||
* RSA加密
|
||||
*
|
||||
* @param text 明文
|
||||
* @param keyType 秘钥类型
|
||||
* @return 密文
|
||||
*/
|
||||
public static String rsaEncoder(RSA rsa, String text, KeyType keyType) {
|
||||
return rsa.encryptBase64(text, CharsetUtil.CHARSET_UTF_8, keyType);
|
||||
}
|
||||
|
||||
/**
|
||||
* RSA解密
|
||||
*
|
||||
* @param text 密文
|
||||
* @param keyType 秘钥类型
|
||||
* @return 明文
|
||||
*/
|
||||
public static String rsaDecoder(RSA rsa, String text, KeyType keyType) {
|
||||
return rsa.decryptStr(text, keyType, CharsetUtil.CHARSET_UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* AES加密
|
||||
*
|
||||
* @param text 明文
|
||||
* @return 密文
|
||||
*/
|
||||
public static String aesEncoder(String text) {
|
||||
return aes.encryptBase64(text, CharsetUtil.CHARSET_UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* AES解密
|
||||
*
|
||||
* @param text 密文
|
||||
* @return 明文
|
||||
*/
|
||||
public static String aesDecoder(String text) {
|
||||
return aes.decryptStr(text, CharsetUtil.CHARSET_UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码处理:先RSA解密,后AES加密
|
||||
*
|
||||
* @param text RSA加密的文本
|
||||
* @return AES加密的文本
|
||||
*/
|
||||
public static String pwdRsaDeToAesEn(RSA rsa, String text) {
|
||||
text = GlobalEncryptHelper.rsaDecoder(rsa, text, KeyType.PrivateKey);
|
||||
return GlobalEncryptHelper.aesEncoder(text);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package cn.yskj.linghe.module.common.exception;
|
||||
|
||||
import cn.yskj.linghe.module.common.constant.GlobalConstant;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
|
||||
/**
|
||||
* 业务异常
|
||||
*
|
||||
* @author hjp
|
||||
* @since 2024-07-10
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class BusinessException extends RuntimeException {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2248538883755819627L;
|
||||
|
||||
/**
|
||||
* 获取异常的错误码
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误码、错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public BusinessException(int code, String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误码、错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public BusinessException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
this.code = GlobalConstant.CODE_500;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误码、错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public BusinessException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public BusinessException(String message) {
|
||||
super(message);
|
||||
this.code = GlobalConstant.CODE_500;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
package cn.yskj.linghe.module.common.exception;
|
||||
|
||||
import cn.yskj.linghe.module.common.constant.GlobalConstant;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 限流异常
|
||||
*
|
||||
* @author hjp
|
||||
* @since 2024-07-10
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LimitException extends RuntimeException {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2348539083755819627L;
|
||||
|
||||
/**
|
||||
* 获取异常的错误码
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误码、错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public LimitException(int code, String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误码、错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public LimitException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
this.code = GlobalConstant.CODE_503;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误码、错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public LimitException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数,根据错误消息和报错原因创建业务异常对象
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public LimitException(String message) {
|
||||
super(message);
|
||||
this.code = GlobalConstant.CODE_503;
|
||||
}
|
||||
}
|