mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-29 22:56:53 +08:00
Compare commits
59 Commits
v3.7.0_all
...
v3.6.2_spr
| Author | SHA1 | Date | |
|---|---|---|---|
| 4caff75cce | |||
| 811861a957 | |||
| 24623ba4b0 | |||
| 7c68b46943 | |||
| 7c34161369 | |||
| bc52aa918d | |||
| 9dfdd47b36 | |||
| 272a7540eb | |||
| ad796f079f | |||
| e7e7716d05 | |||
| c5d620d2b2 | |||
| cdea05ebb0 | |||
| ca9a433f3c | |||
| 2be6052cd4 | |||
| 68ed67ee49 | |||
| d5903ba52a | |||
| 3ee635eddf | |||
| 21bc68fb53 | |||
| f532e57862 | |||
| da08adbea1 | |||
| 46e3e62b59 | |||
| 3656264f8a | |||
| 3361d48cd4 | |||
| ed86ea3da1 | |||
| 3deb0e5487 | |||
| 9e4792941e | |||
| b5fd5fe782 | |||
| 33c0104a02 | |||
| 81ed5100af | |||
| 87f9dc0064 | |||
| b311fedc6b | |||
| e321a0405f | |||
| d8bc74794d | |||
| 732f05dc74 | |||
| 6ce92798c6 | |||
| f4454e9348 | |||
| d9134ae0c8 | |||
| 25180e41c8 | |||
| a99e3f2268 | |||
| d27c354bf1 | |||
| d818b1dd9d | |||
| bcdbec0091 | |||
| 098bb12b9e | |||
| 4a6c750b19 | |||
| d396e5304a | |||
| 9bed25be8c | |||
| 7109b42092 | |||
| 1667b14194 | |||
| e9514873d2 | |||
| 0ee090664e | |||
| 4a9eda4ab0 | |||
| 2416c8b251 | |||
| 5b056f9dd6 | |||
| a93998dc56 | |||
| 268c27a782 | |||
| 23ace2712a | |||
| 157feeb925 | |||
| 4e25d4162f | |||
| 47a68f31e1 |
18
.github/ISSUE_TEMPLATE.md
vendored
18
.github/ISSUE_TEMPLATE.md
vendored
@ -1,13 +1,21 @@
|
|||||||
##### 版本号:
|
##### 版本号:
|
||||||
|
|
||||||
|
|
||||||
|
##### 前端版本:vue3版?还是 vue2版?
|
||||||
|
|
||||||
|
|
||||||
##### 问题描述:
|
##### 问题描述:
|
||||||
|
|
||||||
##### 错误截图:
|
|
||||||
|
##### 截图&代码:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 友情提示:
|
#### 友情提示(为了提高issue处理效率):
|
||||||
- 未按格式要求发帖、描述过于简抽象的,会被直接删掉;
|
- 未按格式要求发帖,会被直接删掉;
|
||||||
- 请确保问题描述清楚,方便我们理解并一次性调查解决问题;
|
- 描述过于简单或模糊,导致无法处理的,会被直接删掉;
|
||||||
- 如果使用的不是master,请说明你使用的那个分支
|
- 请自己初判问题描述是否清楚,是否方便我们调查处理;
|
||||||
|
- 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,4 +12,3 @@ rebel.xml
|
|||||||
os_del.cmd
|
os_del.cmd
|
||||||
os_del_doc.cmd
|
os_del_doc.cmd
|
||||||
.svn
|
.svn
|
||||||
derby.log
|
|
||||||
|
|||||||
45
README-EN.md
45
README-EN.md
@ -7,13 +7,13 @@
|
|||||||
JEECG BOOT Low Code Development Platform
|
JEECG BOOT Low Code Development Platform
|
||||||
===============
|
===============
|
||||||
|
|
||||||
当前最新版本: 3.7.0(发布日期:2024-06-17)
|
当前最新版本: 3.6.2(发布日期:2024-01-08)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||||
[](http://www.jeecg.com)
|
[](http://www.jeecg.com)
|
||||||
[](https://jeecg.blog.csdn.net)
|
[](https://jeecg.blog.csdn.net)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
|
|
||||||
@ -37,11 +37,19 @@ JEECG Business process: Using workflow to implement and extend the task interfac
|
|||||||
Technical support
|
Technical support
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
Problems or bugs in use can be found in [Making on the Issues](https://github.com/jeecgboot/JeecgBoot/issues/new)
|
Problems or bugs in use can be found in [Making on the Issues](https://github.com/jeecgboot/jeecg-boot/issues/new)
|
||||||
|
|
||||||
Official Support: http://jeecg.com/doc/help
|
Official Support: http://jeecg.com/doc/help
|
||||||
|
|
||||||
|
|
||||||
|
Download the source code
|
||||||
|
-----------------------------------
|
||||||
|
项目源码
|
||||||
|
-----------------------------------
|
||||||
|
| Source |Front-end source (Vue3 version) | The background source |
|
||||||
|
|-|-|-|
|
||||||
|
| Github | [jeecgboot-vue3](https://github.com/jeecgboot/jeecgboot-vue3) | [jeecg-boot](https://github.com/jeecgboot/jeecg-boot) |
|
||||||
|
| Gitee | [jeecgboot-vue3](https://gitee.com/jeecg/jeecgboot-vue3) | [jeecg-boot](https://gitee.com/jeecg/jeecg-boot) |
|
||||||
|
|
||||||
##### Project description
|
##### Project description
|
||||||
|
|
||||||
@ -50,14 +58,11 @@ Official Support: http://jeecg.com/doc/help
|
|||||||
| `jeecg-boot` | SpringBoot background source code (support microservices) |
|
| `jeecg-boot` | SpringBoot background source code (support microservices) |
|
||||||
| `jeecgboot-vue3` | Vue3+TS new front-end source code|
|
| `jeecgboot-vue3` | Vue3+TS new front-end source code|
|
||||||
| `jeecg-uniapp` | [APP development framework, a code multi terminal adaptation, and support APP, small program, H5](https://github.com/jeecgboot/jeecg-uniapp) |
|
| `jeecg-uniapp` | [APP development framework, a code multi terminal adaptation, and support APP, small program, H5](https://github.com/jeecgboot/jeecg-uniapp) |
|
||||||
|
| `SpringBoot3+JDK17` | [BranchSourceCode](https://github.com/jeecgboot/jeecg-boot/tree/springboot3) [UpgradeBlog](https://blog.csdn.net/zhangdaiscott/article/details/134805602) |
|
||||||
|
| `More` | [Download more source code](http://jeecg.com/download) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Download other source code
|
|
||||||
-----------------------------------
|
|
||||||
- APP SourceCode:https://github.com/jeecgboot/jeecg-uniapp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For the project
|
For the project
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@ -69,9 +74,9 @@ Docker starts the project
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- [Docker starts the monomer background](https://help.jeecg.com/java/setup/docker/up.html)
|
- [Docker starts the monomer background](https://help.jeecg.com/java/setup/docker/up.html)
|
||||||
- [Docker starts the front-end](http://help.jeecg.com/publish/docker.html)
|
- [Docker starts the Vue3 front-end](http://help.jeecg.com/publish/docker.html)
|
||||||
- [Docker starts the micro-service background](https://help.jeecg.com/java/springcloud/docker.html)
|
- [Docker starts the micro-service background](https://help.jeecg.com/java/springcloud/docker.html)
|
||||||
- [ChatGPT AI Config](https://help.jeecg.com/java/chatgpt.html)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -82,11 +87,18 @@ Technical documentation
|
|||||||
- Doc: [http://help.jeecg.com](http://help.jeecg.com)
|
- Doc: [http://help.jeecg.com](http://help.jeecg.com)
|
||||||
- Newbie guide: [Quick start](http://www.jeecg.com/doc/quickstart) | [video](https://space.bilibili.com/454617261/channel/series) | [Q&A ](http://www.jeecg.com/doc/qa) | [help](http://jeecg.com/doc/help) | [1 minute experience](https://my.oschina.net/jeecg/blog/3083313)
|
- Newbie guide: [Quick start](http://www.jeecg.com/doc/quickstart) | [video](https://space.bilibili.com/454617261/channel/series) | [Q&A ](http://www.jeecg.com/doc/qa) | [help](http://jeecg.com/doc/help) | [1 minute experience](https://my.oschina.net/jeecg/blog/3083313)
|
||||||
- Microservice Development: [Monomer upgrade to microservice](https://help.jeecg.com/java/springcloud/switchcloud/monomer.html)
|
- Microservice Development: [Monomer upgrade to microservice](https://help.jeecg.com/java/springcloud/switchcloud/monomer.html)
|
||||||
- QQ group : ⑨808791225、⑧825232878、⑦791696430、⑥730954414(full)、683903138(full)、⑤860162132(full)、④774126647(full)、③816531124(full)、②769925425(full)、①284271917(full)
|
- QQ group : ⑧825232878、⑦791696430、⑥730954414(full)、683903138(full)、⑤860162132(full)、④774126647(full)、③816531124(full)、②769925425(full)、①284271917(full)
|
||||||
- Demo : [OnlineDemo](http://boot3.jeecg.com) | [APP](http://jeecg.com/appIndex)
|
- Demo : [Vue3](http://boot3.jeecg.com) | [Vue2](http://boot.jeecg.com) | [APP](http://jeecg.com/appIndex)
|
||||||
> [please click obtain account password to obtain](http://jeecg.com/doc/demo)
|
> [please click obtain account password to obtain](http://jeecg.com/doc/demo)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Thinking
|
||||||
|
-----------------------------------
|
||||||
|
> We are pursuing the goal of implementing complex business systems without writing code! That has been done so far
|
||||||
|
- https://www.qiaoqiaoyun.com
|
||||||
|
|
||||||
|
|
||||||
Star charts
|
Star charts
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
@ -149,7 +161,7 @@ Why JeecgBoot?
|
|||||||
* Support SAAS service model and provide SaaS multi-tenant architecture solution.
|
* Support SAAS service model and provide SaaS multi-tenant architecture solution.
|
||||||
* Distributed file service, integration of minio, Ali OSS and other excellent third parties, to provide convenient file upload and management, but also support local storage.
|
* Distributed file service, integration of minio, Ali OSS and other excellent third parties, to provide convenient file upload and management, but also support local storage.
|
||||||
* Mainstream database compatibility, a set of code is fully compatible with Mysql, Postgresql, Oracle, Sqlserver, MariaDB, dream and other mainstream databases.
|
* Mainstream database compatibility, a set of code is fully compatible with Mysql, Postgresql, Oracle, Sqlserver, MariaDB, dream and other mainstream databases.
|
||||||
* Integrate workflow flowable and realize only the configuration of flow direction in the page, which can greatly simplify the development of bpm workflow; Using bpm's process designer to draw the flow direction, a workflow is basically complete with a small amount of java code;
|
* Integrate workflow activiti and realize only the configuration of flow direction in the page, which can greatly simplify the development of bpm workflow; Using bpm's process designer to draw the flow direction, a workflow is basically complete with a small amount of java code;
|
||||||
* Low code ability: online process design, using open source Activiti process engine, to achieve online drawing process, custom form, form attachment, business flow
|
* Low code ability: online process design, using open source Activiti process engine, to achieve online drawing process, custom form, form attachment, business flow
|
||||||
* Multi-data source: its simple way of use, online configuration of data source configuration, convenient to grab data from other data;
|
* Multi-data source: its simple way of use, online configuration of data source configuration, convenient to grab data from other data;
|
||||||
* Provide single sign-on CAS integration solution, and complete docking code has been provided in the project
|
* Provide single sign-on CAS integration solution, and complete docking code has been provided in the project
|
||||||
@ -216,7 +228,8 @@ Technical Architecture:
|
|||||||
|
|
||||||
#### The front end
|
#### The front end
|
||||||
|
|
||||||
- TechnologyStack:`Vue3.0+TypeScript+Vite+AntDesignVue+pinia+echarts`
|
- Vue2 version:`Vue2.6+@vue/cli+AntDesignVue+Viser-vue+Vuex` [detail](https://github.com/jeecgboot/ant-design-vue-jeecg)
|
||||||
|
- Vue3 version:`Vue3.0+TypeScript+Vite+AntDesignVue+pinia+echarts` [detail](https://github.com/jeecgboot/jeecgboot-vue3)
|
||||||
|
|
||||||
#### Support library
|
#### Support library
|
||||||
|
|
||||||
@ -428,10 +441,6 @@ Technical Architecture:
|
|||||||
|
|
||||||
### Effect of system
|
### Effect of system
|
||||||
|
|
||||||
##### ChatGPT AI Dialog
|
|
||||||
> Go to the JeecgBoot background home page and click "AI Assistant" in the middle of the right side of the home page. The AI Assistant dialog screen is displayed.
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
##### PC
|
##### PC
|
||||||

|

|
||||||
|
|||||||
344
README.md
344
README.md
@ -1,14 +1,19 @@
|
|||||||
|
|
||||||
JeecgBoot 低代码开发平台
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JEECG BOOT 低代码开发平台
|
||||||
===============
|
===============
|
||||||
|
|
||||||
当前最新版本: 3.7.0(发布日期:2024-06-17)
|
当前最新版本: 3.6.2(发布日期:2024-01-08)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||||
[](http://jeecg.com/aboutusIndex)
|
[](http://jeecg.com/aboutusIndex)
|
||||||
[](https://jeecg.blog.csdn.net)
|
[](https://jeecg.blog.csdn.net)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||||
|
|
||||||
@ -19,76 +24,155 @@ JeecgBoot 低代码开发平台
|
|||||||
|
|
||||||
<h3 align="center">Java Low Code Platform for Enterprise web applications</h3>
|
<h3 align="center">Java Low Code Platform for Enterprise web applications</h3>
|
||||||
|
|
||||||
JeecgBoot 是一款基于代码生成器的`低代码开发平台`!前后端分离架构 SpringBoot2.x和3.x,SpringCloud,Ant Design&Vue,Mybatis-plus,Shiro,JWT,支持微服务。强大的代码生成器让前后端代码一键生成,实现低代码开发! JeecgBoot 引领新的低代码开发模式(OnlineCoding-> 代码生成器-> 手工MERGE), 帮助解决Java项目70%的重复工作,让开发更多关注业务。既能快速提高效率,节省研发成本,同时又不失灵活性!
|
JeecgBoot 是一款基于代码生成器的`低代码开发平台`!前后端分离架构 SpringBoot2.x,SpringCloud,Ant Design&Vue,Mybatis-plus,Shiro,JWT,支持微服务。强大的代码生成器让前后端代码一键生成,实现低代码开发! JeecgBoot 引领新的低代码开发模式(OnlineCoding-> 代码生成器-> 手工MERGE), 帮助解决Java项目70%的重复工作,让开发更多关注业务。既能快速提高效率,节省研发成本,同时又不失灵活性!
|
||||||
|
|
||||||
JeecgBoot 提供了一系列`低代码模块`,实现在线开发`真正的零代码`:Online表单开发、Online报表、报表配置能力、在线图表设计、仪表盘设计、大屏设计、移动配置能力、表单设计器、在线设计流程、流程自动化配置、插件能力(可插拔)等等!
|
JeecgBoot 提供了一系列`低代码模块`,实现在线开发`真正的零代码`:Online表单开发、Online报表、报表配置能力、在线图表设计、大屏设计、移动配置能力、表单设计器、在线设计流程、流程自动化配置、插件能力(可插拔)等等!
|
||||||
|
|
||||||
|
|
||||||
`JEECG宗旨是:` 简单功能由OnlineCoding配置实现,做到`零代码开发`;复杂功能由代码生成器生成进行手工Merge 实现`低代码开发`,既保证了`智能`又兼顾`灵活`;实现了低代码开发的同时又支持灵活编码,解决了当前低代码产品普遍不灵活的弊端!
|
`JEECG宗旨是:` 简单功能由OnlineCoding配置实现,做到`零代码开发`;复杂功能由代码生成器生成进行手工Merge 实现`低代码开发`,既保证了`智能`又兼顾`灵活`;实现了低代码开发的同时又支持灵活编码,解决了当前低代码产品普遍不灵活的弊端!
|
||||||
|
|
||||||
`JEECG业务流程:` 采用工作流来实现、扩展出任务接口,供开发编写业务逻辑,表单提供多种解决方案: 表单设计器、online配置表单、编码表单。同时实现了流程与表单的分离设计(松耦合)、并支持任务节点灵活配置,既保证了公司流程的保密性,又减少了开发人员的工作量。
|
`JEECG业务流程:` 采用工作流来实现、扩展出任务接口,供开发编写业务逻辑,表单提供多种解决方案: 表单设计器、online配置表单、编码表单。同时实现了流程与表单的分离设计(松耦合)、并支持任务节点灵活配置,既保证了公司流程的保密性,又减少了开发人员的工作量。
|
||||||
|
|
||||||
|
遇到技术问题,[请在这里反馈BUG](https://github.com/jeecgboot/jeecg-boot/issues/new)
|
||||||
|
|
||||||
适用项目
|
适用项目
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Jeecg-Boot低代码开发平台,可以应用在任何J2EE项目的开发中,支持信创国产化(默认适配达梦和人大金仓)。尤其适合SAAS项目、企业信息管理系统(MIS)、内部办公系统(OA)、企业资源计划系统(ERP)、客户关系管理系统(CRM)等,其半智能手工Merge的开发方式,可以显著提高开发效率70%以上,极大降低开发成本。
|
Jeecg-Boot低代码开发平台,可以应用在任何J2EE项目的开发中,尤其适合SAAS项目、企业信息管理系统(MIS)、内部办公系统(OA)、企业资源计划系统(ERP)、客户关系管理系统(CRM)等,其半智能手工Merge的开发方式,可以显著提高开发效率70%以上,极大降低开发成本。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
项目源码
|
||||||
|
-----------------------------------
|
||||||
|
| 仓库 |前端源码 Vue3版 | 后端JAVA源码 |
|
||||||
|
|-|-|-|
|
||||||
|
| Github | [jeecgboot-vue3](https://github.com/jeecgboot/jeecgboot-vue3) | [jeecg-boot](https://github.com/jeecgboot/jeecg-boot) |
|
||||||
|
| 码云 | [jeecgboot-vue3](https://gitee.com/jeecg/jeecgboot-vue3) | [jeecg-boot](https://gitee.com/jeecg/jeecg-boot) |
|
||||||
|
|
||||||
|
> 官方已推出 `SpringBoot3+JDK17版本` [分支源码下载](https://github.com/jeecgboot/jeecg-boot/tree/springboot3) | [升级SpringBoot3博客](https://blog.csdn.net/zhangdaiscott/article/details/134805602)
|
||||||
|
|
||||||
#### 项目说明
|
#### 项目说明
|
||||||
|
|
||||||
| 项目名 | 说明 |
|
| 项目名 | 说明 |
|
||||||
|--------------------|------------------------|
|
|--------------------|------------------------|
|
||||||
| `jeecg-boot` | 后端源码JAVA(SpringBoot微服务架构) |
|
| `jeecgboot-vue3` | 前端源码 (Vue3版本) |
|
||||||
| `jeecgboot-vue3` | 前端源码VUE3(vue3+vite5+ts最新技术栈) |
|
| `jeecg-boot` | 后端JAVA源码(支持微服务) |
|
||||||
| `jeecg-uniapp` | APP框架,一份代码多终端适配,支持APP、小程序、H5 |
|
| `jeecg-uniapp` | [APP开发框架,一份代码多终端适配,同时支持APP、小程序、H5](https://github.com/jeecgboot/jeecg-uniapp) |
|
||||||
|
| `更多开源项目` | [更多底层源码下载](http://jeecg.com/download) |
|
||||||
|
|
||||||
|
|
||||||
其他源码
|
|
||||||
-----------------------------------
|
|
||||||
- APP源码地址:https://github.com/jeecgboot/jeecg-uniapp
|
|
||||||
|
|
||||||
|
快速搭建开发环境
|
||||||
技术支持
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
关闭gitee的issue通道,使用中遇到问题或者BUG可以在 [Github上提Issues](https://github.com/jeecgboot/JeecgBoot/issues/new)
|
- [通过IDEA导入项目](https://help.jeecg.com/java/setup/idea.html)
|
||||||
|
|
||||||
|
|
||||||
快速启动项目
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
- [前端项目快速启动](http://help.jeecg.com/setup/startup.html)
|
|
||||||
- [通过IDEA启动前后端项目](https://help.jeecg.com/java/setup/idea/startup.html)
|
- [通过IDEA启动前后端项目](https://help.jeecg.com/java/setup/idea/startup.html)
|
||||||
|
- [Vue3前端项目快速启动](http://help.jeecg.com/setup/startup.html)
|
||||||
|
- [单体快速切换为微服务版](https://help.jeecg.com/java/springcloud/switchcloud/monomer.html)
|
||||||
|
|
||||||
|
|
||||||
|
Docker快速启动项目
|
||||||
Docker启动项目
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- [Docker启动前端](http://help.jeecg.com/publish/docker.html)
|
- [Docker启动单体后台](https://help.jeecg.com/java/setup/docker/up.html)
|
||||||
- [Docker启动后台](https://help.jeecg.com/java/setup/docker/up.html)
|
- [Docker启动Vue3前端](http://help.jeecg.com/publish/docker.html)
|
||||||
|
|
||||||
|
|
||||||
微服务方式启动
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
- [单体快速切换微服务](https://help.jeecg.com/java/springcloud/switchcloud/monomer.html)
|
|
||||||
- [Docker启动微服务后台](https://help.jeecg.com/java/springcloud/docker.html)
|
- [Docker启动微服务后台](https://help.jeecg.com/java/springcloud/docker.html)
|
||||||
|
|
||||||
|
|
||||||
技术文档
|
技术文档
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- 产品官网: [http://www.jeecg.com](http://www.jeecg.com)
|
- 项目官网: [http://www.jeecg.com](http://www.jeecg.com)
|
||||||
- 开发文档: [https://help.jeecg.com](https://help.jeecg.com)
|
- 开发文档: [https://help.jeecg.com](https://help.jeecg.com)
|
||||||
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [常见问题 ](http://www.jeecg.com/doc/qa) | [视频教程](https://space.bilibili.com/454617261/channel/series) | [1分钟低代码体验](https://my.oschina.net/jeecg/blog/3083313)
|
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [常见问题 ](http://www.jeecg.com/doc/qa) | [视频教程](https://space.bilibili.com/454617261/channel/series) | [1分钟低代码体验](https://my.oschina.net/jeecg/blog/3083313)
|
||||||
- AI助手配置: https://help.jeecg.com/java/chatgpt.html
|
|
||||||
|
|
||||||
- 在线演示 : [在线演示](http://boot3.jeecg.com) | [APP演示](http://jeecg.com/appIndex)
|
- 在线演示 : [Vue3演示](http://boot3.jeecg.com) | [APP演示](http://jeecg.com/appIndex) | [敲敲云零代码](https://qiaoqiaoyun.com)
|
||||||
> 演示系统的登录账号密码,请点击 [获取账号密码](http://jeecg.com/doc/demo) 获取
|
> 演示系统的登录账号密码,请点击 [获取账号密码](http://jeecg.com/doc/demo) 获取
|
||||||
>
|
>
|
||||||
- QQ交流群 : ⑨808791225、⑧825232878、⑦791696430(满)、⑥730954414(满)、683903138(满)、⑤860162132(满)、④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)
|
- QQ交流群 : ⑧825232878、⑦791696430(满)、⑥730954414(满)、683903138(满)、⑤860162132(满)、④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)
|
||||||
|
> ` 提醒:【QQ群是自助服务群,建议给帮助您解决问题的同学发送指定红包,表示感谢!】 `
|
||||||
|
|
||||||
|
|
||||||
|
大龄码农的思考
|
||||||
|
-----------------------------------
|
||||||
|
> 作为码农年纪大了写不动代码了怎么办??哎!!
|
||||||
|
所以我们团队在追求不写代码也可实现复杂业务系统!目前已经做到了,不信你到敲敲云零代码试试(通过流程串联修改业务数据)
|
||||||
|
|
||||||
|
- https://www.qiaoqiaoyun.com
|
||||||
|
|
||||||
|
|
||||||
|
技术支持
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
关闭gitee的issue通道,使用中遇到问题或者BUG可以在 [Github上提Issues](https://github.com/jeecgboot/jeecg-boot/issues/new)
|
||||||
|
|
||||||
|
官方支持: [http://jeecg.com/doc/help](http://jeecg.com/doc/help)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
VUE2版本专题介绍
|
||||||
|
-----------------------------------
|
||||||
|
#### 项目介绍
|
||||||
|
- 项目名称:ant-design-vue-jeecg
|
||||||
|
- 说明:JeecgBoot前端提供两套解决方案,一套VUE2和一套VUE3版本,目前vue2版本最新代码只支持到jeecgboot 3.4.3版本,一定注意。
|
||||||
|
|
||||||
|
#### 源码下载
|
||||||
|
| 源码 | 源码地址 |
|
||||||
|
|--------------------|------------------------|
|
||||||
|
| 后端JAVA源码 `Vue2版` |https://gitee.com/jeecg/jeecg-boot/tree/v3.4.3last |
|
||||||
|
| 前端vue2源码 `Vue2版` |https://gitee.com/jeecg/ant-design-vue-jeecg |
|
||||||
|
|
||||||
|
#### Vue2与Vue3版本区别
|
||||||
|
> - VUE3版本彻底抛弃IE兼容,不兼容IE和低版本浏览器,只适配高版本谷歌和Edge
|
||||||
|
(政府、事业类单位项目需要谨慎选择——国产化迁移是一个漫长的过程,万一过程中要求IE兼容,这个不可逆)
|
||||||
|
> - 所以如果对浏览器有要求的项目,请选择VUE2版本。
|
||||||
|
> - VUE3版是全新的技术栈,紧跟主流(前端重写),各个功能都做了优化,拥有更好的体验效果
|
||||||
|
|
||||||
|
#### 技术文档
|
||||||
|
- 在线演示:[Vue2版演示](http://boot.jeecg.com)
|
||||||
|
- 开发文档:| [开发文档](http://doc.jeecg.com) | [Vue2前端快速启动](http://doc.jeecg.com/2678320) | [Vue2前端采用Docker启动](http://doc.jeecg.com/3043612)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Star走势图
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
[](https://star-history.com/#jeecgboot/jeecg-boot)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
后台目录结构
|
||||||
|
-----------------------------------
|
||||||
|
```
|
||||||
|
项目结构
|
||||||
|
├─jeecg-boot-parent(父POM: 项目依赖、modules组织)
|
||||||
|
│ ├─jeecg-boot-base-core(共通模块: 工具类、config、权限、查询过滤器、注解等)
|
||||||
|
│ ├─jeecg-module-demo 示例代码
|
||||||
|
│ ├─jeecg-module-system System系统管理目录
|
||||||
|
│ │ ├─jeecg-system-biz System系统管理权限等功能
|
||||||
|
│ │ ├─jeecg-system-start System单体启动项目(8080)
|
||||||
|
│ │ ├─jeecg-system-api System系统管理模块对外api
|
||||||
|
│ │ │ ├─jeecg-system-cloud-api System模块对外提供的微服务接口
|
||||||
|
│ │ │ ├─jeecg-system-local-api System模块对外提供的单体接口
|
||||||
|
│ ├─jeecg-server-cloud --微服务模块
|
||||||
|
├─jeecg-cloud-gateway --微服务网关模块(9999)
|
||||||
|
├─jeecg-cloud-nacos --Nacos服务模块(8848)
|
||||||
|
├─jeecg-system-cloud-start --System微服务启动项目(7001)
|
||||||
|
├─jeecg-demo-cloud-start --Demo微服务启动项目(7002)
|
||||||
|
├─jeecg-visual
|
||||||
|
├─jeecg-cloud-monitor --微服务监控模块 (9111)
|
||||||
|
├─jeecg-cloud-xxljob --微服务xxljob定时任务服务端 (9080)
|
||||||
|
├─jeecg-cloud-sentinel --sentinel服务端 (9000)
|
||||||
|
├─jeecg-cloud-test -- 微服务测试示例(各种例子)
|
||||||
|
├─jeecg-cloud-test-more -- 微服务测试示例(feign、熔断降级、xxljob、分布式锁)
|
||||||
|
├─jeecg-cloud-test-rabbitmq -- 微服务测试示例(rabbitmq)
|
||||||
|
├─jeecg-cloud-test-seata -- 微服务测试示例(seata分布式事务)
|
||||||
|
├─jeecg-cloud-test-shardingsphere -- 微服务测试示例(分库分表)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
为什么选择JeecgBoot?
|
为什么选择JeecgBoot?
|
||||||
@ -112,8 +196,8 @@ Docker启动项目
|
|||||||
* 17.支持SAAS服务模式,提供SaaS多租户架构方案。
|
* 17.支持SAAS服务模式,提供SaaS多租户架构方案。
|
||||||
* 18.分布式文件服务,集成minio、阿里OSS等优秀的第三方,提供便捷的文件上传与管理,同时也支持本地存储。
|
* 18.分布式文件服务,集成minio、阿里OSS等优秀的第三方,提供便捷的文件上传与管理,同时也支持本地存储。
|
||||||
* 19.主流数据库兼容,一套代码完全兼容Mysql、Postgresql、Oracle、Sqlserver、MariaDB、达梦等主流数据库。
|
* 19.主流数据库兼容,一套代码完全兼容Mysql、Postgresql、Oracle、Sqlserver、MariaDB、达梦等主流数据库。
|
||||||
* 20.集成工作流flowable,并实现了只需在页面配置流程转向,可极大的简化bpm工作流的开发;用bpm的流程设计器画出了流程走向,一个工作流基本就完成了,只需写很少量的java代码;
|
* 20.集成工作流activiti、flowable,并实现了只需在页面配置流程转向,可极大的简化bpm工作流的开发;用bpm的流程设计器画出了流程走向,一个工作流基本就完成了,只需写很少量的java代码;
|
||||||
* 21.低代码能力:在线流程设计,采用开源flowable流程引擎,实现在线画流程,自定义表单,表单挂靠,业务流转
|
* 21.低代码能力:在线流程设计,采用开源Activiti流程引擎,实现在线画流程,自定义表单,表单挂靠,业务流转
|
||||||
* 22.多数据源:及其简易的使用方式,在线配置数据源配置,便捷的从其他数据抓取数据;
|
* 22.多数据源:及其简易的使用方式,在线配置数据源配置,便捷的从其他数据抓取数据;
|
||||||
* 23.提供单点登录CAS集成方案,项目中已经提供完善的对接代码
|
* 23.提供单点登录CAS集成方案,项目中已经提供完善的对接代码
|
||||||
* 24.低代码能力:表单设计器,支持用户自定义表单布局,支持单表,一对多表单、支持select、radio、checkbox、textarea、date、popup、列表、宏等控件
|
* 24.低代码能力:表单设计器,支持用户自定义表单布局,支持单表,一对多表单、支持select、radio、checkbox、textarea、date、popup、列表、宏等控件
|
||||||
@ -152,7 +236,7 @@ Docker启动项目
|
|||||||
|
|
||||||
- 缓存:Redis
|
- 缓存:Redis
|
||||||
|
|
||||||
- 数据库脚本:MySQL5.7+ (其他数据库,[需要自己转](https://my.oschina.net/jeecg/blog/4905722))
|
- 数据库脚本:MySQL5.7+ & Oracle 11g & Sqlserver2017(其他数据库,[需要自己转](https://my.oschina.net/jeecg/blog/4905722))
|
||||||
|
|
||||||
|
|
||||||
#### 后端
|
#### 后端
|
||||||
@ -178,7 +262,8 @@ Docker启动项目
|
|||||||
|
|
||||||
#### 前端
|
#### 前端
|
||||||
|
|
||||||
- 技术栈:`Vue3.0 + TypeScript + Vite5 + ant-design-vue4 + pinia + echarts + unocss + vxe-table + qiankun + es6` 等最新技术栈
|
- Vue2版本:`Vue2.6+@vue/cli+AntDesignVue+Viser-vue+Vuex等` [详细查看](https://github.com/jeecgboot/ant-design-vue-jeecg)
|
||||||
|
- Vue3版本:`Vue3.0+TypeScript+Vite+AntDesignVue+pinia+echarts等新方案` [详细查看](https://github.com/jeecgboot/jeecgboot-vue3)
|
||||||
|
|
||||||
#### 支持库
|
#### 支持库
|
||||||
|
|
||||||
@ -240,18 +325,6 @@ Docker启动项目
|
|||||||
|
|
||||||
### 功能模块
|
### 功能模块
|
||||||
```
|
```
|
||||||
├─Online在线开发(低代码)
|
|
||||||
│ ├─Online在线表单
|
|
||||||
│ ├─Online代码生成器
|
|
||||||
│ ├─Online在线报表
|
|
||||||
│ ├─仪表盘设计器
|
|
||||||
│ ├─AI助手
|
|
||||||
│ ├─系统编码规则
|
|
||||||
│ ├─系统校验规则
|
|
||||||
├─积木报表设计器
|
|
||||||
│ ├─打印设计器
|
|
||||||
│ ├─数据报表设计
|
|
||||||
│ ├─图形报表设计(支持echart)
|
|
||||||
├─系统管理
|
├─系统管理
|
||||||
│ ├─用户管理
|
│ ├─用户管理
|
||||||
│ ├─角色管理
|
│ ├─角色管理
|
||||||
@ -265,8 +338,7 @@ Docker启动项目
|
|||||||
│ └─系统公告
|
│ └─系统公告
|
||||||
│ └─职务管理
|
│ └─职务管理
|
||||||
│ └─通讯录
|
│ └─通讯录
|
||||||
│ ├─多数据源管理
|
│ └─多租户管理
|
||||||
│ └─多租户管理(租户管理、租户角色、我的租户)
|
|
||||||
├─消息中心
|
├─消息中心
|
||||||
│ ├─消息管理
|
│ ├─消息管理
|
||||||
│ ├─模板管理
|
│ ├─模板管理
|
||||||
@ -355,13 +427,28 @@ Docker启动项目
|
|||||||
│ └─异常页面
|
│ └─异常页面
|
||||||
│ └─个人页面
|
│ └─个人页面
|
||||||
├─高级功能
|
├─高级功能
|
||||||
|
│ ├─系统编码规则
|
||||||
│ ├─提供单点登录CAS集成方案
|
│ ├─提供单点登录CAS集成方案
|
||||||
│ ├─提供APP发布方案
|
│ ├─提供APP发布方案
|
||||||
│ ├─集成Websocket消息通知机制
|
│ ├─集成Websocket消息通知机制
|
||||||
│─更多商业功能
|
├─Online在线开发(低代码)
|
||||||
|
│ ├─Online在线表单 - 功能已开放
|
||||||
|
│ ├─Online代码生成器 - 功能已开放
|
||||||
|
│ ├─Online在线报表 - 功能已开放
|
||||||
|
│ ├─Online在线图表(未开源)
|
||||||
|
│ ├─Online图表模板配置(未开源)
|
||||||
|
│ ├─Online布局设计(未开源)
|
||||||
|
│ ├─多数据源管理 - 功能已开放
|
||||||
|
├─积木报表设计器(低代码)
|
||||||
|
│ ├─打印设计器
|
||||||
|
│ ├─数据报表设计
|
||||||
|
│ ├─图形报表设计(支持echart)
|
||||||
|
│ ├─大屏设计器(未开源)
|
||||||
|
│─更多商业功能 (未开源)
|
||||||
│ ├─流程设计器
|
│ ├─流程设计器
|
||||||
│ ├─表单设计器
|
│ ├─表单设计器
|
||||||
│ ├─大屏设计器
|
├─大屏设计器
|
||||||
|
├─门户设计/仪表盘设计器
|
||||||
│ └─我的任务
|
│ └─我的任务
|
||||||
│ └─历史流程
|
│ └─历史流程
|
||||||
│ └─历史流程
|
│ └─历史流程
|
||||||
@ -371,47 +458,26 @@ Docker启动项目
|
|||||||
│ └─我发起的流程
|
│ └─我发起的流程
|
||||||
│ └─我的抄送
|
│ └─我的抄送
|
||||||
│ └─流程委派、抄送、跳转
|
│ └─流程委派、抄送、跳转
|
||||||
│ └─OA办公组件
|
|
||||||
│ └─。。。
|
│ └─。。。
|
||||||
|
│─OA办公组件 (未开源)
|
||||||
|
│ ├─更多功能
|
||||||
|
│ └─。。。
|
||||||
|
└─其他模块
|
||||||
|
└─更多功能开发中。。
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 流程引擎推荐
|
||||||
|
|
||||||
|
JeecgBoot企业版本默认集成了activiti和flowable两套方案,大家在使用本开源项目时,如果想进一步集成流程引擎,推荐结合贺波老师的书 [《深入Activiti流程引擎:核心原理与高阶实战》](https://item.m.jd.com/product/13928958.html?gx=RnAomTM2bmCImZxDqYAkVCoIHuIYVqc)
|
||||||
|
|
||||||
后台目录结构
|
<img src="https://jeecgos.oss-cn-beijing.aliyuncs.com/files/tuijian20231220161656.png" width="25%" height="auto">
|
||||||
-----------------------------------
|
|
||||||
```
|
|
||||||
项目结构
|
|
||||||
├─jeecg-boot-parent(父POM: 项目依赖、modules组织)
|
|
||||||
│ ├─jeecg-boot-base-core(共通模块: 工具类、config、权限、查询过滤器、注解等)
|
|
||||||
│ ├─jeecg-module-demo 示例代码
|
|
||||||
│ ├─jeecg-module-system System系统管理目录
|
|
||||||
│ │ ├─jeecg-system-biz System系统管理权限等功能
|
|
||||||
│ │ ├─jeecg-system-start System单体启动项目(8080)
|
|
||||||
│ │ ├─jeecg-system-api System系统管理模块对外api
|
|
||||||
│ │ │ ├─jeecg-system-cloud-api System模块对外提供的微服务接口
|
|
||||||
│ │ │ ├─jeecg-system-local-api System模块对外提供的单体接口
|
|
||||||
│ ├─jeecg-server-cloud --微服务模块
|
|
||||||
├─jeecg-cloud-gateway --微服务网关模块(9999)
|
|
||||||
├─jeecg-cloud-nacos --Nacos服务模块(8848)
|
|
||||||
├─jeecg-system-cloud-start --System微服务启动项目(7001)
|
|
||||||
├─jeecg-demo-cloud-start --Demo微服务启动项目(7002)
|
|
||||||
├─jeecg-visual
|
|
||||||
├─jeecg-cloud-monitor --微服务监控模块 (9111)
|
|
||||||
├─jeecg-cloud-xxljob --微服务xxljob定时任务服务端 (9080)
|
|
||||||
├─jeecg-cloud-sentinel --sentinel服务端 (9000)
|
|
||||||
├─jeecg-cloud-test -- 微服务测试示例(各种例子)
|
|
||||||
├─jeecg-cloud-test-more -- 微服务测试示例(feign、熔断降级、xxljob、分布式锁)
|
|
||||||
├─jeecg-cloud-test-rabbitmq -- 微服务测试示例(rabbitmq)
|
|
||||||
├─jeecg-cloud-test-seata -- 微服务测试示例(seata分布式事务)
|
|
||||||
├─jeecg-cloud-test-shardingsphere -- 微服务测试示例(分库分表)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 系统效果
|
### 系统效果
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### PC端
|
##### PC端
|
||||||

|

|
||||||
|
|
||||||
@ -430,9 +496,23 @@ Docker启动项目
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
##### AI助手
|
|
||||||

|
|
||||||
|
|
||||||
|
##### 流程设计
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### 简版流程设计
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
##### 仪表盘设计器
|
##### 仪表盘设计器
|
||||||

|

|
||||||
@ -448,6 +528,38 @@ Docker启动项目
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
##### 表单设计器
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### 大屏设计器
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### UNIAPP效果
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### 零代码应用
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
##### 手机端
|
##### 手机端
|
||||||

|

|
||||||
@ -470,62 +582,8 @@ Docker启动项目
|
|||||||
##### 在线接口文档
|
##### 在线接口文档
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
##### UNIAPP效果
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
##### 大屏设计器
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
##### 流程设计
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### 表单设计器
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 捐赠
|
## 捐赠
|
||||||
|
|
||||||
如果觉得还不错,请作者喝杯咖啡吧 ☺
|
如果觉得还不错,请作者喝杯咖啡吧 ☺
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### 流程引擎推荐
|
|
||||||
|
|
||||||
大家在使用本开源项目时,如果想进一步集成流程引擎,推荐结合贺波老师的书 [《深入Activiti流程引擎:核心原理与高阶实战》](https://item.m.jd.com/product/13928958.html?gx=RnAomTM2bmCImZxDqYAkVCoIHuIYVqc)
|
|
||||||
|
|
||||||
<img src="https://jeecgos.oss-cn-beijing.aliyuncs.com/files/tuijian20231220161656.png" width="25%" height="auto">
|
|
||||||
File diff suppressed because one or more lines are too long
325
db/tables_nacos.sql
Normal file
325
db/tables_nacos.sql
Normal file
File diff suppressed because one or more lines are too long
BIN
db/其他数据库/jeecgboot-oracle11g.dmp
Normal file
BIN
db/其他数据库/jeecgboot-oracle11g.dmp
Normal file
Binary file not shown.
16688
db/其他数据库/jeecgboot-oracle11g.sql
Normal file
16688
db/其他数据库/jeecgboot-oracle11g.sql
Normal file
File diff suppressed because one or more lines are too long
31903
db/其他数据库/jeecgboot-sqlserver2019.sql
Normal file
31903
db/其他数据库/jeecgboot-sqlserver2019.sql
Normal file
File diff suppressed because one or more lines are too long
@ -4,11 +4,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-parent</artifactId>
|
<artifactId>jeecg-boot-parent</artifactId>
|
||||||
<version>3.7.0</version>
|
<version>3.6.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>jeecg-boot-base-core</artifactId>
|
<artifactId>jeecg-boot-base-core</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<spring-boot.version>3.1.5</spring-boot.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>aliyun</id>
|
<id>aliyun</id>
|
||||||
@ -43,12 +47,22 @@
|
|||||||
<!--jeecg-tools-->
|
<!--jeecg-tools-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-common</artifactId>
|
<artifactId>jeecg-boot-common3</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--集成springmvc框架并实现自动配置 -->
|
<!--集成springmvc框架并实现自动配置 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- websocket -->
|
<!-- websocket -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -82,7 +96,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>${commons-io.version}</version>
|
<version>${commons.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-lang</groupId>
|
<groupId>commons-lang</groupId>
|
||||||
@ -105,14 +119,14 @@
|
|||||||
<!-- druid -->
|
<!-- druid -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-starter</artifactId>
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||||
<version>${druid.version}</version>
|
<version>${druid.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 动态数据源 -->
|
<!-- 动态数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||||
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -145,25 +159,7 @@
|
|||||||
<version>${postgresql.version}</version>
|
<version>${postgresql.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--人大金仓驱动 版本号V008R006C005B0013 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jeecgframework</groupId>
|
|
||||||
<artifactId>kingbase8</artifactId>
|
|
||||||
<version>${kingbase8.version}</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<!--达梦数据库驱动 版本号1-3-26-2023.07.26-197096-20046-ENT -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.dameng</groupId>
|
|
||||||
<artifactId>Dm8JdbcDriver18</artifactId>
|
|
||||||
<version>${dm8.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.dameng</groupId>
|
|
||||||
<artifactId>DmDialect-for-hibernate5.0</artifactId>
|
|
||||||
<version>${dm8.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Quartz定时任务 -->
|
<!-- Quartz定时任务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@ -182,6 +178,12 @@
|
|||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-spring-boot-starter</artifactId>
|
<artifactId>shiro-spring-boot-starter</artifactId>
|
||||||
<version>${shiro.version}</version>
|
<version>${shiro.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-spring</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- shiro-redis -->
|
<!-- shiro-redis -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -197,18 +199,61 @@
|
|||||||
<artifactId>checkstyle</artifactId>
|
<artifactId>checkstyle</artifactId>
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
<groupId>com.puppycrawl.tools</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<!-- TODO shiro 无法使用 spring boot 3.X 自带的jedis,降版本处理 -->
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>jedis</artifactId>
|
||||||
|
<groupId>redis.clients</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<!-- TODO shiro 无法使用 spring boot 3.X 自带的jedis,降版本处理 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>redis.clients</groupId>
|
||||||
|
<artifactId>jedis</artifactId>
|
||||||
|
<version>${jedis.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-spring</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
|
<version>${shiro.version}</version>
|
||||||
|
<!-- 排除仍使用了javax.servlet的依赖 -->
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<!-- 引入适配jakarta的依赖包 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
|
<version>${shiro.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
|
<version>${shiro.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- knife4j -->
|
<!-- knife4j -->
|
||||||
<!-- <dependency>
|
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
|
||||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
|
||||||
<version>3.0.3</version>
|
|
||||||
</dependency>-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
|
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||||
<version>${knife4j-spring-boot-starter.version}</version>
|
<version>${knife4j-spring-boot-starter.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -222,7 +267,7 @@
|
|||||||
|
|
||||||
<!-- AutoPoi Excel工具类-->
|
<!-- AutoPoi Excel工具类-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework</groupId>
|
<groupId>org.jeecgframework.boot3</groupId>
|
||||||
<artifactId>autopoi-web</artifactId>
|
<artifactId>autopoi-web</artifactId>
|
||||||
<version>${autopoi-web.version}</version>
|
<version>${autopoi-web.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
@ -265,6 +310,16 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xkcoding.justauth</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
@ -288,11 +343,6 @@
|
|||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-crypto</artifactId>
|
<artifactId>hutool-crypto</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- chatgpt -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
|
||||||
<artifactId>jeecg-boot-starter-chatgpt</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@ -18,21 +18,14 @@ public interface CommonAPI {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Set<String> queryUserRoles(String username);
|
Set<String> queryUserRoles(String username);
|
||||||
|
|
||||||
/**
|
|
||||||
* 1查询用户角色信息
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Set<String> queryUserRolesById(String userId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2查询用户权限信息
|
* 2查询用户权限信息
|
||||||
* @param userId
|
* @param username
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Set<String> queryUserAuths(String userId);
|
Set<String> queryUserAuths(String username);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3根据 id 查询数据库中存储的 DynamicDataSourceModel
|
* 3根据 id 查询数据库中存储的 DynamicDataSourceModel
|
||||||
@ -56,13 +49,6 @@ public interface CommonAPI {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public LoginUser getUserByName(String username);
|
public LoginUser getUserByName(String username);
|
||||||
|
|
||||||
/**
|
|
||||||
* 5根据用户账号查询用户Id
|
|
||||||
* @param username
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getUserIdByName(String username);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,8 +17,6 @@ public class DataLogDTO {
|
|||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
private String createName;
|
|
||||||
|
|
||||||
public DataLogDTO(){
|
public DataLogDTO(){
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@ package org.jeecg.common.api.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1,6 +1,5 @@
|
|||||||
package org.jeecg.common.api.dto;
|
package org.jeecg.common.api.dto;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -56,11 +55,6 @@ public class LogDTO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Integer tenantId;
|
private Integer tenantId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 客户终端类型 pc:电脑端 app:手机端 h5:移动网页端
|
|
||||||
*/
|
|
||||||
private String clientType;
|
|
||||||
|
|
||||||
public LogDTO(){
|
public LogDTO(){
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -30,13 +30,6 @@ public class OnlineAuthDTO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String onlineFormUrl;
|
private String onlineFormUrl;
|
||||||
|
|
||||||
//update-begin---author:chenrui ---date:20240123 for:[QQYUN-7992]【online】工单申请下的online表单,未配置online表单开发菜单,操作报错无权限------------
|
|
||||||
/**
|
|
||||||
* online工单的地址
|
|
||||||
*/
|
|
||||||
private String onlineWorkOrderUrl;
|
|
||||||
//update-end---author:chenrui ---date:20240123 for:[QQYUN-7992]【online】工单申请下的online表单,未配置online表单开发菜单,操作报错无权限------------
|
|
||||||
|
|
||||||
public OnlineAuthDTO(){
|
public OnlineAuthDTO(){
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,8 +1,7 @@
|
|||||||
package org.jeecg.common.api.vo;
|
package org.jeecg.common.api.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ import java.io.Serializable;
|
|||||||
* @date 2019年1月19日
|
* @date 2019年1月19日
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value="接口返回对象", description="接口返回对象")
|
@Schema(description="接口返回对象")
|
||||||
public class Result<T> implements Serializable {
|
public class Result<T> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -23,31 +22,31 @@ public class Result<T> implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 成功标志
|
* 成功标志
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "成功标志")
|
@Schema(description = "成功标志")
|
||||||
private boolean success = true;
|
private boolean success = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回处理消息
|
* 返回处理消息
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "返回处理消息")
|
@Schema(description = "返回处理消息")
|
||||||
private String message = "";
|
private String message = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回代码
|
* 返回代码
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "返回代码")
|
@Schema(description = "返回代码")
|
||||||
private Integer code = 0;
|
private Integer code = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回数据对象 data
|
* 返回数据对象 data
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "返回数据对象")
|
@Schema(description = "返回数据对象")
|
||||||
private T result;
|
private T result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 时间戳
|
* 时间戳
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "时间戳")
|
@Schema(description = "时间戳")
|
||||||
private long timestamp = System.currentTimeMillis();
|
private long timestamp = System.currentTimeMillis();
|
||||||
|
|
||||||
public Result() {
|
public Result() {
|
||||||
@ -24,10 +24,10 @@ import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -158,9 +158,6 @@ public class AutoLogAspect {
|
|||||||
if(value!=null && value.toString().length()>length){
|
if(value!=null && value.toString().length()>length){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(value instanceof MultipartFile){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -52,9 +52,7 @@ public class DictAspect {
|
|||||||
/**
|
/**
|
||||||
* 定义切点Pointcut
|
* 定义切点Pointcut
|
||||||
*/
|
*/
|
||||||
@Pointcut("(@within(org.springframework.web.bind.annotation.RestController) || " +
|
@Pointcut("execution(public * org.jeecg.modules..*.*Controller.*(..)) || @annotation(org.jeecg.common.aspect.annotation.AutoDict)")
|
||||||
"@within(org.springframework.stereotype.Controller) || @annotation(org.jeecg.common.aspect.annotation.AutoDict)) " +
|
|
||||||
"&& execution(public org.jeecg.common.api.vo.Result org.jeecg..*.*(..))")
|
|
||||||
public void excudeService() {
|
public void excudeService() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,8 +92,7 @@ public class DictAspect {
|
|||||||
* @param result
|
* @param result
|
||||||
*/
|
*/
|
||||||
private Object parseDictText(Object result) {
|
private Object parseDictText(Object result) {
|
||||||
//if (result instanceof Result) {
|
if (result instanceof Result) {
|
||||||
if (true) {
|
|
||||||
if (((Result) result).getResult() instanceof IPage) {
|
if (((Result) result).getResult() instanceof IPage) {
|
||||||
List<JSONObject> items = new ArrayList<>();
|
List<JSONObject> items = new ArrayList<>();
|
||||||
|
|
||||||
@ -296,13 +293,6 @@ public class DictAspect {
|
|||||||
log.debug("translateDictFromTableByKeys.dictCode:" + dictCode);
|
log.debug("translateDictFromTableByKeys.dictCode:" + dictCode);
|
||||||
log.debug("translateDictFromTableByKeys.values:" + values);
|
log.debug("translateDictFromTableByKeys.values:" + values);
|
||||||
//update-begin---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
//update-begin---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
||||||
|
|
||||||
//update-begin---author:wangshuai---date:2024-01-09---for:微服务下为空报错没有参数需要传递空字符串---
|
|
||||||
if(null == dataSource){
|
|
||||||
dataSource = "";
|
|
||||||
}
|
|
||||||
//update-end---author:wangshuai---date:2024-01-09---for:微服务下为空报错没有参数需要传递空字符串---
|
|
||||||
|
|
||||||
List<DictModel> texts = commonApi.translateDictFromTableByKeys(table, text, code, values, dataSource);
|
List<DictModel> texts = commonApi.translateDictFromTableByKeys(table, text, code, values, dataSource);
|
||||||
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
||||||
log.debug("translateDictFromTableByKeys.result:" + texts);
|
log.debug("translateDictFromTableByKeys.result:" + texts);
|
||||||
@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -36,16 +36,6 @@ public interface CommonConstant {
|
|||||||
*/
|
*/
|
||||||
int LOG_TYPE_2 = 2;
|
int LOG_TYPE_2 = 2;
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统日志类型: 租户操作日志
|
|
||||||
*/
|
|
||||||
int LOG_TYPE_3 = 3;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统日志类型: 异常
|
|
||||||
*/
|
|
||||||
int LOG_TYPE_4 = 4;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志类型: 查询
|
* 操作日志类型: 查询
|
||||||
*/
|
*/
|
||||||
@ -296,10 +286,6 @@ public interface CommonConstant {
|
|||||||
* 在线聊天 用户好友缓存前缀
|
* 在线聊天 用户好友缓存前缀
|
||||||
*/
|
*/
|
||||||
String IM_PREFIX_USER_FRIEND_CACHE = "sys:cache:im:im_prefix_user_friend_";
|
String IM_PREFIX_USER_FRIEND_CACHE = "sys:cache:im:im_prefix_user_friend_";
|
||||||
/**
|
|
||||||
* 缓存用户id与用户名关系
|
|
||||||
*/
|
|
||||||
String SYS_USER_ID_MAPPING_CACHE = "sys:cache:user:id_mapping";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 考勤补卡业务状态 (1:同意 2:不同意)
|
* 考勤补卡业务状态 (1:同意 2:不同意)
|
||||||
@ -391,8 +377,6 @@ public interface CommonConstant {
|
|||||||
/**前端vue3版本Header参数名*/
|
/**前端vue3版本Header参数名*/
|
||||||
String VERSION="X-Version";
|
String VERSION="X-Version";
|
||||||
|
|
||||||
String VERSION_V3 = "v3";
|
|
||||||
|
|
||||||
/**存储在线程变量里的动态表名*/
|
/**存储在线程变量里的动态表名*/
|
||||||
String DYNAMIC_TABLE_NAME="DYNAMIC_TABLE_NAME";
|
String DYNAMIC_TABLE_NAME="DYNAMIC_TABLE_NAME";
|
||||||
/**
|
/**
|
||||||
@ -591,30 +575,4 @@ public interface CommonConstant {
|
|||||||
public static final String SAAS_MODE_TENANT = "tenant";
|
public static final String SAAS_MODE_TENANT = "tenant";
|
||||||
//update-end---author:scott ---date::2023-09-10 for:积木报表常量----
|
//update-end---author:scott ---date::2023-09-10 for:积木报表常量----
|
||||||
|
|
||||||
//update-begin---author:wangshuai---date:2024-04-07---for:修改手机号常量---
|
|
||||||
/**
|
|
||||||
* 修改手机号短信验证码redis-key的前缀
|
|
||||||
*/
|
|
||||||
String CHANGE_PHONE_REDIS_KEY_PRE = "sys:cache:phone:change_phone_msg:";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存用户最后一次收到消息通知的时间 KEY
|
|
||||||
*/
|
|
||||||
String CACHE_KEY_USER_LAST_ANNOUNT_TIME_1HOUR = "sys:cache:userinfo:user_last_annount_time::%s";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证原手机号
|
|
||||||
*/
|
|
||||||
String VERIFY_ORIGINAL_PHONE = "verifyOriginalPhone";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改手机号
|
|
||||||
*/
|
|
||||||
String UPDATE_PHONE = "updatePhone";
|
|
||||||
//update-end---author:wangshuai---date:2024-04-07---for:修改手机号常量---
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改手机号验证码请求次数超出
|
|
||||||
*/
|
|
||||||
Integer PHONE_SMS_FAIL_CODE = 40002;
|
|
||||||
}
|
}
|
||||||
@ -58,22 +58,6 @@ public interface DataBaseConstant {
|
|||||||
* 数据-所属机构编码
|
* 数据-所属机构编码
|
||||||
*/
|
*/
|
||||||
public static final String SYS_MULTI_ORG_CODE_TABLE = "sys_multi_org_code";
|
public static final String SYS_MULTI_ORG_CODE_TABLE = "sys_multi_org_code";
|
||||||
/**
|
|
||||||
* 数据-所属机构ID
|
|
||||||
*/
|
|
||||||
public static final String SYS_ORG_ID = "sysOrgId";
|
|
||||||
/**
|
|
||||||
* 数据-所属机构ID
|
|
||||||
*/
|
|
||||||
public static final String SYS_ORG_ID_TABLE = "sys_org_id";
|
|
||||||
/**
|
|
||||||
* 数据-所属角色code(多个逗号分割)
|
|
||||||
*/
|
|
||||||
public static final String SYS_ROLE_CODE = "sysRoleCode";
|
|
||||||
/**
|
|
||||||
* 数据-所属角色code(多个逗号分割)
|
|
||||||
*/
|
|
||||||
public static final String SYS_ROLE_CODE_TABLE = "sys_role_code";
|
|
||||||
/**
|
/**
|
||||||
* 数据-系统用户编码(对应登录用户账号)
|
* 数据-系统用户编码(对应登录用户账号)
|
||||||
*/
|
*/
|
||||||
@ -82,14 +66,7 @@ public interface DataBaseConstant {
|
|||||||
* 数据-系统用户编码(对应登录用户账号)
|
* 数据-系统用户编码(对应登录用户账号)
|
||||||
*/
|
*/
|
||||||
public static final String SYS_USER_CODE_TABLE = "sys_user_code";
|
public static final String SYS_USER_CODE_TABLE = "sys_user_code";
|
||||||
/**
|
|
||||||
* 登录用户ID
|
|
||||||
*/
|
|
||||||
public static final String SYS_USER_ID = "sysUserId";
|
|
||||||
/**
|
|
||||||
* 登录用户ID
|
|
||||||
*/
|
|
||||||
public static final String SYS_USER_ID_TABLE = "sys_user_id";
|
|
||||||
/**
|
/**
|
||||||
* 登录用户真实姓名
|
* 登录用户真实姓名
|
||||||
*/
|
*/
|
||||||
@ -34,22 +34,17 @@ public interface ServiceNameConstants {
|
|||||||
*/
|
*/
|
||||||
String SERVICE_DEMO = "jeecg-demo";
|
String SERVICE_DEMO = "jeecg-demo";
|
||||||
/**
|
/**
|
||||||
* 微服务名:joa模块
|
* 微服务名:online在线模块
|
||||||
*/
|
*/
|
||||||
String SERVICE_JOA = "jeecg-joa";
|
String SERVICE_ONLINE = "jeecg-online";
|
||||||
|
/**
|
||||||
// /**
|
* 微服务名:OA模块
|
||||||
// * 微服务名:online在线模块
|
*/
|
||||||
// */
|
String SERVICE_EOA = "jeecg-eoa";
|
||||||
// String SERVICE_ONLINE = "jeecg-online";
|
/**
|
||||||
// /**
|
* 微服务名:表单设计模块
|
||||||
// * 微服务名:OA模块
|
*/
|
||||||
// */
|
String SERVICE_FORM = "jeecg-desform";
|
||||||
// String SERVICE_EOA = "jeecg-eoa";
|
|
||||||
// /**
|
|
||||||
// * 微服务名:表单设计模块
|
|
||||||
// */
|
|
||||||
// String SERVICE_FORM = "jeecg-desform";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gateway通过header传递根路径 basePath
|
* gateway通过header传递根路径 basePath
|
||||||
@ -23,7 +23,7 @@ public enum CgformEnum {
|
|||||||
/**
|
/**
|
||||||
* 多表(jvxe风格)
|
* 多表(jvxe风格)
|
||||||
* */
|
* */
|
||||||
JVXE_TABLE(2, "jvxe", "/jeecg/code-template-online", "jvxe.onetomany", "默认风格" ,new String[]{"vue3","vue","vue3Native"}),
|
JVXE_TABLE(2, "jvxe", "/jeecg/code-template-online", "jvxe.onetomany", "JVXE风格" ,new String[]{"vue3","vue","vue3Native"}),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多表 (erp风格)
|
* 多表 (erp风格)
|
||||||
@ -12,8 +12,6 @@ public enum DySmsEnum {
|
|||||||
LOGIN_TEMPLATE_CODE("SMS_175435174","敲敲云","code"),
|
LOGIN_TEMPLATE_CODE("SMS_175435174","敲敲云","code"),
|
||||||
/**忘记密码短信模板编码*/
|
/**忘记密码短信模板编码*/
|
||||||
FORGET_PASSWORD_TEMPLATE_CODE("SMS_175435174","敲敲云","code"),
|
FORGET_PASSWORD_TEMPLATE_CODE("SMS_175435174","敲敲云","code"),
|
||||||
/**修改密码短信模板编码*/
|
|
||||||
CHANGE_PASSWORD_TEMPLATE_CODE("SMS_465391221","敲敲云","code"),
|
|
||||||
/**注册账号短信模板编码*/
|
/**注册账号短信模板编码*/
|
||||||
REGISTER_TEMPLATE_CODE("SMS_175430166","敲敲云","code"),
|
REGISTER_TEMPLATE_CODE("SMS_175430166","敲敲云","code"),
|
||||||
/**会议通知*/
|
/**会议通知*/
|
||||||
@ -13,16 +13,12 @@ import java.util.List;
|
|||||||
public enum RoleIndexConfigEnum {
|
public enum RoleIndexConfigEnum {
|
||||||
|
|
||||||
/**首页自定义 admin*/
|
/**首页自定义 admin*/
|
||||||
// ADMIN("admin", "dashboard/Analysis"),
|
ADMIN("admin", "dashboard/Analysis"),
|
||||||
//TEST("test", "dashboard/IndexChart"),
|
//TEST("test", "dashboard/IndexChart"),
|
||||||
/**首页自定义 hr*/
|
/**首页自定义 hr*/
|
||||||
// HR("hr", "dashboard/IndexBdc");
|
HR("hr", "dashboard/IndexBdc");
|
||||||
|
|
||||||
//DM("dm", "dashboard/IndexTask"),
|
//DM("dm", "dashboard/IndexTask"),
|
||||||
|
|
||||||
// 注:此值仅为防止报错,无任何实际意义
|
|
||||||
ROLE_INDEX_CONFIG_ENUM("RoleIndexConfigEnumDefault", "dashboard/Analysis");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色编码
|
* 角色编码
|
||||||
*/
|
*/
|
||||||
@ -198,7 +198,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param fullName 全名
|
* @param fullName 全名
|
||||||
* @return <例子:李**>
|
* @return <例子:李**>
|
||||||
*/
|
*/
|
||||||
public static String chineseName(String fullName) {
|
private static String chineseName(String fullName) {
|
||||||
if (oConvertUtils.isEmpty(fullName)) {
|
if (oConvertUtils.isEmpty(fullName)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param firstName 名
|
* @param firstName 名
|
||||||
* @return <例子:李**>
|
* @return <例子:李**>
|
||||||
*/
|
*/
|
||||||
public static String chineseName(String familyName, String firstName) {
|
private static String chineseName(String familyName, String firstName) {
|
||||||
if (oConvertUtils.isEmpty(familyName) || oConvertUtils.isEmpty(firstName)) {
|
if (oConvertUtils.isEmpty(familyName) || oConvertUtils.isEmpty(firstName)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param id 身份证号
|
* @param id 身份证号
|
||||||
* @return <例子:*************5762>
|
* @return <例子:*************5762>
|
||||||
*/
|
*/
|
||||||
public static String idCardNum(String id) {
|
private static String idCardNum(String id) {
|
||||||
if (oConvertUtils.isEmpty(id)) {
|
if (oConvertUtils.isEmpty(id)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param num 固定电话
|
* @param num 固定电话
|
||||||
* @return <例子:****1234>
|
* @return <例子:****1234>
|
||||||
*/
|
*/
|
||||||
public static String fixedPhone(String num) {
|
private static String fixedPhone(String num) {
|
||||||
if (oConvertUtils.isEmpty(num)) {
|
if (oConvertUtils.isEmpty(num)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -248,7 +248,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param num 手机号码
|
* @param num 手机号码
|
||||||
* @return <例子:138******1234>
|
* @return <例子:138******1234>
|
||||||
*/
|
*/
|
||||||
public static String mobilePhone(String num) {
|
private static String mobilePhone(String num) {
|
||||||
if (oConvertUtils.isEmpty(num)) {
|
if (oConvertUtils.isEmpty(num)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param sensitiveSize 敏感信息长度
|
* @param sensitiveSize 敏感信息长度
|
||||||
* @return <例子:北京市海淀区****>
|
* @return <例子:北京市海淀区****>
|
||||||
*/
|
*/
|
||||||
public static String address(String address, int sensitiveSize) {
|
private static String address(String address, int sensitiveSize) {
|
||||||
if (oConvertUtils.isEmpty(address)) {
|
if (oConvertUtils.isEmpty(address)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param email 电子邮箱
|
* @param email 电子邮箱
|
||||||
* @return <例子:g**@163.com>
|
* @return <例子:g**@163.com>
|
||||||
*/
|
*/
|
||||||
public static String email(String email) {
|
private static String email(String email) {
|
||||||
if (oConvertUtils.isEmpty(email)) {
|
if (oConvertUtils.isEmpty(email)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param cardNum 银行卡号
|
* @param cardNum 银行卡号
|
||||||
* @return <例子:6222600**********1234>
|
* @return <例子:6222600**********1234>
|
||||||
*/
|
*/
|
||||||
public static String bankCard(String cardNum) {
|
private static String bankCard(String cardNum) {
|
||||||
if (oConvertUtils.isEmpty(cardNum)) {
|
if (oConvertUtils.isEmpty(cardNum)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -312,7 +312,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param code 公司开户银行联号
|
* @param code 公司开户银行联号
|
||||||
* @return <例子:12********>
|
* @return <例子:12********>
|
||||||
*/
|
*/
|
||||||
public static String cnapsCode(String code) {
|
private static String cnapsCode(String code) {
|
||||||
if (oConvertUtils.isEmpty(code)) {
|
if (oConvertUtils.isEmpty(code)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -326,7 +326,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param reservedLength 保留长度
|
* @param reservedLength 保留长度
|
||||||
* @return 格式化后的字符串
|
* @return 格式化后的字符串
|
||||||
*/
|
*/
|
||||||
public static String formatRight(String str, int reservedLength){
|
private static String formatRight(String str, int reservedLength){
|
||||||
String name = str.substring(0, reservedLength);
|
String name = str.substring(0, reservedLength);
|
||||||
String stars = String.join("", Collections.nCopies(str.length()-reservedLength, "*"));
|
String stars = String.join("", Collections.nCopies(str.length()-reservedLength, "*"));
|
||||||
return name + stars;
|
return name + stars;
|
||||||
@ -338,7 +338,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param reservedLength 保留长度
|
* @param reservedLength 保留长度
|
||||||
* @return 格式化后的字符串
|
* @return 格式化后的字符串
|
||||||
*/
|
*/
|
||||||
public static String formatLeft(String str, int reservedLength){
|
private static String formatLeft(String str, int reservedLength){
|
||||||
int len = str.length();
|
int len = str.length();
|
||||||
String show = str.substring(len-reservedLength);
|
String show = str.substring(len-reservedLength);
|
||||||
String stars = String.join("", Collections.nCopies(len-reservedLength, "*"));
|
String stars = String.join("", Collections.nCopies(len-reservedLength, "*"));
|
||||||
@ -352,7 +352,7 @@ public class SensitiveInfoUtil {
|
|||||||
* @param endLen 结尾保留长度
|
* @param endLen 结尾保留长度
|
||||||
* @return 格式化后的字符串
|
* @return 格式化后的字符串
|
||||||
*/
|
*/
|
||||||
public static String formatBetween(String str, int beginLen, int endLen){
|
private static String formatBetween(String str, int beginLen, int endLen){
|
||||||
int len = str.length();
|
int len = str.length();
|
||||||
String begin = str.substring(0, beginLen);
|
String begin = str.substring(0, beginLen);
|
||||||
String end = str.substring(len-endLen);
|
String end = str.substring(len-endLen);
|
||||||
@ -2,27 +2,14 @@ package org.jeecg.common.exception;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
|
||||||
import org.apache.shiro.authz.AuthorizationException;
|
import org.apache.shiro.authz.AuthorizationException;
|
||||||
import org.apache.shiro.authz.UnauthorizedException;
|
import org.apache.shiro.authz.UnauthorizedException;
|
||||||
import org.jeecg.common.api.dto.LogDTO;
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
|
||||||
import org.jeecg.common.constant.enums.ClientTerminalTypeEnum;
|
|
||||||
import org.jeecg.common.enums.SentinelErrorInfoEnum;
|
import org.jeecg.common.enums.SentinelErrorInfoEnum;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
|
||||||
import org.jeecg.common.util.BrowserUtils;
|
|
||||||
import org.jeecg.common.util.IpUtils;
|
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
|
||||||
import org.jeecg.modules.base.service.BaseCommonService;
|
|
||||||
import org.springframework.beans.BeansException;
|
|
||||||
import org.springframework.dao.DataIntegrityViolationException;
|
import org.springframework.dao.DataIntegrityViolationException;
|
||||||
import org.springframework.dao.DuplicateKeyException;
|
import org.springframework.dao.DuplicateKeyException;
|
||||||
import org.springframework.data.redis.connection.PoolException;
|
import org.springframework.data.redis.connection.PoolException;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
@ -30,10 +17,6 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
|
|||||||
import org.springframework.web.multipart.MaxUploadSizeExceededException;
|
import org.springframework.web.multipart.MaxUploadSizeExceededException;
|
||||||
import org.springframework.web.servlet.NoHandlerFoundException;
|
import org.springframework.web.servlet.NoHandlerFoundException;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异常处理器
|
* 异常处理器
|
||||||
*
|
*
|
||||||
@ -44,25 +27,12 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class JeecgBootExceptionHandler {
|
public class JeecgBootExceptionHandler {
|
||||||
|
|
||||||
@Resource
|
|
||||||
BaseCommonService baseCommonService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理自定义异常
|
* 处理自定义异常
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(JeecgBootException.class)
|
@ExceptionHandler(JeecgBootException.class)
|
||||||
public Result<?> handleJeecgBootException(JeecgBootException e){
|
public Result<?> handleJeecgBootException(JeecgBootException e){
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return Result.error(e.getErrCode(), e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理自定义异常
|
|
||||||
*/
|
|
||||||
@ExceptionHandler(JeecgBootBizTipException.class)
|
|
||||||
public Result<?> handleJeecgBootBizTipException(JeecgBootBizTipException e){
|
|
||||||
log.error(e.getMessage());
|
|
||||||
return Result.error(e.getErrCode(), e.getMessage());
|
return Result.error(e.getErrCode(), e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +42,6 @@ public class JeecgBootExceptionHandler {
|
|||||||
@ExceptionHandler(JeecgCloudException.class)
|
@ExceptionHandler(JeecgCloudException.class)
|
||||||
public Result<?> handleJeecgCloudException(JeecgCloudException e){
|
public Result<?> handleJeecgCloudException(JeecgCloudException e){
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return Result.error(e.getMessage());
|
return Result.error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,28 +52,25 @@ public class JeecgBootExceptionHandler {
|
|||||||
@ResponseStatus(HttpStatus.UNAUTHORIZED)
|
@ResponseStatus(HttpStatus.UNAUTHORIZED)
|
||||||
public Result<?> handleJeecgBoot401Exception(JeecgBoot401Exception e){
|
public Result<?> handleJeecgBoot401Exception(JeecgBoot401Exception e){
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return new Result(401,e.getMessage());
|
return new Result(401,e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(NoHandlerFoundException.class)
|
@ExceptionHandler(NoHandlerFoundException.class)
|
||||||
public Result<?> handlerNoFoundException(Exception e) {
|
public Result<?> handlerNoFoundException(Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return Result.error(404, "路径不存在,请检查路径是否正确");
|
return Result.error(404, "路径不存在,请检查路径是否正确");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(DuplicateKeyException.class)
|
@ExceptionHandler(DuplicateKeyException.class)
|
||||||
public Result<?> handleDuplicateKeyException(DuplicateKeyException e){
|
public Result<?> handleDuplicateKeyException(DuplicateKeyException e){
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return Result.error("数据库中已存在该记录");
|
return Result.error("数据库中已存在该记录");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler({UnauthorizedException.class, AuthorizationException.class})
|
@ExceptionHandler({UnauthorizedException.class, AuthorizationException.class})
|
||||||
public Result<?> handleAuthorizationException(AuthorizationException e){
|
public Result<?> handleAuthorizationException(AuthorizationException e){
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return Result.noauth("没有权限,请联系管理员授权,后刷新缓存!");
|
return Result.noauth("没有权限,请联系管理员授权");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
@ -117,7 +83,6 @@ public class JeecgBootExceptionHandler {
|
|||||||
return Result.error(errorInfoEnum.getError());
|
return Result.error(errorInfoEnum.getError());
|
||||||
}
|
}
|
||||||
//update-end---author:zyf ---date:20220411 for:处理Sentinel限流自定义异常
|
//update-end---author:zyf ---date:20220411 for:处理Sentinel限流自定义异常
|
||||||
addSysLog(e);
|
|
||||||
return Result.error("操作失败,"+e.getMessage());
|
return Result.error("操作失败,"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +107,6 @@ public class JeecgBootExceptionHandler {
|
|||||||
}
|
}
|
||||||
log.error(sb.toString(), e);
|
log.error(sb.toString(), e);
|
||||||
//return Result.error("没有权限,请联系管理员授权");
|
//return Result.error("没有权限,请联系管理员授权");
|
||||||
addSysLog(e);
|
|
||||||
return Result.error(405,sb.toString());
|
return Result.error(405,sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,14 +116,12 @@ public class JeecgBootExceptionHandler {
|
|||||||
@ExceptionHandler(MaxUploadSizeExceededException.class)
|
@ExceptionHandler(MaxUploadSizeExceededException.class)
|
||||||
public Result<?> handleMaxUploadSizeExceededException(MaxUploadSizeExceededException e) {
|
public Result<?> handleMaxUploadSizeExceededException(MaxUploadSizeExceededException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return Result.error("文件大小超出10MB限制, 请压缩或降低文件质量! ");
|
return Result.error("文件大小超出10MB限制, 请压缩或降低文件质量! ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(DataIntegrityViolationException.class)
|
@ExceptionHandler(DataIntegrityViolationException.class)
|
||||||
public Result<?> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
|
public Result<?> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
//【issues/3624】数据库执行异常handleDataIntegrityViolationException提示有误 #3624
|
//【issues/3624】数据库执行异常handleDataIntegrityViolationException提示有误 #3624
|
||||||
return Result.error("执行数据库异常,违反了完整性例如:违反惟一约束、违反非空限制、字段内容超出长度等");
|
return Result.error("执行数据库异常,违反了完整性例如:违反惟一约束、违反非空限制、字段内容超出长度等");
|
||||||
}
|
}
|
||||||
@ -167,7 +129,6 @@ public class JeecgBootExceptionHandler {
|
|||||||
@ExceptionHandler(PoolException.class)
|
@ExceptionHandler(PoolException.class)
|
||||||
public Result<?> handlePoolException(PoolException e) {
|
public Result<?> handlePoolException(PoolException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
addSysLog(e);
|
|
||||||
return Result.error("Redis 连接异常!");
|
return Result.error("Redis 连接异常!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,57 +149,7 @@ public class JeecgBootExceptionHandler {
|
|||||||
log.error("校验失败,存在SQL注入风险!{}", msg);
|
log.error("校验失败,存在SQL注入风险!{}", msg);
|
||||||
return Result.error("校验失败,存在SQL注入风险!");
|
return Result.error("校验失败,存在SQL注入风险!");
|
||||||
}
|
}
|
||||||
addSysLog(exception);
|
|
||||||
return Result.error("校验失败,存在SQL注入风险!" + msg);
|
return Result.error("校验失败,存在SQL注入风险!" + msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//update-begin---author:chenrui ---date:20240423 for:[QQYUN-8732]把错误的日志都抓取了 方便后续处理,单独弄个日志类型------------
|
|
||||||
/**
|
|
||||||
* 添加异常新系统日志
|
|
||||||
* @param e 异常
|
|
||||||
* @author chenrui
|
|
||||||
* @date 2024/4/22 17:16
|
|
||||||
*/
|
|
||||||
private void addSysLog(Throwable e) {
|
|
||||||
LogDTO log = new LogDTO();
|
|
||||||
log.setLogType(CommonConstant.LOG_TYPE_4);
|
|
||||||
log.setLogContent(e.getClass().getName()+":"+e.getMessage());
|
|
||||||
log.setRequestParam(ExceptionUtils.getStackTrace(e));
|
|
||||||
//获取request
|
|
||||||
HttpServletRequest request = null;
|
|
||||||
try {
|
|
||||||
request = SpringContextUtils.getHttpServletRequest();
|
|
||||||
} catch (NullPointerException | BeansException ignored) {
|
|
||||||
}
|
|
||||||
if (null != request) {
|
|
||||||
//请求的参数
|
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
|
||||||
if(!CollectionUtils.isEmpty(parameterMap)){
|
|
||||||
log.setMethod(oConvertUtils.mapToString(request.getParameterMap()));
|
|
||||||
}
|
|
||||||
// 请求地址
|
|
||||||
log.setRequestUrl(request.getRequestURI());
|
|
||||||
//设置IP地址
|
|
||||||
log.setIp(IpUtils.getIpAddr(request));
|
|
||||||
//设置客户端
|
|
||||||
if(BrowserUtils.isDesktop(request)){
|
|
||||||
log.setClientType(ClientTerminalTypeEnum.PC.getKey());
|
|
||||||
}else{
|
|
||||||
log.setClientType(ClientTerminalTypeEnum.APP.getKey());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//获取登录用户信息
|
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
||||||
if(sysUser!=null){
|
|
||||||
log.setUserid(sysUser.getUsername());
|
|
||||||
log.setUsername(sysUser.getRealname());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
baseCommonService.addLog(log);
|
|
||||||
}
|
|
||||||
//update-end---author:chenrui ---date:20240423 for:[QQYUN-8732]把错误的日志都抓取了 方便后续处理,单独弄个日志类型------------
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -23,9 +23,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -9,10 +9,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: Entity基类
|
* @Description: Entity基类
|
||||||
@ -30,20 +30,20 @@ public class JeecgEntity implements Serializable {
|
|||||||
* ID
|
* ID
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "ID")
|
@Schema(description = "ID")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "创建人")
|
@Schema(description = "创建人")
|
||||||
@Excel(name = "创建人", width = 15)
|
@Excel(name = "创建人", width = 15)
|
||||||
private java.lang.String createBy;
|
private java.lang.String createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ -52,14 +52,14 @@ public class JeecgEntity implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "更新人")
|
@Schema(description = "更新人")
|
||||||
@Excel(name = "更新人", width = 15)
|
@Excel(name = "更新人", width = 15)
|
||||||
private java.lang.String updateBy;
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "更新时间")
|
@Schema(description = "更新时间")
|
||||||
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ -2,6 +2,7 @@ package org.jeecg.common.system.query;
|
|||||||
|
|
||||||
import java.beans.PropertyDescriptor;
|
import java.beans.PropertyDescriptor;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@ -14,6 +15,7 @@ import java.util.stream.Collectors;
|
|||||||
import org.apache.commons.beanutils.PropertyUtils;
|
import org.apache.commons.beanutils.PropertyUtils;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.DataBaseConstant;
|
import org.jeecg.common.constant.DataBaseConstant;
|
||||||
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.jeecg.common.exception.JeecgBootException;
|
import org.jeecg.common.exception.JeecgBootException;
|
||||||
import org.jeecg.common.system.util.JeecgDataAutorUtils;
|
import org.jeecg.common.system.util.JeecgDataAutorUtils;
|
||||||
import org.jeecg.common.system.util.JwtUtil;
|
import org.jeecg.common.system.util.JwtUtil;
|
||||||
@ -23,6 +25,7 @@ import org.jeecg.common.util.*;
|
|||||||
import org.springframework.util.NumberUtils;
|
import org.springframework.util.NumberUtils;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -91,27 +94,10 @@ public class QueryGenerator {
|
|||||||
public static <T> QueryWrapper<T> initQueryWrapper(T searchObj,Map<String, String[]> parameterMap){
|
public static <T> QueryWrapper<T> initQueryWrapper(T searchObj,Map<String, String[]> parameterMap){
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
QueryWrapper<T> queryWrapper = new QueryWrapper<T>();
|
QueryWrapper<T> queryWrapper = new QueryWrapper<T>();
|
||||||
installMplus(queryWrapper, searchObj, parameterMap, null);
|
installMplus(queryWrapper, searchObj, parameterMap);
|
||||||
log.debug("---查询条件构造器初始化完成,耗时:"+(System.currentTimeMillis()-start)+"毫秒----");
|
log.debug("---查询条件构造器初始化完成,耗时:"+(System.currentTimeMillis()-start)+"毫秒----");
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
//update-begin---author:chenrui ---date:20240527 for:[TV360X-378]增加自定义字段查询规则功能------------
|
|
||||||
/**
|
|
||||||
* 获取查询条件构造器QueryWrapper实例 通用查询条件已被封装完成
|
|
||||||
* @param searchObj 查询实体
|
|
||||||
* @param parameterMap request.getParameterMap()
|
|
||||||
* @param customRuleMap 自定义字段查询规则 {field:QueryRuleEnum}
|
|
||||||
* @return QueryWrapper实例
|
|
||||||
*/
|
|
||||||
public static <T> QueryWrapper<T> initQueryWrapper(T searchObj,Map<String, String[]> parameterMap, Map<String, QueryRuleEnum> customRuleMap){
|
|
||||||
long start = System.currentTimeMillis();
|
|
||||||
QueryWrapper<T> queryWrapper = new QueryWrapper<T>();
|
|
||||||
installMplus(queryWrapper, searchObj, parameterMap, customRuleMap);
|
|
||||||
log.debug("---查询条件构造器初始化完成,耗时:"+(System.currentTimeMillis()-start)+"毫秒----");
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
//update-end---author:chenrui ---date:20240527 for:[TV360X-378]增加自定义字段查询规则功能------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组装Mybatis Plus 查询条件
|
* 组装Mybatis Plus 查询条件
|
||||||
@ -122,7 +108,8 @@ public class QueryGenerator {
|
|||||||
* <br>正确示例:QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
|
* <br>正确示例:QueryWrapper<JeecgDemo> queryWrapper = new QueryWrapper<JeecgDemo>();
|
||||||
* <br>3.也可以不使用这个方法直接调用 {@link #initQueryWrapper}直接获取实例
|
* <br>3.也可以不使用这个方法直接调用 {@link #initQueryWrapper}直接获取实例
|
||||||
*/
|
*/
|
||||||
private static void installMplus(QueryWrapper<?> queryWrapper, Object searchObj, Map<String, String[]> parameterMap, Map<String, QueryRuleEnum> customRuleMap) {
|
private static void installMplus(QueryWrapper<?> queryWrapper,Object searchObj,Map<String, String[]> parameterMap) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 注意:权限查询由前端配置数据规则 当一个人有多个所属部门时候 可以在规则配置包含条件 orgCode 包含 #{sys_org_code}
|
* 注意:权限查询由前端配置数据规则 当一个人有多个所属部门时候 可以在规则配置包含条件 orgCode 包含 #{sys_org_code}
|
||||||
但是不支持在自定义SQL中写orgCode in #{sys_org_code}
|
但是不支持在自定义SQL中写orgCode in #{sys_org_code}
|
||||||
@ -187,16 +174,8 @@ public class QueryGenerator {
|
|||||||
queryWrapper.and(j -> j.like(field,vals[0]));
|
queryWrapper.and(j -> j.like(field,vals[0]));
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
//update-begin---author:chenrui ---date:20240527 for:[TV360X-378]增加自定义字段查询规则功能------------
|
//根据参数值带什么关键字符串判断走什么类型的查询
|
||||||
QueryRuleEnum rule;
|
QueryRuleEnum rule = convert2Rule(value);
|
||||||
if(null != customRuleMap && customRuleMap.containsKey(name)) {
|
|
||||||
// 有自定义规则,使用自定义规则.
|
|
||||||
rule = customRuleMap.get(name);
|
|
||||||
}else {
|
|
||||||
//根据参数值带什么关键字符串判断走什么类型的查询
|
|
||||||
rule = convert2Rule(value);
|
|
||||||
}
|
|
||||||
//update-end---author:chenrui ---date:20240527 for:[TV360X-378]增加自定义字段查询规则功能------------
|
|
||||||
value = replaceValue(rule,value);
|
value = replaceValue(rule,value);
|
||||||
// add -begin 添加判断为字符串时设为全模糊查询
|
// add -begin 添加判断为字符串时设为全模糊查询
|
||||||
//if( (rule==null || QueryRuleEnum.EQ.equals(rule)) && "class java.lang.String".equals(type)) {
|
//if( (rule==null || QueryRuleEnum.EQ.equals(rule)) && "class java.lang.String".equals(type)) {
|
||||||
@ -295,7 +274,7 @@ public class QueryGenerator {
|
|||||||
//update-end-author:scott date:2022-10-10 for:【jeecg-boot/issues/I5FJU6】doMultiFieldsOrder() 多字段排序方法存在问题
|
//update-end-author:scott date:2022-10-10 for:【jeecg-boot/issues/I5FJU6】doMultiFieldsOrder() 多字段排序方法存在问题
|
||||||
|
|
||||||
//SQL注入check
|
//SQL注入check
|
||||||
SqlInjectionUtil.filterContentMulti(column);
|
SqlInjectionUtil.filterContent(column);
|
||||||
|
|
||||||
//update-begin--Author:scott Date:20210531 for:36 多条件排序无效问题修正-------
|
//update-begin--Author:scott Date:20210531 for:36 多条件排序无效问题修正-------
|
||||||
// 排序规则修改
|
// 排序规则修改
|
||||||
@ -699,40 +678,9 @@ public class QueryGenerator {
|
|||||||
case LEFT_LIKE:
|
case LEFT_LIKE:
|
||||||
queryWrapper.likeLeft(name, value);
|
queryWrapper.likeLeft(name, value);
|
||||||
break;
|
break;
|
||||||
case NOT_LEFT_LIKE:
|
|
||||||
queryWrapper.notLikeLeft(name, value);
|
|
||||||
break;
|
|
||||||
case RIGHT_LIKE:
|
case RIGHT_LIKE:
|
||||||
queryWrapper.likeRight(name, value);
|
queryWrapper.likeRight(name, value);
|
||||||
break;
|
break;
|
||||||
case NOT_RIGHT_LIKE:
|
|
||||||
queryWrapper.notLikeRight(name, value);
|
|
||||||
break;
|
|
||||||
//update-begin---author:chenrui ---date:20240527 for:[TV360X-378]下拉多框根据条件查询不出来:增加自定义字段查询规则功能------------
|
|
||||||
case LIKE_WITH_OR:
|
|
||||||
final String nameFinal = name;
|
|
||||||
Object[] vals;
|
|
||||||
if (value instanceof String) {
|
|
||||||
vals = value.toString().split(COMMA);
|
|
||||||
} else if (value instanceof String[]) {
|
|
||||||
vals = (Object[]) value;
|
|
||||||
}
|
|
||||||
//update-begin-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
|
|
||||||
else if (value.getClass().isArray()) {
|
|
||||||
vals = (Object[]) value;
|
|
||||||
} else {
|
|
||||||
vals = new Object[]{value};
|
|
||||||
}
|
|
||||||
queryWrapper.and(j -> {
|
|
||||||
log.info("---查询过滤器,Query规则---field:{}, rule:{}, value:{}", nameFinal, "like", vals[0]);
|
|
||||||
j = j.like(nameFinal, vals[0]);
|
|
||||||
for (int k = 1; k < vals.length; k++) {
|
|
||||||
j = j.or().like(nameFinal, vals[k]);
|
|
||||||
log.info("---查询过滤器,Query规则 .or()---field:{}, rule:{}, value:{}", nameFinal, "like", vals[k]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
//update-end---author:chenrui ---date:20240527 for:[TV360X-378]下拉多框根据条件查询不出来:增加自定义字段查询规则功能------------
|
|
||||||
default:
|
default:
|
||||||
log.info("--查询规则未匹配到---");
|
log.info("--查询规则未匹配到---");
|
||||||
break;
|
break;
|
||||||
@ -908,9 +856,7 @@ public class QueryGenerator {
|
|||||||
Class propType = origDescriptors[i].getPropertyType();
|
Class propType = origDescriptors[i].getPropertyType();
|
||||||
boolean isString = propType.equals(String.class);
|
boolean isString = propType.equals(String.class);
|
||||||
Object value;
|
Object value;
|
||||||
//update-begin---author:chenrui ---date:20240527 for:[TV360X-539]数据权限,配置日期等于条件时后端报转换错误------------
|
if(isString) {
|
||||||
if(isString || Date.class.equals(propType)) {
|
|
||||||
//update-end---author:chenrui ---date:20240527 for:[TV360X-539]数据权限,配置日期等于条件时后端报转换错误------------
|
|
||||||
value = converRuleValue(dataRule.getRuleValue());
|
value = converRuleValue(dataRule.getRuleValue());
|
||||||
}else {
|
}else {
|
||||||
value = NumberUtils.parseNumber(dataRule.getRuleValue(),propType);
|
value = NumberUtils.parseNumber(dataRule.getRuleValue(),propType);
|
||||||
@ -33,21 +33,12 @@ public enum QueryRuleEnum {
|
|||||||
RIGHT_LIKE("RIGHT_LIKE","right_like","右模糊"),
|
RIGHT_LIKE("RIGHT_LIKE","right_like","右模糊"),
|
||||||
/**查询规则 带加号等于*/
|
/**查询规则 带加号等于*/
|
||||||
EQ_WITH_ADD("EQWITHADD","eq_with_add","带加号等于"),
|
EQ_WITH_ADD("EQWITHADD","eq_with_add","带加号等于"),
|
||||||
/**查询规则 多词模糊匹配(and)*/
|
/**查询规则 多词模糊匹配*/
|
||||||
LIKE_WITH_AND("LIKEWITHAND","like_with_and","多词模糊匹配————暂时未用上"),
|
LIKE_WITH_AND("LIKEWITHAND","like_with_and","多词模糊匹配————暂时未用上"),
|
||||||
/**查询规则 多词模糊匹配(or)*/
|
|
||||||
LIKE_WITH_OR("LIKEWITHOR","like_with_or","多词模糊匹配(or)"),
|
|
||||||
/**查询规则 自定义SQL片段*/
|
/**查询规则 自定义SQL片段*/
|
||||||
SQL_RULES("USE_SQL_RULES","ext","自定义SQL片段"),
|
SQL_RULES("USE_SQL_RULES","ext","自定义SQL片段"),
|
||||||
|
|
||||||
/** 查询工作表 */
|
|
||||||
LINKAGE("LINKAGE","linkage","查询工作表"),
|
|
||||||
|
|
||||||
// ------- 当前表单设计器内专用 -------
|
// ------- 当前表单设计器内专用 -------
|
||||||
/**查询规则 不以…结尾*/
|
|
||||||
NOT_LEFT_LIKE("NOT_LEFT_LIKE","not_left_like","不以…结尾"),
|
|
||||||
/**查询规则 不以…开头*/
|
|
||||||
NOT_RIGHT_LIKE("NOT_RIGHT_LIKE","not_right_like","不以…开头"),
|
|
||||||
/** 值为空 */
|
/** 值为空 */
|
||||||
EMPTY("EMPTY","empty","值为空"),
|
EMPTY("EMPTY","empty","值为空"),
|
||||||
/** 值不为空 */
|
/** 值不为空 */
|
||||||
@ -58,10 +49,7 @@ public enum QueryRuleEnum {
|
|||||||
ELE_MATCH("ELE_MATCH","elemMatch","多词匹配"),
|
ELE_MATCH("ELE_MATCH","elemMatch","多词匹配"),
|
||||||
/**查询规则 范围查询*/
|
/**查询规则 范围查询*/
|
||||||
RANGE("RANGE","range","范围查询"),
|
RANGE("RANGE","range","范围查询"),
|
||||||
/**查询规则 不在范围内查询*/
|
NOT_RANGE("NOT_RANGE","not_range","不在范围查询");
|
||||||
NOT_RANGE("NOT_RANGE","not_range","不在范围查询"),
|
|
||||||
/** 自定义mongodb查询语句 */
|
|
||||||
CUSTOM_MONGODB("CUSTOM_MONGODB","custom_mongodb","自定义mongodb查询语句");
|
|
||||||
// ------- 当前表单设计器内专用 -------
|
// ------- 当前表单设计器内专用 -------
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
@ -5,7 +5,7 @@ import org.jeecg.common.system.vo.SysUserCacheInfo;
|
|||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -11,10 +11,10 @@ import com.google.common.base.Joiner;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
@ -221,16 +221,6 @@ public class JwtUtil {
|
|||||||
returnValue = user.getSysUserCode();
|
returnValue = user.getSysUserCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 替换为系统登录用户ID
|
|
||||||
else if (key.equals(DataBaseConstant.SYS_USER_ID) || key.equalsIgnoreCase(DataBaseConstant.SYS_USER_ID_TABLE)) {
|
|
||||||
if(user==null) {
|
|
||||||
returnValue = sysUser.getId();
|
|
||||||
}else {
|
|
||||||
returnValue = user.getSysUserId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//替换为系统登录用户真实名字
|
//替换为系统登录用户真实名字
|
||||||
else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_NAME_TABLE)) {
|
else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_NAME_TABLE)) {
|
||||||
if(user==null) {
|
if(user==null) {
|
||||||
@ -248,16 +238,6 @@ public class JwtUtil {
|
|||||||
returnValue = user.getSysOrgCode();
|
returnValue = user.getSysOrgCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 替换为系统用户登录所使用的机构ID
|
|
||||||
else if (key.equals(DataBaseConstant.SYS_ORG_ID) || key.equalsIgnoreCase(DataBaseConstant.SYS_ORG_ID_TABLE)) {
|
|
||||||
if (user == null) {
|
|
||||||
returnValue = sysUser.getOrgId();
|
|
||||||
} else {
|
|
||||||
returnValue = user.getSysOrgId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//替换为系统用户所拥有的所有机构编码
|
//替换为系统用户所拥有的所有机构编码
|
||||||
else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) {
|
else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) {
|
||||||
if(user==null){
|
if(user==null){
|
||||||
@ -271,16 +251,6 @@ public class JwtUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 替换为当前登录用户的角色code(多个逗号分割)
|
|
||||||
else if (key.equals(DataBaseConstant.SYS_ROLE_CODE) || key.equalsIgnoreCase(DataBaseConstant.SYS_ROLE_CODE_TABLE)) {
|
|
||||||
if (user == null) {
|
|
||||||
returnValue = sysUser.getRoleCode();
|
|
||||||
} else {
|
|
||||||
returnValue = user.getSysRoleCode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//update-begin-author:taoyan date:20210330 for:多租户ID作为系统变量
|
//update-begin-author:taoyan date:20210330 for:多租户ID作为系统变量
|
||||||
else if (key.equals(TenantConstant.TENANT_ID) || key.toLowerCase().equals(TenantConstant.TENANT_ID_TABLE)){
|
else if (key.equals(TenantConstant.TENANT_ID) || key.toLowerCase().equals(TenantConstant.TENANT_ID_TABLE)){
|
||||||
try {
|
try {
|
||||||
@ -3,9 +3,7 @@ package org.jeecg.common.system.util;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.system.annotation.EnumDict;
|
import org.jeecg.common.system.annotation.EnumDict;
|
||||||
import org.jeecg.common.system.vo.DictModel;
|
import org.jeecg.common.system.vo.DictModel;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||||
@ -116,21 +114,4 @@ public class ResourceUtil {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取实现类
|
|
||||||
*
|
|
||||||
* @param classPath
|
|
||||||
*/
|
|
||||||
public static Object getImplementationClass(String classPath){
|
|
||||||
try {
|
|
||||||
Class<?> aClass = Class.forName(classPath);
|
|
||||||
return SpringContextUtils.getBean(aClass);
|
|
||||||
} catch (ClassNotFoundException e) {
|
|
||||||
log.error("类没有找到",e);
|
|
||||||
return null;
|
|
||||||
} catch (NoSuchBeanDefinitionException e){
|
|
||||||
log.error(classPath + "没有实现",e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -51,17 +51,6 @@ public class LoginUser {
|
|||||||
*/
|
*/
|
||||||
@SensitiveField
|
@SensitiveField
|
||||||
private String orgCode;
|
private String orgCode;
|
||||||
/**
|
|
||||||
* 当前登录部门id
|
|
||||||
*/
|
|
||||||
@SensitiveField
|
|
||||||
private String orgId;
|
|
||||||
/**
|
|
||||||
* 当前登录角色code(多个逗号分割)
|
|
||||||
*/
|
|
||||||
@SensitiveField
|
|
||||||
private String roleCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 头像
|
* 头像
|
||||||
*/
|
*/
|
||||||
@ -19,8 +19,6 @@ public class SysFilesModel {
|
|||||||
private String storeType;
|
private String storeType;
|
||||||
/**文件大小(kb)*/
|
/**文件大小(kb)*/
|
||||||
private Double fileSize;
|
private Double fileSize;
|
||||||
/**租户id*/
|
|
||||||
private String tenantId;
|
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -69,12 +67,4 @@ public class SysFilesModel {
|
|||||||
public void setFileSize(Double fileSize) {
|
public void setFileSize(Double fileSize) {
|
||||||
this.fileSize = fileSize;
|
this.fileSize = fileSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTenantId() {
|
|
||||||
return tenantId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTenantId(String tenantId) {
|
|
||||||
this.tenantId = tenantId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -9,29 +9,17 @@ import org.jeecg.common.util.DateUtils;
|
|||||||
* @author: jeecg-boot
|
* @author: jeecg-boot
|
||||||
*/
|
*/
|
||||||
public class SysUserCacheInfo {
|
public class SysUserCacheInfo {
|
||||||
|
|
||||||
private String sysUserId;
|
|
||||||
|
|
||||||
private String sysUserCode;
|
private String sysUserCode;
|
||||||
|
|
||||||
private String sysUserName;
|
private String sysUserName;
|
||||||
|
|
||||||
private String sysOrgCode;
|
private String sysOrgCode;
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前用户部门ID
|
|
||||||
*/
|
|
||||||
private String sysOrgId;
|
|
||||||
|
|
||||||
private List<String> sysMultiOrgCode;
|
private List<String> sysMultiOrgCode;
|
||||||
|
|
||||||
private boolean oneDepart;
|
private boolean oneDepart;
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前用户角色code(多个逗号分割)
|
|
||||||
*/
|
|
||||||
private String sysRoleCode;
|
|
||||||
|
|
||||||
public boolean isOneDepart() {
|
public boolean isOneDepart() {
|
||||||
return oneDepart;
|
return oneDepart;
|
||||||
}
|
}
|
||||||
@ -80,27 +68,4 @@ public class SysUserCacheInfo {
|
|||||||
this.sysMultiOrgCode = sysMultiOrgCode;
|
this.sysMultiOrgCode = sysMultiOrgCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSysUserId() {
|
|
||||||
return sysUserId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSysUserId(String sysUserId) {
|
|
||||||
this.sysUserId = sysUserId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSysOrgId() {
|
|
||||||
return sysOrgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSysOrgId(String sysOrgId) {
|
|
||||||
this.sysOrgId = sysOrgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSysRoleCode() {
|
|
||||||
return sysRoleCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSysRoleCode(String sysRoleCode) {
|
|
||||||
this.sysRoleCode = sysRoleCode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -5,7 +5,7 @@ import java.util.Map;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -19,7 +19,7 @@ import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
|||||||
import org.springframework.util.FileCopyUtils;
|
import org.springframework.util.FileCopyUtils;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -28,9 +28,7 @@ import java.io.InputStream;
|
|||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DatabaseMetaData;
|
import java.sql.DatabaseMetaData;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@ -348,11 +346,8 @@ public class CommonUtils {
|
|||||||
|
|
||||||
//返回 host domain
|
//返回 host domain
|
||||||
String baseDomainPath = null;
|
String baseDomainPath = null;
|
||||||
//update-begin---author:wangshuai---date:2024-03-15---for:【QQYUN-8561】企业微信登陆请求接口设置上下文不一致,导致接口404---
|
int length = 80;
|
||||||
int httpPort = 80;
|
if(length == serverPort){
|
||||||
int httpsPort = 443;
|
|
||||||
if(httpPort == serverPort || httpsPort == serverPort){
|
|
||||||
//update-end---author:wangshuai---date:2024-03-15---for:【QQYUN-8561】企业微信登陆请求接口设置上下文不一致,导致接口404---~
|
|
||||||
baseDomainPath = scheme + "://" + serverName + contextPath ;
|
baseDomainPath = scheme + "://" + serverName + contextPath ;
|
||||||
}else{
|
}else{
|
||||||
baseDomainPath = scheme + "://" + serverName + ":" + serverPort + contextPath ;
|
baseDomainPath = scheme + "://" + serverName + ":" + serverPort + contextPath ;
|
||||||
@ -472,19 +467,4 @@ public class CommonUtils {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 输出info日志,会捕获异常,防止因为日志问题导致程序异常
|
|
||||||
*
|
|
||||||
* @param msg
|
|
||||||
* @param objects
|
|
||||||
*/
|
|
||||||
public static void logInfo(String msg, Object... objects) {
|
|
||||||
try {
|
|
||||||
log.info(msg, objects);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.warn("{} —— {}", msg, e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -8,11 +8,6 @@ import java.sql.Timestamp;
|
|||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.Duration;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
@ -121,17 +116,6 @@ public class DateUtils extends PropertyEditorSupport {
|
|||||||
public static Date getDate() {
|
public static Date getDate() {
|
||||||
return new Date();
|
return new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前日期
|
|
||||||
*
|
|
||||||
* @return 系统当前日期(不带时分秒)
|
|
||||||
*/
|
|
||||||
public static LocalDate getLocalDate() {
|
|
||||||
LocalDate today = LocalDate.now();
|
|
||||||
return today;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指定毫秒数表示的日期
|
* 指定毫秒数表示的日期
|
||||||
@ -720,44 +704,6 @@ public class DateUtils extends PropertyEditorSupport {
|
|||||||
return isSameMonth && calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH);
|
return isSameMonth && calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算与当前日期的时间差
|
|
||||||
*
|
|
||||||
* @param targetDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static long calculateTimeDifference(Date targetDate) {
|
|
||||||
// 获取当前时间
|
|
||||||
LocalDateTime currentTime = LocalDateTime.now();
|
|
||||||
|
|
||||||
// 将java.util.Date转换为java.time.LocalDateTime
|
|
||||||
LocalDateTime convertedTargetDate = targetDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
||||||
|
|
||||||
// 计算时间差
|
|
||||||
Duration duration = Duration.between(currentTime, convertedTargetDate);
|
|
||||||
|
|
||||||
// 获取时间差的毫秒数
|
|
||||||
long timeDifferenceInMillis = duration.toMillis();
|
|
||||||
|
|
||||||
return timeDifferenceInMillis;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算与当前日期的日期天数差
|
|
||||||
*
|
|
||||||
* @param targetDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static long calculateDaysDifference(Date targetDate) {
|
|
||||||
// 获取当前日期
|
|
||||||
LocalDate currentDate = LocalDate.now();
|
|
||||||
// 将java.util.Date转换为java.time.LocalDate
|
|
||||||
LocalDate convertedTargetDate = targetDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
|
||||||
// 计算日期差
|
|
||||||
long daysDifference = ChronoUnit.DAYS.between(currentDate, convertedTargetDate);
|
|
||||||
return daysDifference;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断两个时间是否是同一周
|
* 判断两个时间是否是同一周
|
||||||
*
|
*
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user