mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-23 03:27:26 +08:00
Compare commits
111 Commits
v3.8.1
...
v3.8.2last
| Author | SHA1 | Date | |
|---|---|---|---|
| fd60e49f5b | |||
| 5f1dc06067 | |||
| 208d9990ae | |||
| 4f3c71af5b | |||
| 70bd639206 | |||
| d245ef3037 | |||
| 7af8346b79 | |||
| 1b8a31f0d3 | |||
| 294ad5a6c9 | |||
| 065b255d90 | |||
| b7519d7199 | |||
| 81ba07c853 | |||
| 92ed296e63 | |||
| c2aff84914 | |||
| e002cd3bf3 | |||
| 1de07ff3ff | |||
| 35852d41f1 | |||
| a2cb1d9f25 | |||
| 2002af54d0 | |||
| 89747403a2 | |||
| 3db0995c3f | |||
| 950621dd88 | |||
| 033cf51d69 | |||
| fb9f367517 | |||
| b2da45d803 | |||
| 2840f0d325 | |||
| 6ace7eae8a | |||
| 3d88147c59 | |||
| ba0052d452 | |||
| 69fca254f0 | |||
| b3de596199 | |||
| f46273d15e | |||
| 0fe258dbc2 | |||
| de7f23c555 | |||
| d97e56b2f0 | |||
| c868496b78 | |||
| c5150baa69 | |||
| 3d9f59c69b | |||
| 420d6db3fb | |||
| 473a626039 | |||
| 0308b0597c | |||
| 2191f5d48c | |||
| 1158b0b6e7 | |||
| ead2cef1f4 | |||
| 83bb0a0a6a | |||
| b474e9e5a5 | |||
| 422373e300 | |||
| 1cf11a4c2a | |||
| 925f163784 | |||
| d01c1d7d47 | |||
| 3576b54945 | |||
| a760f94b94 | |||
| 342bdd2e38 | |||
| 419e2bea0b | |||
| 443abc3ede | |||
| 358e46559f | |||
| ea59454f51 | |||
| 615a1bc4ff | |||
| d976f12c8f | |||
| 3783765161 | |||
| 8cc6810fdd | |||
| a902d9af19 | |||
| 37a116f2fb | |||
| 1564831f7e | |||
| 18c1cd00c1 | |||
| a988b05e72 | |||
| a9a6fd529d | |||
| 6586d3a880 | |||
| af354f9f5e | |||
| a638a93b65 | |||
| f1cad333da | |||
| 676fffa2c8 | |||
| 23cc569a47 | |||
| dafacf153b | |||
| 7a9f357510 | |||
| f30a8c658a | |||
| e84d7726d2 | |||
| 0f39802698 | |||
| a014a3ed0e | |||
| 5720d1a01e | |||
| 5eed6ac6d2 | |||
| 0cfa1e223a | |||
| 219869f4c0 | |||
| e6edde963a | |||
| c44b66128e | |||
| 9356b04741 | |||
| d0a094f9a3 | |||
| 73eb625737 | |||
| 74880705b8 | |||
| 118775cf79 | |||
| 7b80ae3e68 | |||
| 336e7851aa | |||
| 56b9131675 | |||
| 3c0cc49f0c | |||
| 69b2e97935 | |||
| 1c2a49d371 | |||
| 967197d224 | |||
| 396718bc5e | |||
| 37c62c3962 | |||
| 96b378bb7a | |||
| 9d440a4261 | |||
| 4870c43f39 | |||
| 9c21f621c0 | |||
| 8d382b76ad | |||
| 410f2539e1 | |||
| baee00921f | |||
| e00b25af42 | |||
| 44d6b37873 | |||
| 271712b050 | |||
| 3482b3a0db | |||
| 444c7140f6 |
12
README-EN.md
12
README-EN.md
@ -7,12 +7,12 @@
|
||||
JEECG BOOT AI Low Code Platform
|
||||
===============
|
||||
|
||||
Current version: 3.8.1 (Release date: 2025-06-30)
|
||||
Current version: 3.8.2 (Release date: 2025-08-04)
|
||||
|
||||
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||
[](http://www.jeecg.com)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
|
||||
@ -69,9 +69,13 @@ Jeecg-Boot AI low code platform can be applied in the development of any J2EE pr
|
||||
Starts the project
|
||||
-----------------------------------
|
||||
|
||||
- [IDEA Quick start](https://help.jeecg.com/java/setup/idea/startup)
|
||||
- [Docker Quick start](https://help.jeecg.com/java/docker/quick)
|
||||
> Default account password: admin/123456
|
||||
|
||||
- [Development Environment setup](https://help.jeecg.com/java/setup/tools)
|
||||
- [IDEA Quick start(single model)](https://help.jeecg.com/java/setup/idea/startup)
|
||||
- [Docker Quick start(single model)](https://help.jeecg.com/java/docker/quick)
|
||||
- [IDEA Quick start(microservices model)](https://help.jeecg.com/java/springcloud/switchcloud/monomer)
|
||||
- [Docker Quick start(microservices model)](https://help.jeecg.com/java/docker/quickcloud)
|
||||
|
||||
|
||||
Technical documentation
|
||||
|
||||
88
README.md
88
README.md
@ -2,12 +2,13 @@
|
||||
JeecgBoot AI低代码平台
|
||||
===============
|
||||
|
||||
当前最新版本: 3.8.1(发布日期:2025-06-30)
|
||||
当前最新版本: 3.8.2(发布日期:2025-08-04)
|
||||
|
||||
|
||||
[](https://github.com/jeecgboot/JeecgBoot/blob/master/LICENSE)
|
||||
[](http://guojusoft.com)
|
||||
[](https://github.com/jeecgboot/JeecgBoot)
|
||||
[](https://jeecg.com)
|
||||
[](https://jeecg.blog.csdn.net)
|
||||
[](https://github.com/jeecgboot/JeecgBoot)
|
||||
[](https://github.com/jeecgboot/JeecgBoot)
|
||||
[](https://github.com/jeecgboot/JeecgBoot)
|
||||
|
||||
@ -19,7 +20,7 @@ JeecgBoot AI低代码平台
|
||||
<h3 align="center">企业级AI低代码平台</h3>
|
||||
|
||||
JeecgBoot是一款企业级低代码平台集成了AI应用平台功能,旨在帮助开发者快速实现低代码开发和构建、部署个性化的 AI 应用。
|
||||
前后端分离架构Ant Design4、Vue3,SpringBoot,SpringCloud Alibaba,Mybatis-plus,Shiro/SpringAuthorizationServer,强大的代码生成器让前后端代码一键生成,无需写任何代码;提供强大的报表和大屏工具,满足企业级数据产品需求!
|
||||
前后端分离架构Ant Design4、Vue3,SpringBoot2/3,SpringCloud Alibaba,Mybatis-plus,Shiro/SpringAuthorizationServer,强大的代码生成器让前后端代码一键生成,无需写任何代码;提供强大的报表和大屏工具,满足企业级数据产品需求!
|
||||
引领AI低代码开发模式: AI生成->OnlineCoding-> 代码生成-> 手工MERGE, 帮助Java项目解决80%的重复工作,让开发更多关注业务,提高效率、节省成本,同时又不失灵活性!低代码能力:Online表单、表单设计、流程设计、Online报表、大屏/仪表盘设计、报表设计; AI应用平台功能:AI知识库问答、AI模型管理、AI流程编排、AI聊天等,支持含ChatGPT、DeepSeek、Ollama等多种AI大模型
|
||||
|
||||
|
||||
@ -47,10 +48,10 @@ JeecgBoot低代码平台,可以应用在任何J2EE项目的开发中,支持
|
||||
版本说明
|
||||
-----------------------------------
|
||||
|
||||
|下载 | JDK17 + SpringBoot2.7 | JDK17 + SpringBoot3.3 + Shiro |JDK17 + SpringBoot3.3+ SpringAuthorizationServer |
|
||||
|下载 | JDK17 + SpringBoot3.3 + Shiro |JDK17 + SpringBoot3.3+ SpringAuthorizationServer | JDK17/JDK8 + SpringBoot2.7 |
|
||||
|------|----------------------------------------------------|-----------------------------------------------------------------------------|--------------------------------------------|
|
||||
| Github | [`master`](https://github.com/jeecgboot/JeecgBoot) | [`springboot3`](https://github.com/jeecgboot/JeecgBoot/tree/springboot3) 分支 | [`springboot3_sas`](https://github.com/jeecgboot/JeecgBoot/tree/springboot3_sas) 分支 |
|
||||
| Gitee | [`master`](https://gitee.com/jeecg/JeecgBoot) | [`springboot3`](https://gitee.com/jeecg/JeecgBoot/tree/springboot3/) 分支 | [`springboot3_sas`](https://gitee.com/jeecg/JeecgBoot/tree/springboot3_sas) 分支 |
|
||||
| Github | [`springboot3`](https://github.com/jeecgboot/JeecgBoot/tree/springboot3) | [`springboot3_sas`](https://github.com/jeecgboot/JeecgBoot/tree/springboot3_sas) 分支 |[`master`](https://github.com/jeecgboot/JeecgBoot) 分支|
|
||||
| Gitee | [`springboot3`](https://gitee.com/jeecg/JeecgBoot/tree/springboot3/) | [`springboot3_sas`](https://gitee.com/jeecg/JeecgBoot/tree/springboot3_sas) 分支 |[`master`](https://gitee.com/jeecg/JeecgBoot) 分支 |
|
||||
|
||||
|
||||
- `jeecg-boot` 是后端JAVA源码项目(支持单体和微服务切换).
|
||||
@ -65,30 +66,43 @@ JeecgBoot低代码平台,可以应用在任何J2EE项目的开发中,支持
|
||||
启动项目
|
||||
-----------------------------------
|
||||
|
||||
- [IDEA启动前后端项目](https://help.jeecg.com/java/setup/idea/startup)
|
||||
- [Docker一键启动前后端](https://help.jeecg.com/java/docker/quick)
|
||||
> 默认账号密码: admin/123456
|
||||
|
||||
- [开发环境搭建](https://help.jeecg.com/java/setup/tools)
|
||||
- [IDEA启动前后端(单体模式)](https://help.jeecg.com/java/setup/idea/startup)
|
||||
- [Docker一键启动(单体模式)](https://help.jeecg.com/java/docker/quick)
|
||||
- [IDEA启动前后端(微服务方式)](https://help.jeecg.com/java/springcloud/switchcloud/monomer)
|
||||
- [Docker一键启动(微服务方式)](https://help.jeecg.com/java/docker/quickcloud)
|
||||
|
||||
|
||||
技术文档
|
||||
-----------------------------------
|
||||
|
||||
- 官方网站: [http://www.jeecg.com](http://www.jeecg.com)
|
||||
- 入门指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [开发文档](https://help.jeecg.com) | [AI应用使用手册](https://help.jeecg.com/aigc)
|
||||
- 技术支持: [反馈问题](https://github.com/jeecgboot/JeecgBoot/issues/new?template=bug_report.md) | [视频教程](http://jeecg.com/doc/video) | [低代码体验一分钟](https://jeecg.blog.csdn.net/article/details/106079007)
|
||||
- 在线演示: [平台演示](https://boot3.jeecg.com) | [APP演示](https://jeecg.com/appIndex)
|
||||
- 入门指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [代码生成使用](https://help.jeecg.com/java/codegen/online) | [开发文档](https://help.jeecg.com) | [AI应用手册](https://help.jeecg.com/aigc) | [视频教程](http://jeecg.com/doc/video)
|
||||
- 技术支持: [反馈问题](https://github.com/jeecgboot/JeecgBoot/issues/new?template=bug_report.md) | [低代码体验一分钟](https://jeecg.blog.csdn.net/article/details/106079007)
|
||||
- QQ交流群 : 964611995、⑩716488839(满)、⑨808791225(满)、其他(满)
|
||||
|
||||
|
||||
AI应用平台功能介绍
|
||||
AI 应用平台介绍
|
||||
-----------------------------------
|
||||
|
||||
一个全栈式 AI 开发平台,旨在帮助开发者快速构建和部署个性化的 AI 应用。
|
||||
|
||||
JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类似`Dify`的`AIGC应用开发平台`+`知识库问答`,是一款基于LLM大语言模型AI应用平台和 RAG 的知识库问答系统。
|
||||
其直观的界面结合了 AI 流程编排、RAG 管道、知识库管理、模型管理、对接向量库、实时运行可观察等,让您可以快速从原型到生产,拥有AI服务能力。 [详细专题介绍,请点击查看](README-AI.md)
|
||||
其直观的界面结合了 AI 流程编排、RAG 管道、知识库管理、模型管理、对接向量库、实时运行可观察等,让您可以快速从原型到生产,拥有AI服务能力。
|
||||
|
||||
- [详细专题介绍,请点击查看](README-AI.md)
|
||||
|
||||
- AI视频介绍
|
||||
|
||||
[](https://www.bilibili.com/video/BV1zmd7YFE4w)
|
||||
|
||||
|
||||
为什么选择JeecgBoot?
|
||||
-----------------------------------
|
||||
- 1.采用最新主流前后分离框架(Spring Boot + MyBatis + Ant Design4 + Vue3),容易上手;代码生成器依赖性低,灵活的扩展能力,可快速实现二次开发。
|
||||
- 1.采用最新主流前后分离框架(Spring Boot3 + MyBatis + Ant Design4 + Vue3),容易上手;代码生成器依赖性低,灵活的扩展能力,可快速实现二次开发。
|
||||
- 2.前端大版本换代,最新版采用 Vue3.0 + TypeScript + Vite6 + Ant Design Vue4 等新技术方案。
|
||||
- 3.支持微服务Spring Cloud Alibaba(Nacos、Gateway、Sentinel、Skywalking),提供简易机制,支持单体和微服务自由切换(这样可以满足各类项目需求)。
|
||||
- 4.开发效率高,支持在线建表和AI建表,提供强大代码生成器,单表、树列表、一对多、一对一等数据模型,增删改查功能一键生成,菜单配置直接使用。
|
||||
@ -152,10 +166,10 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
- IDE建议: IDEA (必须安装lombok插件 )
|
||||
- 语言:Java 默认jdk17(支持jdk8、jdk21)
|
||||
- 依赖管理:Maven
|
||||
- 基础框架:Spring Boot 2.7.18
|
||||
- 基础框架:Spring Boot 3.5.5/2.7.18
|
||||
- 微服务框架: Spring Cloud Alibaba 2021.0.6.2
|
||||
- 持久层框架:MybatisPlus 3.5.3.2
|
||||
- 报表工具: JimuReport 1.9.5
|
||||
- 报表工具: JimuReport 2.1.2
|
||||
- 安全框架:Apache Shiro 1.13.0,Jwt 4.5.0
|
||||
- 微服务技术栈:Spring Cloud Alibaba、Nacos、Gateway、Sentinel、Skywalking
|
||||
- 数据库连接池:阿里巴巴Druid 1.1.24
|
||||
@ -186,12 +200,6 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
|
||||
## 微服务解决方案
|
||||
|
||||
> 微服务方式快速启动
|
||||
> - [单体快速切换微服务](https://help.jeecg.com/java/springcloud/switchcloud/monomer)
|
||||
> - [Docker一键启动微服务前后端](https://help.jeecg.com/java/docker/quickcloud)
|
||||
|
||||
|
||||
|
||||
- 1、服务注册和发现 Nacos √
|
||||
- 2、统一配置中心 Nacos √
|
||||
- 3、路由网关 gateway(三种加载方式) √
|
||||
@ -219,9 +227,9 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
开源版与企业版区别?
|
||||
-----------------------------------
|
||||
|
||||
- JeecgBoot开源版采用 [Apache-2.0 license](LICENSE) 开源协议,允许商用使用,不会造成侵权行为,允许基于本平台软件开展业务系统开发(在任何情况下,您不得使用本软件开发可能被认为与本软件竞争的软件).
|
||||
- JeecgBoot开源版采用 [Apache-2.0 license](LICENSE) 协议附加补充条款:允许商用使用,不会造成侵权行为,允许基于本平台软件开展业务系统开发(但在任何情况下,您不得使用本软件开发可能被认为与本软件竞争的软件).
|
||||
- 商业版与开源版主要区别在于商业版提供了技术支持 和 更多的企业级功能(例如:Online图表、流程监控、流程设计、流程审批、表单设计器、表单视图、积木报表企业版、OA办公、商业APP、零代码应用、Online模块源码等功能). [更多商业功能介绍,点击查看](README-Enterprise.md)
|
||||
- JeecgBoot未来发展方向是:零代码平台的建设,也就是团队的另外一款产品 [敲敲云零代码](https://www.qiaoqiaoyun.com) ,无需编码即可通过拖拽快速搭建企业级应用,与JeecgBoot低代码平台形成互补,满足从简单业务到复杂系统的全场景开发需求,目前已经上线,[欢迎注册体验](https://app.qiaoqiaoyun.com)
|
||||
- JeecgBoot未来发展方向是:零代码平台的建设,也就是团队的另外一款产品 [敲敲云零代码](https://www.qiaoqiaoyun.com) ,无需编码即可通过拖拽快速搭建企业级应用,与JeecgBoot低代码平台形成互补,满足从简单业务到复杂系统的全场景开发需求,目前已经开源,[欢迎下载](https://qiaoqiaoyun.com/downloadCode)
|
||||
|
||||
|
||||
|
||||
@ -233,6 +241,10 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
|
||||
|
||||
|
||||
#### 系统功能架构图
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 开源版功能清单
|
||||
@ -241,6 +253,7 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
│ ├─用户管理
|
||||
│ ├─角色管理
|
||||
│ ├─菜单管理
|
||||
│ ├─首页配置
|
||||
│ ├─权限设置(支持按钮权限、数据权限)
|
||||
│ ├─表单权限(控制字段禁用、隐藏)
|
||||
│ ├─部门管理
|
||||
@ -251,7 +264,9 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
│ └─职务管理
|
||||
│ └─通讯录
|
||||
│ ├─多数据源管理
|
||||
│ └─多租户管理(租户管理、租户角色、我的租户)
|
||||
│ ├─白名单管理
|
||||
│ ├─第三方配置(对接钉钉和企业微信)
|
||||
│ └─多租户管理(租户管理、租户角色、我的租户、租户默认套餐管理)
|
||||
├─Online在线开发(低代码)
|
||||
│ ├─Online在线表单
|
||||
│ ├─Online代码生成器
|
||||
@ -259,6 +274,7 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
│ ├─仪表盘设计器
|
||||
│ ├─系统编码规则
|
||||
│ ├─系统校验规则
|
||||
│ ├─APP版本管理
|
||||
├─AI应用平台
|
||||
│ ├─AI知识库问答系统
|
||||
│ ├─AI大模型管理
|
||||
@ -271,10 +287,13 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
│ ├─AI聊天窗口支持移动端
|
||||
│ ├─支持常见大模型ChatGPT和DeepSeek、ollama等等
|
||||
│ ├─AI OCR示例
|
||||
├─积木报表设计器
|
||||
│ ├─打印设计器
|
||||
│ ├─数据报表设计
|
||||
│ ├─图形报表设计(支持echart)
|
||||
├─数据可视化
|
||||
│ ├─报表设计器(支持打印设计)
|
||||
│ ├─大屏设和仪表盘设计
|
||||
├─OpenAPI(基于AK和SK认证鉴权)
|
||||
│ ├─接口管理
|
||||
│ ├─接口授权
|
||||
│ ├─接口文档
|
||||
├─消息中心
|
||||
│ ├─消息管理
|
||||
│ ├─模板管理
|
||||
@ -288,8 +307,10 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
│ ├─平台移动自适应支持
|
||||
│ ├─提供新版uniapp3的代码生成器模板
|
||||
├─系统监控
|
||||
│ ├─基于AK和SK认证鉴权OpenAPI功能
|
||||
│ ├─Gateway路由网关
|
||||
│ ├─基于AK和SK认证鉴权OpenAPI功能
|
||||
│ ├─定时任务
|
||||
│ ├─数据源管理
|
||||
│ ├─性能扫描监控
|
||||
│ │ ├─监控 Redis
|
||||
│ │ ├─Tomcat
|
||||
@ -297,13 +318,11 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
│ │ ├─服务器信息
|
||||
│ │ ├─请求追踪
|
||||
│ │ ├─磁盘监控
|
||||
│ ├─定时任务
|
||||
│ ├─系统日志
|
||||
│ ├─消息中心(支持短信、邮件、微信推送等等)
|
||||
│ ├─数据日志(记录数据快照,可对比快照,查看数据变更情况)
|
||||
│ ├─系统通知
|
||||
│ ├─SQL监控
|
||||
│ ├─swagger-ui(在线接口文档)
|
||||
│ ├─在线用户
|
||||
│─报表示例
|
||||
│ ├─曲线图
|
||||
│ └─饼状图
|
||||
@ -378,9 +397,6 @@ JeecgBoot平台提供了一套完善的AI应用管理系统模块,是一套类
|
||||
|
||||
### 系统效果
|
||||
|
||||
|
||||
|
||||
|
||||
##### PC端
|
||||

|
||||
|
||||
|
||||
216
check_jeecgenv.py
Normal file
216
check_jeecgenv.py
Normal file
@ -0,0 +1,216 @@
|
||||
import os
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
from typing import Tuple, Optional
|
||||
|
||||
def run_command(cmd: str) -> Tuple[int, str]:
|
||||
"""执行命令并返回退出码和输出"""
|
||||
try:
|
||||
result = subprocess.run(cmd, shell=True, check=False,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
text=True)
|
||||
return result.returncode, result.stdout.strip()
|
||||
except Exception as e:
|
||||
return -1, str(e)
|
||||
|
||||
def check_java() -> bool:
|
||||
"""检查JDK 17+是否安装"""
|
||||
print("\n检查JDK 17+...")
|
||||
rc, output = run_command("java -version 2>&1")
|
||||
if rc != 0:
|
||||
print("❌ 未检测到Java,请安装JDK 17+")
|
||||
return False
|
||||
|
||||
version_pattern = r'"(\d+)(?:\.\d+)*(?:_\d+)?'
|
||||
match = re.search(version_pattern, output)
|
||||
if not match:
|
||||
print("❌ 无法解析Java版本")
|
||||
return False
|
||||
|
||||
version = int(match.group(1))
|
||||
if version >= 17:
|
||||
print(f"✅ JDK版本 {version} (满足17+要求)")
|
||||
return True
|
||||
else:
|
||||
print(f"❌ JDK版本 {version} (需要17+)")
|
||||
return False
|
||||
|
||||
def check_maven() -> bool:
|
||||
"""检查Maven是否安装"""
|
||||
print("\n检查Maven...")
|
||||
rc, output = run_command("mvn -v")
|
||||
if rc == 0:
|
||||
print("✅ Maven已安装")
|
||||
return True
|
||||
else:
|
||||
print("❌ Maven未安装")
|
||||
return False
|
||||
|
||||
def check_node() -> bool:
|
||||
"""检查Node.js 20+是否安装"""
|
||||
print("\n检查Node.js 20+...")
|
||||
rc, output = run_command("node -v")
|
||||
if rc != 0:
|
||||
print("❌ Node.js未安装")
|
||||
return False
|
||||
|
||||
version_pattern = r'v(\d+)\.\d+\.\d+'
|
||||
match = re.search(version_pattern, output)
|
||||
if not match:
|
||||
print("❌ 无法解析Node.js版本")
|
||||
return False
|
||||
|
||||
version = int(match.group(1))
|
||||
if version >= 20:
|
||||
print(f"✅ Node.js版本 {version} (满足20+要求)")
|
||||
return True
|
||||
else:
|
||||
print(f"❌ Node.js版本 {version} (需要20+)")
|
||||
return False
|
||||
|
||||
def check_pnpm() -> bool:
|
||||
"""检查PNPM 9+是否安装"""
|
||||
print("\n检查PNPM 9+...")
|
||||
rc, output = run_command("pnpm -v")
|
||||
if rc != 0:
|
||||
print("❌ PNPM未安装")
|
||||
return False
|
||||
|
||||
try:
|
||||
# 处理可能的版本号格式:v9.0.0 或 9.0.0 或 9
|
||||
version_str = output.strip().lstrip('v').split('.')[0]
|
||||
version = int(version_str)
|
||||
|
||||
if version >= 9:
|
||||
print(f"✅ PNPM版本 {output.strip()} (满足9+要求)")
|
||||
return True
|
||||
else:
|
||||
print(f"❌ PNPM版本 {output.strip()} (需要9+)")
|
||||
return False
|
||||
except (ValueError, IndexError):
|
||||
print(f"❌ 无法解析PNPM版本: {output.strip()}")
|
||||
return False
|
||||
|
||||
def check_redis_connection() -> bool:
|
||||
"""检查Redis连接"""
|
||||
print("\n检查Redis连接...")
|
||||
print("⚠️ 请确保已配置Redis连接信息并在jeecg-boot项目中正确配置")
|
||||
print("⚠️ 此检查需要根据实际项目配置进行验证")
|
||||
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||
return True
|
||||
|
||||
def check_mysql_connection() -> bool:
|
||||
"""检查MySQL连接"""
|
||||
print("\n检查MySQL连接...")
|
||||
print("⚠️ 请确保已配置MySQL连接信息并在jeecg-boot项目中正确配置")
|
||||
print("⚠️ 此检查需要根据实际项目配置进行验证")
|
||||
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||
return True
|
||||
|
||||
def print_mysql_config():
|
||||
"""打印MySQL配置并提示需要修改的位置"""
|
||||
print("\nMySQL配置参考 (请检查以下配置是否正确):")
|
||||
print("""
|
||||
spring.datasource.dynamic.datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root # ← 可能需要修改
|
||||
password: root # ← 可能需要修改
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
""")
|
||||
|
||||
def check_ai_vector_db() -> bool:
|
||||
"""检查AI向量库(pgvector)配置"""
|
||||
print("\n检查AI知识库向量库配置...")
|
||||
print("⚠️ 如果需要使用AI知识库功能,请配置pgvector向量库")
|
||||
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||
print("\n配置参考:")
|
||||
print("""
|
||||
jeecg.ai-rag:
|
||||
embed-store:
|
||||
host: 127.0.0.1 # ← 可能需要修改
|
||||
port: 5432 # ← 可能需要修改
|
||||
database: postgres # ← 可能需要修改
|
||||
user: postgres # ← 可能需要修改
|
||||
password: postgres # ← 可能需要修改
|
||||
table: embeddings # ← 可能需要修改
|
||||
""")
|
||||
print("⚠️ 注意: 请确保已安装PostgreSQL并添加pgvector扩展!docker安装参考:https://help.jeecg.com/aigc/config")
|
||||
return True
|
||||
|
||||
def check_ai_config() -> bool:
|
||||
"""检查AI账号配置"""
|
||||
print("\n检查AI功能配置...")
|
||||
print("⚠️ 如果需要使用AI聊天功能,请配置AI账号信息")
|
||||
print("⚠️ 配置文件位置: jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml")
|
||||
print("\n配置参考:")
|
||||
print("""
|
||||
jeecg:
|
||||
# AI集成
|
||||
ai-chat:
|
||||
enabled: true # ← 启用AI功能
|
||||
model: deepseek-chat # ← 模型名称
|
||||
apiKey: ?? # ← 必须修改为您的API Key
|
||||
apiHost: https://api.deepseek.com/v1 # ← API地址
|
||||
timeout: 60 # ← 超时时间(秒)
|
||||
""")
|
||||
print("⚠️ 注意: 请确保已获取有效的API Key并正确配置!AI账号注册获取参考: https://help.jeecg.com/java/deepSeekSupport")
|
||||
return True
|
||||
|
||||
|
||||
def print_redis_config():
|
||||
"""打印Redis配置并提示需要修改的位置"""
|
||||
print("\nRedis配置参考 (请检查以下配置是否正确):")
|
||||
print("""
|
||||
spring.redis:
|
||||
database: 0
|
||||
host: 127.0.0.1 # ← 可能需要修改
|
||||
port: 6379 # ← 可能需要修改
|
||||
password: '' # ← 如果需要密码请修改
|
||||
""")
|
||||
|
||||
def main():
|
||||
print("="*50)
|
||||
print("JeecgBoot 运行环境检查脚本")
|
||||
print("="*50)
|
||||
|
||||
all_checks_passed = True
|
||||
|
||||
# 检查各项依赖
|
||||
if not check_java():
|
||||
all_checks_passed = False
|
||||
|
||||
if not check_maven():
|
||||
all_checks_passed = False
|
||||
|
||||
if not check_node():
|
||||
all_checks_passed = False
|
||||
|
||||
if not check_pnpm():
|
||||
all_checks_passed = False
|
||||
|
||||
# 数据库提示
|
||||
print("="*50)
|
||||
check_redis_connection()
|
||||
print_redis_config()
|
||||
print("="*50)
|
||||
check_mysql_connection()
|
||||
print_mysql_config()
|
||||
print("="*50)
|
||||
check_ai_config()
|
||||
print("="*50)
|
||||
check_ai_vector_db()
|
||||
|
||||
print("\n" + "="*50)
|
||||
if all_checks_passed:
|
||||
print("✅ 所有基础环境检查通过")
|
||||
print("⚠️ 注意: 请确保Redis和MySQL、AI账号、向量库pgvector 已正确配置并连接成功")
|
||||
else:
|
||||
print("❌ 部分环境检查未通过,请根据上述提示解决问题")
|
||||
|
||||
print("="*50)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
input("\n按回车键退出...") # 等待用户输入
|
||||
@ -18,20 +18,33 @@ services:
|
||||
--max_allowed_packet=128M
|
||||
--default-authentication-plugin=caching_sha2_password
|
||||
ports:
|
||||
- 3306:3306
|
||||
- 13306:3306
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
|
||||
ports:
|
||||
- 6379:6379
|
||||
# ports:
|
||||
# - 6379:6379
|
||||
restart: always
|
||||
hostname: jeecg-boot-redis
|
||||
container_name: jeecg-boot-redis
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-pgvector:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/pgvector
|
||||
container_name: jeecg-boot-pgvector
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: vector_db
|
||||
ports:
|
||||
- 5432:5432
|
||||
restart: always
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-nacos:
|
||||
restart: always
|
||||
build:
|
||||
@ -121,6 +134,7 @@ services:
|
||||
jeecg-vue:
|
||||
build:
|
||||
context: ./jeecgboot-vue3
|
||||
dockerfile: Dockerfile.cloud
|
||||
container_name: jeecgboot-vue3-nginx
|
||||
image: jeecgboot-vue3
|
||||
depends_on:
|
||||
|
||||
@ -18,20 +18,33 @@ services:
|
||||
--max_allowed_packet=128M
|
||||
--default-authentication-plugin=caching_sha2_password
|
||||
ports:
|
||||
- 3306:3306
|
||||
- 13306:3306
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
|
||||
ports:
|
||||
- 6379:6379
|
||||
# ports:
|
||||
# - 3792:6379
|
||||
restart: always
|
||||
hostname: jeecg-boot-redis
|
||||
container_name: jeecg-boot-redis
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-pgvector:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/pgvector
|
||||
container_name: jeecg-boot-pgvector
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: vector_db
|
||||
ports:
|
||||
- 5432:5432
|
||||
restart: always
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-system:
|
||||
build:
|
||||
context: ./jeecg-boot/jeecg-module-system/jeecg-system-start
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
JeecgBoot 低代码开发平台
|
||||
===============
|
||||
|
||||
当前最新版本: 3.8.1(发布日期:2025-06-30)
|
||||
当前最新版本: 3.8.2(发布日期:2025-08-04)
|
||||
|
||||
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||
[](http://jeecg.com/aboutusIndex)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
CREATE database if NOT EXISTS `nacos` default character set utf8mb4 collate utf8mb4_general_ci;
|
||||
use `nacos`;
|
||||
|
||||
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
@ -14,7 +14,7 @@ use `nacos`;
|
||||
Target Server Version : 50738 (5.7.38)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 28/05/2025 15:48:34
|
||||
Date: 22/07/2025 10:02:59
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@ -50,7 +50,7 @@ CREATE TABLE `config_info` (
|
||||
-- Records of config_info
|
||||
-- ----------------------------
|
||||
INSERT INTO `config_info` VALUES (1, 'jeecg-dev.yaml', 'DEFAULT_GROUP', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', '68112d529219e88a44245402ccf54676', '2021-03-03 13:01:11', '2025-05-28 07:47:53', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (2, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '20596e678c211d4322ead0000c0ffdbc', '2021-03-03 13:01:42', '2025-05-19 09:51:57', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (2, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n decode-url: true\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '70bdbfdeb2651673aea0d06ed40b4ac1', '2021-03-03 13:01:42', '2025-07-22 02:00:34', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (3, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/drag/**\",\n \"_genkey_6\": \"/actuator/**\",\n \"_genkey_7\": \"/airag/**\",\n \"_genkey_8\": \"/jimubi/**\",\n \"_genkey_9\": \"/openapi/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '856da7f7ff7931c6b1932e89d87b83ba', '2021-03-03 13:02:14', '2025-05-21 05:41:09', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'json', '', '');
|
||||
INSERT INTO `config_info` VALUES (11, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n username: root\n password: root\n type: com.alibaba.druid.pool.DruidDataSource\n props:\n sql-show: true\n rules:\n sharding:\n binding-tables: sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n tables:\n sys_log:\n actual-data-nodes: ds0.sys_log$->{0..1}\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', 'a93fa455c32cd37ca84631d2bbe13005', '2022-04-13 03:12:28', '2022-08-07 13:13:57', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', NULL);
|
||||
INSERT INTO `config_info` VALUES (20, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '98e211c54b43a73f7189d92f1c77f815', '2022-08-04 16:36:11', '2024-06-11 16:13:15', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
|
||||
@ -68,7 +68,7 @@ INSERT INTO `config_info` VALUES (40, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 's
|
||||
INSERT INTO `config_info` VALUES (41, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '19d7cd93eeb85a582c8a6942d499c7f7', '2024-02-29 09:10:12', '2024-06-11 16:26:12', NULL, '0:0:0:0:0:0:0:1', '', 'efc4e412-b1a1-498f-ba01-b31807649a9a', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (42, 'jeecg-sharding-multi.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0,ds1\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n type: com.alibaba.druid.pool.DruidDataSource\n username: root\n password: root\n ds1:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot2?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n type: com.alibaba.druid.pool.DruidDataSource\n username: root\n password: root\n props:\n sql-show: true\n rules:\n replica-query:\n load-balancers:\n round-robin:\n type: ROUND_ROBIN\n props:\n default: 0\n data-sources:\n prds:\n primary-data-source-name: ds0\n replica-data-source-names: ds1\n load-balancer-name: round_robin\n sharding:\n binding-tables:\n - sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n database-inline:\n type: INLINE\n props:\n algorithm-expression: ds$->{operate_type % 2}\n tables:\n sys_log:\n actual-data-nodes: ds$->{0..1}.sys_log$->{0..1}\n database-strategy:\n standard:\n sharding-column: operate_type\n sharding-algorithm-name: database-inline\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', '0fc2b030ca8c0008f148c84ecbd2a8c7', '2024-02-29 09:10:12', '2024-02-29 09:10:12', NULL, '0:0:0:0:0:0:0:1', '', 'efc4e412-b1a1-498f-ba01-b31807649a9a', '', NULL, NULL, 'yaml', NULL, '');
|
||||
INSERT INTO `config_info` VALUES (43, 'jeecg-dev.yaml', 'DEFAULT_GROUP', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\n clean-disabled: true\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ?? \n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: false\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', 'dff588d1a47f42650e691b6621a401a8', '2024-06-22 15:11:57', '2025-05-19 09:48:01', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (44, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n # max-http-post-size: 10MB\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: metrics,httpexchanges,jeecghttptrace\n # include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '3a9678386fcd1b29874f358115b209d3', '2024-06-22 15:11:57', '2025-05-15 12:13:38', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (44, 'jeecg.yaml', 'DEFAULT_GROUP', 'server:\n undertow:\n # max-http-post-size: 10MB\n decode-url: true\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: metrics,httpexchanges,jeecghttptrace\n # include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', 'ee6593a5dbd94d90e841a466e1eee018', '2024-06-22 15:11:57', '2025-07-22 02:00:50', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', '', '', 'yaml', '', '');
|
||||
INSERT INTO `config_info` VALUES (45, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/oauth2/**\",\n \"_genkey_6\": \"/drag/**\",\n \"_genkey_7\": \"/actuator/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '9794beb09d30bc6b835f2ee870781587', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'json', NULL, '');
|
||||
INSERT INTO `config_info` VALUES (46, 'jeecg-sharding.yaml', 'DEFAULT_GROUP', 'spring:\n shardingsphere:\n datasource:\n names: ds0\n ds0:\n driverClassName: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai\n username: root\n password: root\n type: com.alibaba.druid.pool.DruidDataSource\n props:\n sql-show: true\n rules:\n sharding:\n binding-tables: sys_log\n key-generators:\n snowflake:\n type: SNOWFLAKE\n props:\n worker-id: 123\n sharding-algorithms:\n table-classbased:\n props:\n strategy: standard\n algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm\n type: CLASS_BASED\n tables:\n sys_log:\n actual-data-nodes: ds0.sys_log$->{0..1}\n table-strategy:\n standard:\n sharding-algorithm-name: table-classbased\n sharding-column: log_type', 'a93fa455c32cd37ca84631d2bbe13005', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'yaml', NULL, '');
|
||||
INSERT INTO `config_info` VALUES (47, 'jeecg-gateway-dev.yaml', 'DEFAULT_GROUP', 'jeecg:\n route:\n config:\n #type:database nacos yml\n data-type: database\n data-id: jeecg-gateway-router\nspring:\n data:\n redis:\n database: 0\n host: jeecg-boot-redis\n port: 6379\n password:\nknife4j:\n production: false', '19d7cd93eeb85a582c8a6942d499c7f7', '2024-06-22 15:11:57', '2024-06-22 15:11:57', NULL, '0:0:0:0:0:0:0:1', '', 'springboot3', '', NULL, NULL, 'yaml', NULL, '');
|
||||
@ -214,7 +214,7 @@ CREATE TABLE `his_config_info` (
|
||||
INDEX `idx_gmt_create`(`gmt_create`) USING BTREE,
|
||||
INDEX `idx_gmt_modified`(`gmt_modified`) USING BTREE,
|
||||
INDEX `idx_did`(`data_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = DYNAMIC;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of his_config_info
|
||||
@ -225,6 +225,8 @@ INSERT INTO `his_config_info` VALUES (2, 5, 'jeecg.yaml', 'DEFAULT_GROUP', '', '
|
||||
INSERT INTO `his_config_info` VALUES (1, 6, 'jeecg-dev.yaml', 'DEFAULT_GROUP', '', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n elasticsearch:\n cluster-name: jeecg-ES\n cluster-nodes: jeecg-boot-es:9200\n check-enabled: false\n file-view-domain: 127.0.0.1:8012\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', '057a1634c9b1ebda338515520bd3924a', '2010-05-05 00:00:00', '2025-05-19 12:08:56', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||
INSERT INTO `his_config_info` VALUES (3, 7, 'jeecg-gateway-router.json', 'DEFAULT_GROUP', '', '[{\n \"id\": \"jeecg-system\",\n \"order\": 0,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/sys/**\",\n \"_genkey_1\": \"/jmreport/**\",\n \"_genkey_3\": \"/online/**\",\n \"_genkey_4\": \"/generic/**\",\n \"_genkey_5\": \"/drag/**\",\n \"_genkey_6\": \"/actuator/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo\",\n \"order\": 1,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/mock/**\",\n \"_genkey_1\": \"/test/**\",\n \"_genkey_2\": \"/bigscreen/template1/**\",\n \"_genkey_3\": \"/bigscreen/template2/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb://jeecg-demo\"\n}, {\n \"id\": \"jeecg-system-websocket\",\n \"order\": 2,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/websocket/**\",\n \"_genkey_1\": \"/newsWebsocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-system\"\n}, {\n \"id\": \"jeecg-demo-websocket\",\n \"order\": 3,\n \"predicates\": [{\n \"name\": \"Path\",\n \"args\": {\n \"_genkey_0\": \"/vxeSocket/**\"\n }\n }],\n \"filters\": [],\n \"uri\": \"lb:ws://jeecg-demo\"\n}]', '708c0948118bdb96bdfaa87200a14432', '2010-05-05 00:00:00', '2025-05-21 05:41:09', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||
INSERT INTO `his_config_info` VALUES (1, 8, 'jeecg-dev.yaml', 'DEFAULT_GROUP', '', 'spring:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n allow:\n web-stat-filter:\n enabled: true\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,wall,slf4j\n wall:\n selectWhereAlwayTrueCheck: false\n stat:\n merge-sql: true\n slow-sql-millis: 5000\n datasource:\n master:\n url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai\n username: root\n password: root\n driver-class-name: com.mysql.cj.jdbc.Driver\n redis:\n database: 0\n host: jeecg-boot-redis\n password:\n port: 6379\n rabbitmq:\n host: jeecg-boot-rabbitmq\n username: guest\n password: guest\n port: 5672\n publisher-confirms: true\n publisher-returns: true\n virtual-host: /\n listener:\n simple:\n acknowledge-mode: manual\n concurrency: 1\n max-concurrency: 1\n retry:\n enabled: true\n flyway:\n enabled: false\n locations: classpath:flyway/sql/mysql\nminidao:\n base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*\njeecg:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a\n signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode\n uploadType: local\n domainUrl:\n pc: http://localhost:3100\n app: http://localhost:8051\n path:\n upload: /opt/upFiles\n webapp: /opt/webapp\n shiro:\n excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**\n oss:\n endpoint: oss-cn-beijing.aliyuncs.com\n accessKey: ??\n secretKey: ??\n bucketName: jeecgdev\n staticDomain: ??\n minio:\n minio_url: http://minio.jeecg.com\n minio_name: ??\n minio_pass: ??\n bucketName: otatest\n jmreport:\n saasMode:\n firewall:\n dataSourceSafe: false\n lowCodeMode: dev\n wps:\n domain: https://wwo.wps.cn/office/\n appid: ??\n appsecret: ??\n xxljob:\n enabled: true\n adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin\n appname: ${spring.application.name}\n accessToken: \'\'\n logPath: logs/jeecg/job/jobhandler/\n logRetentionDays: 30\n redisson:\n address: jeecg-boot-redis:6379\n password:\n type: STANDALONE\n enabled: true\n ai-chat:\n enabled: false\n apiKey: \"????\"\n apiHost: \"https://api.openai.com\"\n timeout: 60\n ai-rag:\n embed-store:\n host: 127.0.0.1\n port: 5432\n database: postgres\n user: postgres\n password: postgres\n table: embeddings\nlogging:\n level:\n org.jeecg.modules.system.mapper : info\ncas:\n prefixUrl: http://localhost:8888/cas\nknife4j:\n production: false\n basic:\n enable: false\n username: jeecg\n password: jeecg1314\njustauth:\n enabled: true\n type:\n GITHUB:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback\n WECHAT_ENTERPRISE:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback\n agent-id: ??\n DINGTALK:\n client-id: ??\n client-secret: ??\n redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback\n cache:\n type: default\n prefix: \'demo::\'\n timeout: 1h\nthird-app:\n enabled: false\n type:\n WECHAT_ENTERPRISE:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??\n DINGTALK:\n enabled: false\n client-id: ??\n client-secret: ??\n agent-id: ??', 'f1d8102a50c7b1f59458e8f9a0112012', '2010-05-05 00:00:00', '2025-05-28 07:47:53', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||
INSERT INTO `his_config_info` VALUES (2, 9, 'jeecg.yaml', 'DEFAULT_GROUP', '', 'server:\n undertow:\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '20596e678c211d4322ead0000c0ffdbc', '2010-05-05 00:00:00', '2025-07-22 02:00:34', NULL, '0:0:0:0:0:0:0:1', 'U', '', '');
|
||||
INSERT INTO `his_config_info` VALUES (44, 10, 'jeecg.yaml', 'DEFAULT_GROUP', '', 'server:\n undertow:\n # max-http-post-size: 10MB\n worker-threads: 16\n buffers:\n websocket: 8192\n io: 16384\n error:\n include-exception: true\n include-stacktrace: ALWAYS\n include-message: ALWAYS\n compression:\n enabled: true\n min-response-size: 1024\n mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*\nmanagement:\n health:\n mail:\n enabled: false\n endpoints:\n web:\n exposure:\n include: metrics,httpexchanges,jeecghttptrace\n # include: \"*\"\n health:\n sensitive: true\n endpoint:\n health:\n show-details: ALWAYS\nspring:\n servlet:\n multipart:\n max-file-size: 10MB\n max-request-size: 10MB\n mail:\n host: smtp.163.com\n username: jeecgos@163.com\n password: ??\n properties:\n mail:\n smtp:\n auth: true\n starttls:\n enable: true\n required: true\n quartz:\n job-store-type: jdbc\n initialize-schema: embedded\n auto-startup: false\n startup-delay: 1s\n overwrite-existing-jobs: true\n properties:\n org:\n quartz:\n scheduler:\n instanceName: MyScheduler\n instanceId: AUTO\n jobStore:\n class: org.springframework.scheduling.quartz.LocalDataSourceJobStore\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n misfireThreshold: 12000\n clusterCheckinInterval: 15000\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 10\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n time-zone: GMT+8\n aop:\n proxy-target-class: true\n activiti:\n check-process-definitions: false\n async-executor-activate: false\n job-executor-activate: false\n jpa:\n open-in-view: false\n freemarker:\n suffix: .ftl\n content-type: text/html\n charset: UTF-8\n cache: false\n prefer-file-system-access: false\n template-loader-path:\n - classpath:/templates\n mvc:\n static-path-pattern: /**\n pathmatch:\n matching-strategy: ant_path_matcher\n resource:\n static-locations: classpath:/static/,classpath:/public/\n autoconfigure:\n exclude:\n - com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure\n - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration\nmybatis-plus:\n mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: ASSIGN_ID\n table-underline: true\n configuration:\n call-setters-on-nulls: true', '3a9678386fcd1b29874f358115b209d3', '2010-05-05 00:00:00', '2025-07-22 02:00:50', NULL, '0:0:0:0:0:0:0:1', 'U', 'springboot3', '');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for permissions
|
||||
|
||||
BIN
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.dmp
Normal file
BIN
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.dmp
Normal file
Binary file not shown.
22621
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.sql
Normal file
22621
jeecg-boot/db/其他数据库脚本/jeecgboot-oracle11g.sql
Normal file
File diff suppressed because one or more lines are too long
18944
jeecg-boot/db/其他数据库脚本/jeecgboot-postgresql17.sql
Normal file
18944
jeecg-boot/db/其他数据库脚本/jeecgboot-postgresql17.sql
Normal file
File diff suppressed because one or more lines are too long
40804
jeecg-boot/db/其他数据库脚本/jeecgboot-sqlserver2017.sql
Normal file
40804
jeecg-boot/db/其他数据库脚本/jeecgboot-sqlserver2017.sql
Normal file
File diff suppressed because one or more lines are too long
5
jeecg-boot/db/其他数据库脚本/oracle11g dmp说明.txt
Normal file
5
jeecg-boot/db/其他数据库脚本/oracle11g dmp说明.txt
Normal file
@ -0,0 +1,5 @@
|
||||
oracle导出编码: export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
|
||||
|
||||
导出用户: jeecgbootos
|
||||
|
||||
导入命令: imp scott/tiger@orcl file=jeecgboot-oracle11g.dmp
|
||||
@ -18,7 +18,7 @@ services:
|
||||
--max_allowed_packet=128M
|
||||
--default-authentication-plugin=caching_sha2_password
|
||||
ports:
|
||||
- 3306:3306
|
||||
- 13306:3306
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
@ -32,6 +32,19 @@ services:
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-pgvector:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/pgvector
|
||||
container_name: jeecg-boot-pgvector
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: vector_db
|
||||
ports:
|
||||
- 5432:5432
|
||||
restart: always
|
||||
networks:
|
||||
- jeecg-boot
|
||||
|
||||
jeecg-boot-system:
|
||||
build:
|
||||
context: ./jeecg-module-system/jeecg-system-start
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-parent</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
@ -111,10 +111,15 @@
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-jsqlparser-4.9</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<!-- minidao -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>minidao-spring-boot-starter</artifactId>
|
||||
<artifactId>minidao-spring-boot-starter-jsqlparser-4.9</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- druid -->
|
||||
|
||||
@ -91,6 +91,12 @@ public class MessageDTO implements Serializable {
|
||||
private Boolean isTimeJob = false;
|
||||
|
||||
//---【邮件相关参数】-------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* 枚举:org.jeecg.common.constant.enums.NoticeTypeEnum
|
||||
* 通知类型(system:系统消息、file:知识库、flow:流程、plan:日程计划、meeting:会议)
|
||||
*/
|
||||
private String noticeType;
|
||||
|
||||
public MessageDTO(){
|
||||
}
|
||||
|
||||
@ -303,6 +303,11 @@ public interface CommonConstant {
|
||||
*/
|
||||
String SYS_USER_ID_MAPPING_CACHE = "sys:cache:user:id_mapping";
|
||||
|
||||
/**
|
||||
* 系统角色管理员编码
|
||||
*/
|
||||
String SYS_ROLE_ADMIN = "admin";
|
||||
|
||||
/**
|
||||
* 考勤补卡业务状态 (1:同意 2:不同意)
|
||||
*/
|
||||
@ -428,6 +433,11 @@ public interface CommonConstant {
|
||||
*/
|
||||
String NOTICE_MSG_BUS_TYPE = "NOTICE_MSG_BUS_TYPE";
|
||||
|
||||
/**
|
||||
* 通知类型,用于区分来源 file 知识 flow 流程 plan 日程 system 系统消息
|
||||
*/
|
||||
String NOTICE_TYPE = "noticeType";
|
||||
|
||||
/**
|
||||
* 邮箱消息中地址登录时地址后携带的token,需要替换成真实的token值
|
||||
*/
|
||||
@ -629,4 +639,24 @@ public interface CommonConstant {
|
||||
* 修改手机号验证码请求次数超出
|
||||
*/
|
||||
Integer PHONE_SMS_FAIL_CODE = 40002;
|
||||
|
||||
|
||||
/**
|
||||
* 自定义首页关联关系(ROLE:表示角色 USER:表示用户)
|
||||
*
|
||||
*/
|
||||
String HOME_RELATION_ROLE = "ROLE";
|
||||
String HOME_RELATION_USER = "USER";
|
||||
|
||||
/**
|
||||
* 是否置顶(0否 1是)
|
||||
*/
|
||||
Integer IZ_TOP_1 = 1;
|
||||
Integer IZ_TOP_0 = 0;
|
||||
|
||||
|
||||
//关注流程缓存前缀
|
||||
String FLOW_FOCUS_NOTICE_PREFIX = "flow:runtimeData:focus:notice:";
|
||||
//任务缓办时间缓存前缀
|
||||
String FLOW_TASK_DELAY_PREFIX = "flow:runtimeData:task:delay:";
|
||||
}
|
||||
|
||||
@ -4,6 +4,20 @@ package org.jeecg.common.constant;
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
public interface DataBaseConstant {
|
||||
|
||||
/**
|
||||
* 内置的系统变量键列表
|
||||
*/
|
||||
public static final String[] SYSTEM_KEYS = {
|
||||
DataBaseConstant.SYS_ORG_CODE, DataBaseConstant.SYS_ORG_CODE_TABLE, DataBaseConstant.SYS_MULTI_ORG_CODE,
|
||||
DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE, DataBaseConstant.SYS_ORG_ID, DataBaseConstant.SYS_ORG_ID_TABLE,
|
||||
DataBaseConstant.SYS_ROLE_CODE, DataBaseConstant.SYS_ROLE_CODE_TABLE, DataBaseConstant.SYS_USER_CODE,
|
||||
DataBaseConstant.SYS_USER_CODE_TABLE, DataBaseConstant.SYS_USER_ID, DataBaseConstant.SYS_USER_ID_TABLE,
|
||||
DataBaseConstant.SYS_USER_NAME, DataBaseConstant.SYS_USER_NAME_TABLE, DataBaseConstant.SYS_DATE,
|
||||
DataBaseConstant.SYS_DATE_TABLE, DataBaseConstant.SYS_TIME, DataBaseConstant.SYS_TIME_TABLE,
|
||||
DataBaseConstant.SYS_BASE_PATH
|
||||
};
|
||||
|
||||
//*********数据库类型****************************************
|
||||
|
||||
/**MYSQL数据库*/
|
||||
|
||||
@ -13,6 +13,10 @@ public enum EmailTemplateEnum {
|
||||
* 流程催办
|
||||
*/
|
||||
BPM_CUIBAN_EMAIL("bpm_cuiban_email", "/templates/email/bpm_cuiban_email.ftl"),
|
||||
/**
|
||||
* 流程抄送
|
||||
*/
|
||||
BPM_CC_EMAIL("bpm_cc_email", "/templates/email/bpm_cc_email.ftl"),
|
||||
/**
|
||||
* 流程新任务
|
||||
*/
|
||||
|
||||
@ -0,0 +1,75 @@
|
||||
package org.jeecg.common.constant.enums;
|
||||
|
||||
/**
|
||||
* @Description: 文件类型枚举类
|
||||
*
|
||||
* @author: wangshuai
|
||||
* @date: 2025/6/26 17:29
|
||||
*/
|
||||
public enum NoticeTypeEnum {
|
||||
|
||||
//VUE3专用
|
||||
NOTICE_TYPE_FILE("知识库消息","file"),
|
||||
NOTICE_TYPE_FLOW("工作流消息","flow"),
|
||||
NOTICE_TYPE_PLAN("日程消息","plan"),
|
||||
//暂时没用到
|
||||
NOTICE_TYPE_MEETING("会议消息","meeting"),
|
||||
NOTICE_TYPE_SYSTEM("系统消息","system");
|
||||
|
||||
/**
|
||||
* 文件类型名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 文件类型值
|
||||
*/
|
||||
private String value;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
NoticeTypeEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取聊天通知类型
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String getChatNoticeType(String value){
|
||||
return value + "Notice";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取通知名称
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String getNoticeNameByValue(String value){
|
||||
value = value.replace("Notice","");
|
||||
for (NoticeTypeEnum e : NoticeTypeEnum.values()) {
|
||||
if (e.getValue().equals(value)) {
|
||||
return e.getName();
|
||||
}
|
||||
}
|
||||
return "系统消息";
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import org.apache.commons.beanutils.PropertyUtils;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.DataBaseConstant;
|
||||
@ -257,8 +258,69 @@ public class QueryGenerator {
|
||||
if(parameterMap!=null&& parameterMap.containsKey(ORDER_TYPE)) {
|
||||
order = parameterMap.get(ORDER_TYPE)[0];
|
||||
}
|
||||
log.debug("排序规则>>列:" + column + ",排序方式:" + order);
|
||||
|
||||
if(oConvertUtils.isNotEmpty(column)){
|
||||
log.info("单字段排序规则>> column:" + column + ",排序方式:" + order);
|
||||
}
|
||||
|
||||
// 1. 列表多字段排序优先
|
||||
if(parameterMap!=null&& parameterMap.containsKey("sortInfoString")) {
|
||||
// 多字段排序
|
||||
String sortInfoString = parameterMap.get("sortInfoString")[0];
|
||||
log.info("多字段排序规则>> sortInfoString:" + sortInfoString);
|
||||
List<OrderItem> orderItemList = SqlConcatUtil.getQueryConditionOrders(column, order, sortInfoString);
|
||||
log.info(orderItemList.toString());
|
||||
if (orderItemList != null && !orderItemList.isEmpty()) {
|
||||
for (OrderItem item : orderItemList) {
|
||||
// 一、获取排序数据库字段
|
||||
String columnName = item.getColumn();
|
||||
// 1.字典字段,去掉字典翻译文本后缀
|
||||
if(columnName.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) {
|
||||
columnName = columnName.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX));
|
||||
}
|
||||
// 2.实体驼峰字段转为数据库字段
|
||||
columnName = SqlInjectionUtil.getSqlInjectSortField(columnName);
|
||||
|
||||
// 二、设置字段排序规则
|
||||
if (item.isAsc()) {
|
||||
queryWrapper.orderByAsc(columnName);
|
||||
} else {
|
||||
queryWrapper.orderByDesc(columnName);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 列表单字段默认排序
|
||||
if(oConvertUtils.isEmpty(column) && parameterMap!=null&& parameterMap.containsKey("defSortString")) {
|
||||
// 多字段排序
|
||||
String sortInfoString = parameterMap.get("defSortString")[0];
|
||||
log.info("默认多字段排序规则>> defSortString:" + sortInfoString);
|
||||
List<OrderItem> orderItemList = SqlConcatUtil.getQueryConditionOrders(column, order, sortInfoString);
|
||||
log.info(orderItemList.toString());
|
||||
if (orderItemList != null && !orderItemList.isEmpty()) {
|
||||
for (OrderItem item : orderItemList) {
|
||||
// 一、获取排序数据库字段
|
||||
String columnName = item.getColumn();
|
||||
// 1.字典字段,去掉字典翻译文本后缀
|
||||
if(columnName.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) {
|
||||
columnName = columnName.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX));
|
||||
}
|
||||
// 2.实体驼峰字段转为数据库字段
|
||||
columnName = SqlInjectionUtil.getSqlInjectSortField(columnName);
|
||||
|
||||
// 二、设置字段排序规则
|
||||
if (item.isAsc()) {
|
||||
queryWrapper.orderByAsc(columnName);
|
||||
} else {
|
||||
queryWrapper.orderByDesc(columnName);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//update-begin-author:scott date:2022-11-07 for:避免用户自定义表无默认字段{创建时间},导致排序报错
|
||||
//TODO 避免用户自定义表无默认字段创建时间,导致排序报错
|
||||
if(DataBaseConstant.CREATE_TIME.equals(column) && !fieldColumnMap.containsKey(DataBaseConstant.CREATE_TIME)){
|
||||
|
||||
@ -1,13 +1,22 @@
|
||||
package org.jeecg.common.system.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.DataBaseConstant;
|
||||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.CommonUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -239,5 +248,47 @@ public class SqlConcatUtil {
|
||||
private static String getDbType() {
|
||||
return CommonUtils.getDatabaseType();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取前端传过来的 "多字段排序信息: sortInfoString"
|
||||
* @return
|
||||
*/
|
||||
public static List<OrderItem> getQueryConditionOrders(String column, String order, String queryInfoString){
|
||||
List<OrderItem> list = new ArrayList<>();
|
||||
if(oConvertUtils.isEmpty(queryInfoString)){
|
||||
//默认以创建时间倒序查询
|
||||
if(CommonConstant.ORDER_TYPE_DESC.equalsIgnoreCase(order)){
|
||||
list.add(OrderItem.desc(column));
|
||||
}else{
|
||||
list.add(OrderItem.asc(column));
|
||||
}
|
||||
}else{
|
||||
// 【TV360X-967】URL解码(微服务下需要)
|
||||
if (queryInfoString.contains("%22column%22")) {
|
||||
log.info("queryInfoString 原生 = {}", queryInfoString);
|
||||
try {
|
||||
queryInfoString = URLDecoder.decode(queryInfoString, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new JeecgBootException(e);
|
||||
}
|
||||
log.info("queryInfoString 解码 = {}", queryInfoString);
|
||||
}
|
||||
JSONArray array = JSONArray.parseArray(queryInfoString);
|
||||
Iterator it = array.iterator();
|
||||
while(it.hasNext()){
|
||||
JSONObject json = (JSONObject)it.next();
|
||||
String tempColumn = json.getString("column");
|
||||
if(oConvertUtils.isNotEmpty(tempColumn)){
|
||||
String tempOrder = json.getString("order");
|
||||
if(CommonConstant.ORDER_TYPE_DESC.equalsIgnoreCase(tempOrder)){
|
||||
list.add(OrderItem.desc(tempColumn));
|
||||
}else{
|
||||
list.add(OrderItem.asc(tempColumn));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -68,6 +68,12 @@ public class LoginUser {
|
||||
@SensitiveField
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@SensitiveField
|
||||
private String workNo;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
|
||||
@ -8,6 +8,7 @@ import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
@ -16,6 +17,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
* @Description: spring上下文工具类
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Lazy(false)
|
||||
@Component
|
||||
public class SpringContextUtils implements ApplicationContextAware {
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ public class SsrfFileTypeFilter {
|
||||
FILE_TYPE_WHITE_LIST.add("bmp");
|
||||
FILE_TYPE_WHITE_LIST.add("svg");
|
||||
FILE_TYPE_WHITE_LIST.add("ico");
|
||||
FILE_TYPE_WHITE_LIST.add("heic");
|
||||
|
||||
//文本文件
|
||||
FILE_TYPE_WHITE_LIST.add("txt");
|
||||
|
||||
@ -70,7 +70,12 @@ public class JeecgBaseConfig {
|
||||
/**
|
||||
* 百度开放API配置
|
||||
*/
|
||||
private BaiduApi baiduApi;
|
||||
private BaiduApi baiduApi;
|
||||
|
||||
/**
|
||||
* 高德开放API配置
|
||||
*/
|
||||
private GaoDeApi gaoDeApi;
|
||||
|
||||
public String getCustomResourcePrefixPath() {
|
||||
return customResourcePrefixPath;
|
||||
@ -168,4 +173,11 @@ public class JeecgBaseConfig {
|
||||
this.baiduApi = baiduApi;
|
||||
}
|
||||
|
||||
public GaoDeApi getGaoDeApi() {
|
||||
return gaoDeApi;
|
||||
}
|
||||
|
||||
public void setGaoDeApi(GaoDeApi gaoDeApi) {
|
||||
this.gaoDeApi = gaoDeApi;
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,17 +68,15 @@ public class Swagger3Config implements WebMvcConfigurer {
|
||||
openApi.getPaths().forEach((path, pathItem) -> {
|
||||
//log.debug("path: {}", path);
|
||||
// 检查当前路径是否在排除列表中
|
||||
boolean isExcluded = excludedPaths.stream().anyMatch(excludedPath ->
|
||||
excludedPath.equals(path) ||
|
||||
(excludedPath.endsWith("**") && path.startsWith(excludedPath.substring(0, excludedPath.length() - 2)))
|
||||
boolean isExcluded = excludedPaths.stream().anyMatch(
|
||||
excludedPath -> excludedPath.equals(path) || (excludedPath.endsWith("**") && path.startsWith(excludedPath.substring(0, excludedPath.length() - 2)))
|
||||
);
|
||||
|
||||
if (!isExcluded) {
|
||||
// 接口添加鉴权参数
|
||||
pathItem.readOperations()
|
||||
.forEach(operation ->
|
||||
operation.addSecurityItem(new SecurityRequirement().addList(CommonConstant.X_ACCESS_TOKEN))
|
||||
);
|
||||
pathItem.readOperations().forEach(operation ->
|
||||
operation.addSecurityItem(new SecurityRequirement().addList(CommonConstant.X_ACCESS_TOKEN))
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -90,7 +88,7 @@ public class Swagger3Config implements WebMvcConfigurer {
|
||||
return new OpenAPI()
|
||||
.info(new Info()
|
||||
.title("JeecgBoot 后台服务API接口文档")
|
||||
.version("3.8.1")
|
||||
.version("3.8.2")
|
||||
.contact(new Contact().name("北京国炬信息技术有限公司").url("www.jeccg.com").email("jeecgos@163.com"))
|
||||
.description( "后台API接口")
|
||||
.termsOfService("NO terms of service")
|
||||
|
||||
@ -88,7 +88,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
|
||||
*/
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
registry.addViewController("/").setViewName("doc.html");
|
||||
registry.addViewController("/").setViewName("redirect:/doc.html");
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@ -11,7 +11,6 @@ import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.CommonUtils;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.config.JeecgBaseConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
@ -50,14 +49,12 @@ public class LowCodeModeInterceptor implements HandlerInterceptor {
|
||||
@Resource
|
||||
private JeecgBaseConfig jeecgBaseConfig;
|
||||
|
||||
@Autowired(required = false)
|
||||
private CommonAPI commonAPI;
|
||||
|
||||
/**
|
||||
* 在请求处理之前进行调用
|
||||
*/
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
||||
CommonAPI commonAPI = null;
|
||||
log.info("低代码模式,拦截请求路径:" + request.getRequestURI());
|
||||
|
||||
//1、验证是否开启低代码开发模式控制
|
||||
|
||||
@ -1,11 +1,16 @@
|
||||
package org.jeecg.config.mybatis;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.toolkit.JdbcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.log.Log;
|
||||
import org.jeecg.common.config.TenantContext;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.TenantConstant;
|
||||
@ -13,6 +18,7 @@ import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.common.util.TokenUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@ -23,16 +29,20 @@ import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerIntercept
|
||||
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* 单数据源配置(jeecg.datasource.open = false时生效)
|
||||
* @Author zhoujf
|
||||
*
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@MapperScan(value={"org.jeecg.**.mapper*"})
|
||||
public class MybatisPlusSaasConfig {
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
/**
|
||||
* 是否开启系统模块的租户隔离
|
||||
* 控制范围:用户、角色、部门、我的部门、字典、分类字典、多数据源、职务、通知公告
|
||||
@ -122,7 +132,23 @@ public class MybatisPlusSaasConfig {
|
||||
//update-begin-author:zyf date:20220425 for:【VUEN-606】注入动态表名适配拦截器解决多表名问题
|
||||
interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor());
|
||||
//update-end-author:zyf date:20220425 for:【VUEN-606】注入动态表名适配拦截器解决多表名问题
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
||||
|
||||
//update-begin---author:scott ---date:2025-08-02 for:【issues/8666】升级mybatisPlus后SqlServer分页使用OFFSET ? ROWS FETCH NEXT ? ROWS ONLY,导致online报表报错---
|
||||
DbType dbType = null;
|
||||
try {
|
||||
dbType = JdbcUtils.getDbType(dataSource.getConnection().getMetaData().getURL());
|
||||
log.info("当前数据库类型: {}", dbType);
|
||||
} catch (SQLException e) {
|
||||
Log.error(e.getMessage(), e);
|
||||
}
|
||||
if (dbType!=null && (dbType == DbType.SQL_SERVER || dbType == DbType.SQL_SERVER2005)) {
|
||||
// 如果是SQL Server则覆盖为2005分页方式
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.SQL_SERVER2005));
|
||||
} else {
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
||||
}
|
||||
//update-end---author:scott ---date::2025-08-02 for:【issues/8666】升级mybatisPlus后SqlServer分页使用OFFSET ? ROWS FETCH NEXT ? ROWS ONLY,导致online报表报错---
|
||||
|
||||
//【jeecg-boot/issues/3847】增加@Version乐观锁支持
|
||||
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
||||
return interceptor;
|
||||
|
||||
@ -109,7 +109,7 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
|
||||
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
||||
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
|
||||
|
||||
filterChainDefinitionMap.put("/openapi/call/**", "anon"); // 开放平台接口排除
|
||||
|
||||
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
||||
filterChainDefinitionMap.put("/", "anon");
|
||||
@ -153,7 +153,11 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/drag/share/view/**", "anon");
|
||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getAllChartData", "anon");
|
||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getTotalData", "anon");
|
||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getMapDataByCode", "anon");
|
||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getTotalDataByCompId", "anon");
|
||||
filterChainDefinitionMap.put("/drag/mock/json/**", "anon");
|
||||
filterChainDefinitionMap.put("/drag/onlDragDatasetHead/getDictByCodes", "anon");
|
||||
|
||||
filterChainDefinitionMap.put("/jimubi/view", "anon");
|
||||
filterChainDefinitionMap.put("/jimubi/share/view/**", "anon");
|
||||
|
||||
@ -169,7 +173,11 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/websocket/**", "anon");//系统通知和公告
|
||||
filterChainDefinitionMap.put("/newsWebsocket/**", "anon");//CMS模块
|
||||
filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
|
||||
|
||||
//App vue3版本查询版本接口
|
||||
filterChainDefinitionMap.put("/sys/version/app3version", "anon");
|
||||
//仪表盘(按钮通信)
|
||||
filterChainDefinitionMap.put("/dragChannelSocket/**","anon");
|
||||
|
||||
//性能监控——安全隐患泄露TOEKN(durid连接池也有)
|
||||
//filterChainDefinitionMap.put("/actuator/**", "anon");
|
||||
//测试模块排除
|
||||
@ -179,9 +187,7 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/error", "anon");
|
||||
// 企业微信证书排除
|
||||
filterChainDefinitionMap.put("/WW_verify*", "anon");
|
||||
|
||||
filterChainDefinitionMap.put("/openapi/call/**", "anon");
|
||||
|
||||
|
||||
// 添加自己的过滤器并且取名为jwt
|
||||
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
||||
//如果cloudServer为空 则说明是单体 需要加载跨域配置【微服务跨域切换】
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package org.jeecg.config.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: 高德开放api配置
|
||||
*
|
||||
* @author: wangshuai
|
||||
* @date: 2025/7/17 20:32
|
||||
*/
|
||||
@Data
|
||||
public class GaoDeApi {
|
||||
/**应用key*/
|
||||
private String apiKey;
|
||||
/**应用秘钥*/
|
||||
private String secretKey;
|
||||
}
|
||||
@ -1,3 +1,2 @@
|
||||
springdoc.auto-tag-classes: false
|
||||
springdoc.packages-to-scan: org.jeecg
|
||||
springdoc.default-flat-param-object: true
|
||||
springdoc.packages-to-scan: org.jeecg
|
||||
@ -0,0 +1,104 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="box-content">
|
||||
<div class="info-top">
|
||||
<img src="https://www.jeecg.com/images/logo.png" style="float: left; margin: 0 10px 0 0; width: 32px;height:32px" /><div style="color:#fff"><strong>【重要】流程抄送的通知</strong></div>
|
||||
</div>
|
||||
<div class="info-wrap">
|
||||
<div class="tips" style="padding:15px;">
|
||||
<p style="margin: 10px 0;">
|
||||
您好,您有一个新的流程抄送任务亟待查看,任务内容如下::
|
||||
</p>
|
||||
<table style="width: 400px; border-spacing: 0px; border-collapse: collapse; border: none; margin-top: 20px;"><tbody>
|
||||
<tr style="height: 45px;">
|
||||
<td style="width: 150px; height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
流程名称
|
||||
</td>
|
||||
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
${bpm_name}<a style="color: #006eff;" href="${url}" target="_blank" rel="noopener">[立刻查看]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 45px;">
|
||||
<td style="width: 150px;height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
抄送任务
|
||||
</td>
|
||||
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
${bpm_task}
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 45px;">
|
||||
<td style="width: 150px; height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
抄送时间
|
||||
</td>
|
||||
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
${datetime}
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 45px;">
|
||||
<td style="width: 150px; height: 40px; background: #F6F6F6;border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
抄送内容
|
||||
</td>
|
||||
<td style="width: 250px;height: 40px; border: 1px solid #DBDBDB; font-size: 14px; font-weight: normal; text-align: left; padding-left: 14px;">
|
||||
${remark}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="footer">北京国炬平台</div>
|
||||
</div>
|
||||
<div style="margin-top: 60px;margin-bottom: 10px;">
|
||||
<span style="font-size: 13px; font-weight: bold; color: #666;">温馨提醒</span>
|
||||
<div style="line-height: 24px; margin-top: 10px;">
|
||||
<div style="font-size: 13px; color: #666;">使用过程中如有任何问题,请联系系统管理员。</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 600px; margin: 0 auto; margin-top: 50px; font-size: 12px; -webkit-font-smoothing: subpixel-antialiased; text-size-adjust: 100%;">
|
||||
<p style="text-align: center; line-height: 20.4px; text-size-adjust: 100%; font-family: 'Microsoft YaHei'!important; padding: 0px !important; margin: 0px !important; color: #7e8890 !important;">
|
||||
<span class="appleLinks">Copyright © 2023-2024 北京国炬信息技术有限公司. 保留所有权利。</span>
|
||||
</p>
|
||||
<p style="text-align: center;line-height: 20.4px; text-size-adjust: 100%; font-family: 'Microsoft YaHei'!important; padding: 0px !important; margin: 0px; color: #7e8890 !important; margin-top: 10px;">
|
||||
<span class="appleLinks">邮件由系统自动发送,请勿直接回复本邮件!</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<style>
|
||||
.box-content{
|
||||
width: 80%;
|
||||
margin: 20px auto;
|
||||
max-width: 800px;
|
||||
min-width: 600px;
|
||||
}
|
||||
|
||||
.info-top{
|
||||
padding: 15px 25px;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
background: #4ea3f2;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.info-wrap{
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
border:1px solid #ddd;
|
||||
overflow: hidden;
|
||||
padding: 15px 15px 20px;
|
||||
}
|
||||
|
||||
.footer{
|
||||
text-align: right;
|
||||
color: #999;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</html>
|
||||
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-module</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jeecg-boot-module-airag</artifactId>
|
||||
@ -151,9 +151,9 @@
|
||||
</dependency>
|
||||
<!-- langChain4j vextor support -->
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>langchain4j-pgvector</artifactId>
|
||||
<version>${langchain4j.version}</version>
|
||||
<version>0.35.0</version>
|
||||
</dependency>
|
||||
<!-- langChain4j Document Parser -->
|
||||
<dependency>
|
||||
|
||||
@ -836,7 +836,7 @@ public class AiragChatServiceImpl implements IAiragChatService {
|
||||
closeSSE(emitter, eventData);
|
||||
//update-end---author:chenrui ---date:20250425 for:[QQYUN-12203]AI 聊天,超时或者服务器报错,给个友好提示------------
|
||||
} else {
|
||||
errMsg = "调用大模型接口失败:" + errMsg;
|
||||
errMsg = "调用大模型接口失败,详情请查看后台日志。";
|
||||
EventData eventData = new EventData(requestId, null, EventData.EVENT_FLOW_ERROR, chatConversation.getId(), topicId);
|
||||
eventData.setData(EventFlowData.builder().success(false).message(errMsg).build());
|
||||
closeSSE(emitter, eventData);
|
||||
|
||||
@ -1,82 +1,82 @@
|
||||
package org.jeecg.modules.airag.test;
|
||||
|
||||
import dev.langchain4j.data.document.Document;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.tika.parser.AutoDetectParser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.airag.llm.document.TikaDocumentParser;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.wildfly.common.Assert;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Description: 文件解析测试
|
||||
* @Author: chenrui
|
||||
* @Date: 2025/2/11 16:11
|
||||
*/
|
||||
@Slf4j
|
||||
public class TestFileParse {
|
||||
|
||||
@Test
|
||||
public void testParseTxt() {
|
||||
readFile("test.txt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParsePdf() {
|
||||
readFile("test.pdf");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseMd() {
|
||||
readFile("test.md");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseDoc() {
|
||||
readFile("test.docx");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseDoc2003() {
|
||||
readFile("test.doc");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseExcel() {
|
||||
readFile("test.xlsx");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseExcel2003() {
|
||||
readFile("test.xls");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParsePPT() {
|
||||
readFile("test.pptx");
|
||||
}
|
||||
@Test
|
||||
public void testParsePPT2003() {
|
||||
readFile("test.ppt");
|
||||
}
|
||||
|
||||
private static void readFile(String filePath) {
|
||||
try {
|
||||
ClassPathResource resource = new ClassPathResource(filePath);
|
||||
File file = resource.getFile();
|
||||
TikaDocumentParser parser = new TikaDocumentParser(AutoDetectParser::new, null, null, null);
|
||||
Document document = parser.parse(file);
|
||||
Assert.assertNotNull(document);
|
||||
System.out.println(filePath + "----" + document.text());
|
||||
Assert.assertTrue(oConvertUtils.isNotEmpty(document));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//package org.jeecg.modules.airag.test;
|
||||
//
|
||||
//import dev.langchain4j.data.document.Document;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.apache.tika.parser.AutoDetectParser;
|
||||
//import org.jeecg.common.util.oConvertUtils;
|
||||
//import org.jeecg.modules.airag.llm.document.TikaDocumentParser;
|
||||
//import org.junit.jupiter.api.Test;
|
||||
//import org.springframework.core.io.ClassPathResource;
|
||||
//import org.wildfly.common.Assert;
|
||||
//
|
||||
//import java.io.File;
|
||||
//import java.io.IOException;
|
||||
//
|
||||
///**
|
||||
// * @Description: 文件解析测试
|
||||
// * @Author: chenrui
|
||||
// * @Date: 2025/2/11 16:11
|
||||
// */
|
||||
//@Slf4j
|
||||
//public class TestFileParse {
|
||||
//
|
||||
// @Test
|
||||
// public void testParseTxt() {
|
||||
// readFile("test.txt");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParsePdf() {
|
||||
// readFile("test.pdf");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParseMd() {
|
||||
// readFile("test.md");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParseDoc() {
|
||||
// readFile("test.docx");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParseDoc2003() {
|
||||
// readFile("test.doc");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParseExcel() {
|
||||
// readFile("test.xlsx");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParseExcel2003() {
|
||||
// readFile("test.xls");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testParsePPT() {
|
||||
// readFile("test.pptx");
|
||||
// }
|
||||
// @Test
|
||||
// public void testParsePPT2003() {
|
||||
// readFile("test.ppt");
|
||||
// }
|
||||
//
|
||||
// private static void readFile(String filePath) {
|
||||
// try {
|
||||
// ClassPathResource resource = new ClassPathResource(filePath);
|
||||
// File file = resource.getFile();
|
||||
// TikaDocumentParser parser = new TikaDocumentParser(AutoDetectParser::new, null, null, null);
|
||||
// Document document = parser.parse(file);
|
||||
// Assert.assertNotNull(document);
|
||||
// System.out.println(filePath + "----" + document.text());
|
||||
// Assert.assertTrue(oConvertUtils.isNotEmpty(document));
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
@ -1,54 +1,54 @@
|
||||
package org.jeecg.modules.airag.test;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Description: 流程测试
|
||||
* @Author: chenrui
|
||||
* @Date: 2025/2/11 16:11
|
||||
*/
|
||||
@Slf4j
|
||||
public class TestFlows {
|
||||
|
||||
@Test
|
||||
public void testRunFlow(){
|
||||
String id = "1889499701976358913";
|
||||
// String id = "1889571074002247682"; //switch
|
||||
// String id = "1889608218175463425"; //脚本
|
||||
String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3Mzk1NDY0NDIsInVzZXJuYW1lIjoiamVlY2cifQ.CFIV79PUYmOAiqBKT3yjwihHWwf954DvS-4oKERmJVU";
|
||||
String request = request(id,token);
|
||||
System.out.println(request);
|
||||
}
|
||||
|
||||
private String request(String id,String token) {
|
||||
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
|
||||
Request request = new Request.Builder()
|
||||
.url("http://localhost:7008/airag/airagFlow/flow/run/" + id + "?field1=%25E5%2593%2588%25E5%2593%2588&field2=%25E4%25B8%25AD%25E5%259B%25BD")
|
||||
.get()
|
||||
.addHeader("X-Access-Token", token)
|
||||
.addHeader("Accept", "*/*")
|
||||
.addHeader("Accept-Encoding", "gzip, deflate, br")
|
||||
.addHeader("User-Agent", "PostmanRuntime-ApipostRuntime/1.1.0")
|
||||
.addHeader("Connection", "keep-alive")
|
||||
.addHeader("Cookie", "JSESSIONID=442C48D3D1D0B2878A597AB6EBF2A07E")
|
||||
.build();
|
||||
|
||||
try {
|
||||
Response response = client.newCall(request).execute();
|
||||
return response.body().string();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO author: chenrui for:完善用例,使用java方式调用 date:2025/2/14
|
||||
|
||||
}
|
||||
//package org.jeecg.modules.airag.test;
|
||||
//
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import okhttp3.OkHttpClient;
|
||||
//import okhttp3.Request;
|
||||
//import okhttp3.Response;
|
||||
//import org.junit.jupiter.api.Test;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//
|
||||
///**
|
||||
// * @Description: 流程测试
|
||||
// * @Author: chenrui
|
||||
// * @Date: 2025/2/11 16:11
|
||||
// */
|
||||
//@Slf4j
|
||||
//public class TestFlows {
|
||||
//
|
||||
// @Test
|
||||
// public void testRunFlow(){
|
||||
// String id = "1889499701976358913";
|
||||
//// String id = "1889571074002247682"; //switch
|
||||
//// String id = "1889608218175463425"; //脚本
|
||||
// String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3Mzk1NDY0NDIsInVzZXJuYW1lIjoiamVlY2cifQ.CFIV79PUYmOAiqBKT3yjwihHWwf954DvS-4oKERmJVU";
|
||||
// String request = request(id,token);
|
||||
// System.out.println(request);
|
||||
// }
|
||||
//
|
||||
// private String request(String id,String token) {
|
||||
//
|
||||
// OkHttpClient client = new OkHttpClient();
|
||||
//
|
||||
// Request request = new Request.Builder()
|
||||
// .url("http://localhost:7008/airag/airagFlow/flow/run/" + id + "?field1=%25E5%2593%2588%25E5%2593%2588&field2=%25E4%25B8%25AD%25E5%259B%25BD")
|
||||
// .get()
|
||||
// .addHeader("X-Access-Token", token)
|
||||
// .addHeader("Accept", "*/*")
|
||||
// .addHeader("Accept-Encoding", "gzip, deflate, br")
|
||||
// .addHeader("User-Agent", "PostmanRuntime-ApipostRuntime/1.1.0")
|
||||
// .addHeader("Connection", "keep-alive")
|
||||
// .addHeader("Cookie", "JSESSIONID=442C48D3D1D0B2878A597AB6EBF2A07E")
|
||||
// .build();
|
||||
//
|
||||
// try {
|
||||
// Response response = client.newCall(request).execute();
|
||||
// return response.body().string();
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // TODO author: chenrui for:完善用例,使用java方式调用 date:2025/2/14
|
||||
//
|
||||
//}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-module</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-parent</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-system-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.constant.enums.DySmsEnum;
|
||||
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
||||
import org.jeecg.common.desensitization.annotation.SensitiveDecode;
|
||||
import org.jeecg.common.system.api.factory.SysBaseAPIFallbackFactory;
|
||||
@ -523,6 +524,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
*/
|
||||
@GetMapping("/sys/api/sendHtmlTemplateEmail")
|
||||
void sendHtmlTemplateEmail(@RequestParam("email") String email, @RequestParam("title") String title, @RequestParam("emailEnum") EmailTemplateEnum emailTemplateEnum, @RequestParam("params") JSONObject params);
|
||||
/**
|
||||
/**
|
||||
* 发送短信消息
|
||||
*
|
||||
* @param phone 手机号码
|
||||
* @param params 模版参数
|
||||
* @param dySmsEnum 短信模版枚举
|
||||
*/
|
||||
@GetMapping("/sys/api/sendSmsMsg")
|
||||
void sendSmsMsg(@RequestParam("phone") String phone, @RequestParam("params") JSONObject params,@RequestParam("dySmsEnum") DySmsEnum dySmsEnum);
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户id
|
||||
* @param orgCode 部门编号
|
||||
@ -791,5 +802,17 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
||||
@RequestParam(value = "fields", required = false) String... fields
|
||||
);
|
||||
/**
|
||||
* 自动发布通告
|
||||
*
|
||||
* @param dataId 通告ID
|
||||
* @param currentUserName 发送人
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/announcementAutoRelease")
|
||||
void announcementAutoRelease(
|
||||
@RequestParam("dataId") String dataId,
|
||||
@RequestParam(value = "currentUserName") String currentUserName
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.constant.enums.DySmsEnum;
|
||||
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
@ -341,6 +342,11 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendSmsMsg(String phone, JSONObject params, DySmsEnum dySmsEnum) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> getDeptUserByOrgCode(String orgCode) {
|
||||
return null;
|
||||
@ -464,4 +470,9 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void announcementAutoRelease(String dataId, String currentUserName) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-system-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import org.jeecg.common.api.CommonAPI;
|
||||
import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.constant.enums.DySmsEnum;
|
||||
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
|
||||
@ -398,7 +399,13 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getDeptUserByOrgCode(String orgCode);
|
||||
|
||||
/**
|
||||
* 42 发送短信消息
|
||||
* @param phone 手机号
|
||||
* @param param 模版参数
|
||||
* @param dySmsEnum 短信模版
|
||||
*/
|
||||
void sendSmsMsg(String phone, JSONObject param, DySmsEnum dySmsEnum);
|
||||
/**
|
||||
* 查询分类字典翻译
|
||||
* @param ids 多个分类字典id
|
||||
@ -544,4 +551,10 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
*/
|
||||
boolean dictTableWhiteListCheckByDict(String tableOrDictCode, String... fields);
|
||||
|
||||
/**
|
||||
* 消息自动发布
|
||||
* @param dataId
|
||||
* @param currentUserName
|
||||
*/
|
||||
void announcementAutoRelease(String dataId, String currentUserName);
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-module-system</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-module-system</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -40,10 +40,16 @@
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- mongo、redis和文件数据集支持包,按需引入 -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-nosql-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- 后台导出接口Echart图表支持包,按需引入
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-echarts-starter</artifactId>
|
||||
</dependency> -->
|
||||
<!-- 积木BI -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
|
||||
@ -57,7 +57,7 @@ public class CodeTemplateInitListener implements ApplicationListener<Application
|
||||
|
||||
// 非jar模式不生成模板
|
||||
// 不生成目录,只生成具体模板文件
|
||||
if (!filepath.contains(".jar!/BOOT-INF/lib/") || !createFilePath.contains(".")) {
|
||||
if ((!filepath.contains(".jar!/BOOT-INF/lib/") && !filepath.contains(".jar/!BOOT-INF/lib/")) || !createFilePath.contains(".")) {
|
||||
continue;
|
||||
}
|
||||
if (!FileUtil.exist(createFilePath)) {
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package org.jeecg.config.init;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* Shiro缓存清理
|
||||
* 在应用启动时清除所有的Shiro授权缓存
|
||||
* 主要用于解决重启项目,用户未重新登录,按钮权限不生效的问题
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ShiroCacheClearRunner implements ApplicationRunner {
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
// 清空所有授权redis缓存
|
||||
log.info("———————清空所有用户授权缓存———————clearAllCache——————— ");
|
||||
redisUtil.removeAll(CommonConstant.PREFIX_USER_SHIRO_CACHE);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package org.jeecg.config.init;
|
||||
|
||||
import io.undertow.UndertowOptions;
|
||||
import io.undertow.server.DefaultByteBufferPool;
|
||||
import io.undertow.server.handlers.BlockingHandler;
|
||||
import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
|
||||
@ -26,6 +27,11 @@ public class UndertowConfiguration implements WebServerFactoryCustomizer<Underto
|
||||
|
||||
@Override
|
||||
public void customize(UndertowServletWebServerFactory factory) {
|
||||
// 设置 Undertow 服务器参数(底层网络配置)
|
||||
factory.addBuilderCustomizers(builder -> {
|
||||
builder.setServerOption(UndertowOptions.MAX_HEADER_SIZE, 65536); // header 最大64KB
|
||||
builder.setServerOption(UndertowOptions.MAX_PARAMETERS, 10000); // 最大参数数
|
||||
});
|
||||
factory.addDeploymentInfoCustomizers(deploymentInfo -> {
|
||||
|
||||
WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
|
||||
|
||||
@ -6,6 +6,8 @@ import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.enums.DySmsEnum;
|
||||
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
||||
import org.jeecg.common.desensitization.util.SensitiveInfoUtil;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
import org.jeecg.modules.system.service.ISysUserService;
|
||||
@ -578,6 +580,27 @@ public class SystemApiController {
|
||||
public void sendEmailMsg(@RequestParam("email")String email,@RequestParam("title")String title,@RequestParam("content")String content){
|
||||
this.sysBaseApi.sendEmailMsg(email,title,content);
|
||||
};
|
||||
/**
|
||||
* 发送html模版邮件消息
|
||||
* @param email
|
||||
* @param title
|
||||
* @param emailTemplateEnum 邮件模版枚举
|
||||
* @param params 模版参数
|
||||
*/
|
||||
@GetMapping("/sendHtmlTemplateEmail")
|
||||
public void sendHtmlTemplateEmail(@RequestParam("email")String email, @RequestParam("title")String title, @RequestParam("emailEnum") EmailTemplateEnum emailTemplateEnum, @RequestParam("params") JSONObject params){
|
||||
this.sysBaseApi.sendHtmlTemplateEmail(email,title,emailTemplateEnum,params);
|
||||
};
|
||||
/**
|
||||
* 发送短信消息
|
||||
* @param phone 手机号码
|
||||
* @param params 模版参数
|
||||
* @param dySmsEnum 短信模版枚举
|
||||
*/
|
||||
@GetMapping("/sendSmsMsg")
|
||||
public void sendSmsMsg(@RequestParam("phone")String phone, @RequestParam("params") JSONObject params, @RequestParam("dySmsEnum") DySmsEnum dySmsEnum){
|
||||
this.sysBaseApi.sendSmsMsg(phone,params,dySmsEnum);
|
||||
};
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户信息
|
||||
* @param orgCode
|
||||
@ -976,5 +999,19 @@ public class SystemApiController {
|
||||
) {
|
||||
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
|
||||
}
|
||||
/**
|
||||
* 自动发布通告
|
||||
*
|
||||
* @param dataId 通告ID
|
||||
* @param currentUserName 发送人
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/announcementAutoRelease")
|
||||
public void announcementAutoRelease(
|
||||
@RequestParam("dataId") String dataId,
|
||||
@RequestParam(value = "currentUserName", required = false) String currentUserName
|
||||
) {
|
||||
sysBaseApi.announcementAutoRelease(dataId, currentUserName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -35,6 +35,9 @@ public class SysMessageTemplate extends JeecgEntity{
|
||||
/**模板类型*/
|
||||
@Excel(name = "模板类型", width = 15)
|
||||
private java.lang.String templateType;
|
||||
/**模板分类*/
|
||||
@Excel(name = "模板类型(notice通知公告 other其他)", width = 15)
|
||||
private java.lang.String templateCategory;
|
||||
|
||||
/**已经应用/未应用 1是0否*/
|
||||
@Excel(name = "应用状态", width = 15)
|
||||
|
||||
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import org.jeecg.common.api.dto.message.MessageDTO;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.WebsocketConst;
|
||||
import org.jeecg.common.constant.enums.NoticeTypeEnum;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
@ -74,11 +75,13 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
|
||||
Map<String,Object> data = messageDTO.getData();
|
||||
String[] arr = messageDTO.getToUser().split(",");
|
||||
for(String username: arr){
|
||||
doSend(title, content, fromUser, username, data);
|
||||
//update-begin---author:wangshuai---date:2025-06-26---for:【QQYUN-12162】OA项目改造,系统重消息拆分,目前消息都在一起 需按分类进行拆分---
|
||||
doSend(title, content, fromUser, username, data, messageDTO.getNoticeType());
|
||||
//update-end---author:wangshuai---date:2025-06-26---for:【QQYUN-12162】OA项目改造,系统重消息拆分,目前消息都在一起 需按分类进行拆分---
|
||||
}
|
||||
}
|
||||
|
||||
private void doSend(String title, String msgContent, String fromUser, String toUser, Map<String, Object> data){
|
||||
private void doSend(String title, String msgContent, String fromUser, String toUser, Map<String, Object> data, String noticeType){
|
||||
SysAnnouncement announcement = new SysAnnouncement();
|
||||
if(data!=null){
|
||||
//摘要信息
|
||||
@ -91,12 +94,14 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
|
||||
if(taskId!=null){
|
||||
announcement.setBusId(taskId.toString());
|
||||
announcement.setBusType(Vue3MessageHrefEnum.BPM_TASK.getBusType());
|
||||
noticeType = NoticeTypeEnum.NOTICE_TYPE_FLOW.getValue();
|
||||
}
|
||||
|
||||
// 流程内消息节点 发消息会传一个busType
|
||||
Object busType = data.get(CommonConstant.NOTICE_MSG_BUS_TYPE);
|
||||
if(busType!=null){
|
||||
announcement.setBusType(busType.toString());
|
||||
noticeType = NoticeTypeEnum.NOTICE_TYPE_FLOW.getValue();
|
||||
}
|
||||
}
|
||||
announcement.setTitile(title);
|
||||
@ -109,6 +114,11 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
|
||||
//系统消息
|
||||
announcement.setMsgCategory("2");
|
||||
announcement.setDelFlag(String.valueOf(CommonConstant.DEL_FLAG_0));
|
||||
if(oConvertUtils.isEmpty(noticeType)){
|
||||
noticeType = NoticeTypeEnum.NOTICE_TYPE_SYSTEM.getValue();
|
||||
}
|
||||
announcement.setNoticeType(noticeType);
|
||||
announcement.setIzTop(CommonConstant.IZ_TOP_0);
|
||||
sysAnnouncementMapper.insert(announcement);
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
String userId = toUser;
|
||||
@ -130,6 +140,7 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
|
||||
obj.put(WebsocketConst.MSG_USER_ID, sysUser.getId());
|
||||
obj.put(WebsocketConst.MSG_ID, announcement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, announcement.getTitile());
|
||||
obj.put(CommonConstant.NOTICE_TYPE,noticeType);
|
||||
webSocket.sendMessage(sysUser.getId(), obj.toJSONString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -382,7 +382,7 @@ public class OpenApiController extends JeecgController<OpenApi, OpenApiService>
|
||||
SwaggerInfo info = new SwaggerInfo();
|
||||
|
||||
info.setDescription("OpenAPI 接口列表");
|
||||
info.setVersion("3.8.1");
|
||||
info.setVersion("3.8.2");
|
||||
info.setTitle("OpenAPI 接口列表");
|
||||
info.setTermsOfService("https://jeecg.com");
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package org.jeecg.modules.openapi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package org.jeecg.modules.openapi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@ -2,7 +2,6 @@ package org.jeecg.modules.openapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.openapi.entity.OpenApi;
|
||||
import org.jeecg.modules.openapi.entity.OpenApiPermission;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -2,7 +2,6 @@ package org.jeecg.modules.openapi.swagger;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
||||
@ -14,6 +14,16 @@ public interface DefIndexConst {
|
||||
* 默认首页的缓存key
|
||||
*/
|
||||
String CACHE_KEY = "sys:cache:def_index";
|
||||
/**
|
||||
* 缓存默认首页的类型前缀
|
||||
*/
|
||||
String CACHE_TYPE = "sys:cache:home_type::";
|
||||
/**
|
||||
* 默认首页类型
|
||||
*/
|
||||
String HOME_TYPE_SYSTEM = "system";
|
||||
String HOME_TYPE_PERSONAL = "personal";
|
||||
String HOME_TYPE_MENU = "menuHome";
|
||||
|
||||
/**
|
||||
* 默认首页的初始值
|
||||
|
||||
@ -370,7 +370,16 @@ public class LoginController {
|
||||
} else if(CommonConstant.SMS_TPL_TYPE_2.equals(smsmode)) {
|
||||
//忘记密码模板
|
||||
b = DySmsHelper.sendSms(mobile, obj, DySmsEnum.FORGET_PASSWORD_TEMPLATE_CODE);
|
||||
}
|
||||
//update-begin---author:wangshuai---date:2025-07-15---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
if(b){
|
||||
String username = sysUser.getUsername();
|
||||
obj.put("username",username);
|
||||
redisUtil.set(redisKey, obj.toJSONString(), 600);
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
//update-end---author:wangshuai---date:2025-07-15---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
}
|
||||
}
|
||||
|
||||
if (b == false) {
|
||||
@ -438,7 +447,7 @@ public class LoginController {
|
||||
userInfo(sysUser, result, request);
|
||||
//添加日志
|
||||
baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
|
||||
|
||||
redisUtil.removeAll(redisKey);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -793,7 +802,10 @@ public class LoginController {
|
||||
return result;
|
||||
}
|
||||
//验证码5分钟内有效
|
||||
redisUtil.set(redisKey, captcha, 300);
|
||||
//update-begin---author:wangshuai---date:2025-07-15---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
obj.put("username",username);
|
||||
redisUtil.set(redisKey, obj.toJSONString(), 300);
|
||||
//update-end---author:wangshuai---date:2025-07-15---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
result.setSuccess(true);
|
||||
} catch (ClientException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@ -14,6 +14,7 @@ import org.jeecg.common.config.TenantContext;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.CommonSendStatus;
|
||||
import org.jeecg.common.constant.WebsocketConst;
|
||||
import org.jeecg.common.constant.enums.NoticeTypeEnum;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
@ -88,7 +89,14 @@ public class SysAnnouncementController {
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
public RedisTemplate redisTemplate;
|
||||
|
||||
//常规报错定义
|
||||
private static final String SPECIAL_CHAR_ERROR = "保存失败:消息内容包含数据库不支持的特殊字符,请检查并修改内容!";
|
||||
private static final String CONTENT_TOO_LONG_ERROR = "保存失败:消息内容超过最大长度限制,请缩减内容长度!";
|
||||
private static final String DEFAULT_ERROR = "操作失败,请稍后重试或联系管理员!";
|
||||
/**
|
||||
* 通告缓存
|
||||
*/
|
||||
String ANNO_CACHE_KEY = "sys:cache:announcement";
|
||||
/**
|
||||
* QQYUN-5072【性能优化】线上通知消息打开有点慢
|
||||
*/
|
||||
@ -140,11 +148,14 @@ public class SysAnnouncementController {
|
||||
sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
|
||||
//未发布
|
||||
sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);
|
||||
//流程状态
|
||||
sysAnnouncement.setBpmStatus("1");
|
||||
sysAnnouncement.setNoticeType(NoticeTypeEnum.NOTICE_TYPE_SYSTEM.getValue());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
result.error500(determineErrorMessage(e));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -156,22 +167,46 @@ public class SysAnnouncementController {
|
||||
*/
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<SysAnnouncement> eidt(@RequestBody SysAnnouncement sysAnnouncement) {
|
||||
Result<SysAnnouncement> result = new Result<SysAnnouncement>();
|
||||
SysAnnouncement sysAnnouncementEntity = sysAnnouncementService.getById(sysAnnouncement.getId());
|
||||
try{
|
||||
if(sysAnnouncementEntity==null) {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
// update-begin-author:liusq date:20210804 for:标题处理xss攻击的问题
|
||||
String title = XssUtils.scriptXss(sysAnnouncement.getTitile());
|
||||
sysAnnouncement.setTitile(title);
|
||||
// update-end-author:liusq date:20210804 for:标题处理xss攻击的问题
|
||||
sysAnnouncement.setNoticeType(NoticeTypeEnum.NOTICE_TYPE_SYSTEM.getValue());
|
||||
boolean ok = sysAnnouncementService.upDateAnnouncement(sysAnnouncement);
|
||||
//TODO 返回false说明什么?
|
||||
if(ok) {
|
||||
result.success("修改成功!");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.error500(determineErrorMessage(e));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 简单编辑
|
||||
* @param sysAnnouncement
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/editIzTop", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<SysAnnouncement> editIzTop(@RequestBody SysAnnouncement sysAnnouncement) {
|
||||
Result<SysAnnouncement> result = new Result<SysAnnouncement>();
|
||||
SysAnnouncement sysAnnouncementEntity = sysAnnouncementService.getById(sysAnnouncement.getId());
|
||||
if(sysAnnouncementEntity==null) {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
// update-begin-author:liusq date:20210804 for:标题处理xss攻击的问题
|
||||
String title = XssUtils.scriptXss(sysAnnouncement.getTitile());
|
||||
sysAnnouncement.setTitile(title);
|
||||
// update-end-author:liusq date:20210804 for:标题处理xss攻击的问题
|
||||
boolean ok = sysAnnouncementService.upDateAnnouncement(sysAnnouncement);
|
||||
//TODO 返回false说明什么?
|
||||
if(ok) {
|
||||
result.success("修改成功!");
|
||||
}
|
||||
Integer izTop = sysAnnouncement.getIzTop();
|
||||
sysAnnouncementEntity.setIzTop(oConvertUtils.getInt(izTop,CommonConstant.IZ_TOP_0));
|
||||
sysAnnouncementService.updateById(sysAnnouncementEntity);
|
||||
result.success("修改成功!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -255,6 +290,9 @@ public class SysAnnouncementController {
|
||||
String currentUserName = JwtUtil.getUserNameByToken(request);
|
||||
sysAnnouncement.setSender(currentUserName);
|
||||
boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
|
||||
if(oConvertUtils.isEmpty(sysAnnouncement.getNoticeType())){
|
||||
sysAnnouncement.setNoticeType(NoticeTypeEnum.NOTICE_TYPE_SYSTEM.getValue());
|
||||
}
|
||||
if(ok) {
|
||||
result.success("系统通知推送成功");
|
||||
if(sysAnnouncement.getMsgType().equals(CommonConstant.MSG_TYPE_ALL)) {
|
||||
@ -266,6 +304,7 @@ public class SysAnnouncementController {
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||
obj.put(WebsocketConst.MSG_ID, sysAnnouncement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, sysAnnouncement.getTitile());
|
||||
obj.put(CommonConstant.NOTICE_TYPE, sysAnnouncement.getNoticeType());
|
||||
webSocket.sendMessage(obj.toJSONString());
|
||||
}else {
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
@ -277,6 +316,7 @@ public class SysAnnouncementController {
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_USER);
|
||||
obj.put(WebsocketConst.MSG_ID, sysAnnouncement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, sysAnnouncement.getTitile());
|
||||
obj.put(CommonConstant.NOTICE_TYPE, sysAnnouncement.getNoticeType());
|
||||
webSocket.sendMessage(userIds, obj.toJSONString());
|
||||
}
|
||||
try {
|
||||
@ -382,15 +422,31 @@ public class SysAnnouncementController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getUnreadMessageCount", method = RequestMethod.GET)
|
||||
public Result<Integer> getUnreadMessageCount(@RequestParam(required = false, defaultValue = "5") Integer pageSize, HttpServletRequest request) {
|
||||
public Result<Map<String, Integer>> getUnreadMessageCount(@RequestParam(required = false, defaultValue = "5") Integer pageSize, HttpServletRequest request) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String userId = sysUser.getId();
|
||||
|
||||
// 获取上个月的第一天(只查近两个月的通知)
|
||||
Date lastMonthStartDay = DateRangeUtils.getLastMonthStartDay();
|
||||
log.info(" ------查询近两个月收到的未读通知消息数量------,近2月的第一天:{}", lastMonthStartDay);
|
||||
Integer unreadMessageCount = sysAnnouncementService.getUnreadMessageCountByUserId(userId, lastMonthStartDay);
|
||||
return Result.ok(unreadMessageCount);
|
||||
//update-begin---author:wangshuai---date:2025-06-26---for:【QQYUN-12162】OA项目改造,系统重消息拆分,目前消息都在一起 需按分类进行拆分---
|
||||
Map<String,Integer> unreadMessageCount = new HashMap<>();
|
||||
//系统消息数量
|
||||
Integer systemCount = sysAnnouncementService.getUnreadMessageCountByUserId(userId, lastMonthStartDay, NoticeTypeEnum.NOTICE_TYPE_SYSTEM.getValue());
|
||||
unreadMessageCount.put("systemCount",systemCount);
|
||||
//流程数量
|
||||
Integer flowCount = sysAnnouncementService.getUnreadMessageCountByUserId(userId, lastMonthStartDay, NoticeTypeEnum.NOTICE_TYPE_FLOW.getValue());
|
||||
unreadMessageCount.put("flowCount",flowCount);
|
||||
//文件数量
|
||||
Integer fileCount = sysAnnouncementService.getUnreadMessageCountByUserId(userId, lastMonthStartDay, NoticeTypeEnum.NOTICE_TYPE_FILE.getValue());
|
||||
unreadMessageCount.put("fileCount",fileCount);
|
||||
//日程计划数量
|
||||
Integer planCount = sysAnnouncementService.getUnreadMessageCountByUserId(userId, lastMonthStartDay, NoticeTypeEnum.NOTICE_TYPE_PLAN.getValue());
|
||||
unreadMessageCount.put("planCount",planCount);
|
||||
Integer count = systemCount + flowCount + fileCount + planCount;
|
||||
unreadMessageCount.put("count",count);
|
||||
//update-end---author:wangshuai---date:2025-06-26---for:【QQYUN-12162】OA项目改造,系统重消息拆分,目前消息都在一起 需按分类进行拆分---
|
||||
return Result.ok(unreadMessageCount);
|
||||
}
|
||||
|
||||
|
||||
@ -440,6 +496,9 @@ public class SysAnnouncementController {
|
||||
if(sysAnnouncementExcel.getDelFlag()==null){
|
||||
sysAnnouncementExcel.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
|
||||
}
|
||||
if(oConvertUtils.isEmpty(sysAnnouncementExcel.getIzTop())){
|
||||
sysAnnouncementExcel.setIzTop(CommonConstant.IZ_TOP_0);
|
||||
}
|
||||
sysAnnouncementService.save(sysAnnouncementExcel);
|
||||
}
|
||||
return Result.ok("文件导入成功!数据行数:" + listSysAnnouncements.size());
|
||||
@ -526,6 +585,9 @@ public class SysAnnouncementController {
|
||||
/**
|
||||
* 【vue3用】 消息列表查询
|
||||
* @param fromUser
|
||||
* @param busType
|
||||
* @param starFlag
|
||||
* @param msgCategory
|
||||
* @param beginDate
|
||||
* @param endDate
|
||||
* @param pageNo
|
||||
@ -536,11 +598,13 @@ public class SysAnnouncementController {
|
||||
public Result<List<SysAnnouncement>> vue3List(@RequestParam(name="fromUser", required = false) String fromUser,
|
||||
@RequestParam(name="busType", required = false) String busType,
|
||||
@RequestParam(name="starFlag", required = false) String starFlag,
|
||||
@RequestParam(name="msgCategory", required = false) String msgCategory,
|
||||
@RequestParam(name="rangeDateKey", required = false) String rangeDateKey,
|
||||
@RequestParam(name="beginDate", required = false) String beginDate,
|
||||
@RequestParam(name="endDate", required = false) String endDate,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name= "noticeType", required = false) String noticeType) {
|
||||
long calStartTime = System.currentTimeMillis(); // 记录开始时间
|
||||
|
||||
// 1、获取日期查询条件,开始时间和结束时间
|
||||
@ -563,7 +627,7 @@ public class SysAnnouncementController {
|
||||
}
|
||||
|
||||
// 2、根据条件查询用户的通知消息
|
||||
List<SysAnnouncement> ls = this.sysAnnouncementService.querySysMessageList(pageSize, pageNo, fromUser, starFlag,busType, beginTime, endTime);
|
||||
List<SysAnnouncement> ls = this.sysAnnouncementService.querySysMessageList(pageSize, pageNo, fromUser, starFlag,busType, msgCategory, beginTime, endTime, noticeType);
|
||||
|
||||
// 3、设置当前页的消息为已读
|
||||
if (!CollectionUtils.isEmpty(ls)) {
|
||||
@ -585,7 +649,7 @@ public class SysAnnouncementController {
|
||||
// 4、性能统计耗时
|
||||
long calEndTime = System.currentTimeMillis(); // 记录结束时间
|
||||
long duration = calEndTime - calStartTime; // 计算耗时
|
||||
System.out.println("耗时:" + duration + " 毫秒");
|
||||
log.info("耗时:" + duration + " 毫秒");
|
||||
|
||||
return Result.ok(ls);
|
||||
}
|
||||
@ -597,11 +661,11 @@ public class SysAnnouncementController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getLastAnnountTime")
|
||||
public Result<Page<SysAnnouncementSend>> getLastAnnountTime(@RequestParam(name = "userId") String userId){
|
||||
public Result<Page<SysAnnouncementSend>> getLastAnnountTime(@RequestParam(name = "userId") String userId,@RequestParam(name="noticeType",required = false) String noticeType){
|
||||
Result<Page<SysAnnouncementSend>> result = new Result<>();
|
||||
//----------------------------------------------------------------------------------------
|
||||
// step.1 此接口过慢,可以采用缓存一小时方案
|
||||
String keyString = String.format(CommonConstant.CACHE_KEY_USER_LAST_ANNOUNT_TIME_1HOUR, userId);
|
||||
String keyString = String.format(CommonConstant.CACHE_KEY_USER_LAST_ANNOUNT_TIME_1HOUR + "_" + noticeType, userId);
|
||||
if (redisTemplate.hasKey(keyString)) {
|
||||
log.info("[SysAnnouncementSend Redis] 通过Redis缓存查询用户最后一次收到系统通知时间,userId={}", userId);
|
||||
Page<SysAnnouncementSend> pageList = (Page<SysAnnouncementSend>) redisTemplate.opsForValue().get(keyString);
|
||||
@ -641,4 +705,54 @@ public class SysAnnouncementController {
|
||||
sysAnnouncementService.clearAllUnReadMessage();
|
||||
return Result.ok("清除未读消息成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加访问次数
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/addVisitsNumber", method = RequestMethod.GET)
|
||||
public Result<?> addVisitsNumber(@RequestParam(name="id",required=true) String id) {
|
||||
int count = oConvertUtils.getInt(redisUtil.get(ANNO_CACHE_KEY+id),0) + 1;
|
||||
redisUtil.set(ANNO_CACHE_KEY+id, count);
|
||||
|
||||
if (count % 5 == 0) {
|
||||
cachedThreadPool.execute(() -> {
|
||||
sysAnnouncementService.updateVisitsNum(id, count);
|
||||
});
|
||||
// 重置访问次数
|
||||
redisUtil.del(ANNO_CACHE_KEY+id);
|
||||
}
|
||||
return Result.ok("公告消息访问次数+1次");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据异常信息确定友好的错误提示
|
||||
*/
|
||||
private String determineErrorMessage(Exception e) {
|
||||
String errorMsg = e.getMessage();
|
||||
if (isSpecialCharacterError(errorMsg)) {
|
||||
return SPECIAL_CHAR_ERROR;
|
||||
} else if (isContentTooLongError(errorMsg)) {
|
||||
return CONTENT_TOO_LONG_ERROR;
|
||||
} else {
|
||||
return DEFAULT_ERROR;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 判断是否为特殊字符错误
|
||||
*/
|
||||
private boolean isSpecialCharacterError(String errorMsg) {
|
||||
return errorMsg != null
|
||||
&& errorMsg.contains("Incorrect string value")
|
||||
&& errorMsg.contains("column 'msg_content'");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为内容过长错误
|
||||
*/
|
||||
private boolean isContentTooLongError(String errorMsg) {
|
||||
return errorMsg != null
|
||||
&& errorMsg.contains("Data too long for column 'msg_content'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
package org.jeecg.modules.system.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.system.entity.SysAppVersion;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @Description: app系统配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-07-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name="app系统配置")
|
||||
@RestController
|
||||
@RequestMapping("/sys/version")
|
||||
@Slf4j
|
||||
public class SysAppVersionController{
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
/**
|
||||
* APP缓存前缀
|
||||
*/
|
||||
private String APP3_VERSION = "app3:version";
|
||||
/**
|
||||
* app3版本信息
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary="app版本")
|
||||
@GetMapping(value = "/app3version")
|
||||
public Result<SysAppVersion> app3Version(@RequestParam(name="key", required = false)String appKey) throws Exception {
|
||||
Object appConfig = redisUtil.get(APP3_VERSION + appKey);
|
||||
if (oConvertUtils.isNotEmpty(appConfig)) {
|
||||
try {
|
||||
SysAppVersion sysAppVersion = (SysAppVersion)appConfig;
|
||||
return Result.OK(sysAppVersion);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
return Result.error("app版本信息获取失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存APP3
|
||||
*
|
||||
* @param sysAppVersion
|
||||
* @return
|
||||
*/
|
||||
@RequiresRoles({"admin"})
|
||||
@Operation(summary="app系统配置-保存")
|
||||
@PostMapping(value = "/saveVersion")
|
||||
public Result<?> saveVersion(@RequestBody SysAppVersion sysAppVersion) {
|
||||
String id = sysAppVersion.getId();
|
||||
redisUtil.set(APP3_VERSION + id,sysAppVersion);
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
@ -265,6 +265,9 @@ public class SysCategoryController {
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<SysCategory> listSysCategorys = ExcelImportUtil.importExcel(file.getInputStream(), SysCategory.class, params);
|
||||
//update-begin---author:chenrui ---date:20250721 for:[issues/8612]分类字典导入bug #8612 ------------
|
||||
Set<String> parentCategoryIds = new HashSet<>();
|
||||
//update-end---author:chenrui ---date:20250721 for:[issues/8612]分类字典导入bug #8612 ------------
|
||||
//按照编码长度排序
|
||||
Collections.sort(listSysCategorys);
|
||||
log.info("排序后的list====>",listSysCategorys);
|
||||
@ -278,6 +281,9 @@ public class SysCategoryController {
|
||||
log.info("pId====>",pId);
|
||||
if(StringUtils.isNotBlank(pId)){
|
||||
sysCategoryExcel.setPid(pId);
|
||||
//update-begin---author:chenrui ---date:20250721 for:[issues/8612]分类字典导入bug #8612 ------------
|
||||
parentCategoryIds.add(pId);
|
||||
//update-end---author:chenrui ---date:20250721 for:[issues/8612]分类字典导入bug #8612 ------------
|
||||
}
|
||||
}else{
|
||||
sysCategoryExcel.setPid("0");
|
||||
@ -298,6 +304,17 @@ public class SysCategoryController {
|
||||
}
|
||||
}
|
||||
}
|
||||
//update-begin---author:chenrui ---date:20250721 for:[issues/8612]分类字典导入bug #8612 ------------
|
||||
if(oConvertUtils.isObjectNotEmpty(parentCategoryIds)){
|
||||
for (String parentCategoryId : parentCategoryIds) {
|
||||
SysCategory parentCategory = sysCategoryService.getById(parentCategoryId);
|
||||
if(oConvertUtils.isObjectNotEmpty(parentCategory)){
|
||||
parentCategory.setHasChild(CommonConstant.STATUS_1);
|
||||
sysCategoryService.updateById(parentCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
//update-end---author:chenrui ---date:20250721 for:[issues/8612]分类字典导入bug #8612 ------------
|
||||
} catch (Exception e) {
|
||||
errorMessage.add("发生异常:" + e.getMessage());
|
||||
log.error(e.getMessage(), e);
|
||||
|
||||
@ -270,7 +270,7 @@ public class SysPermissionController {
|
||||
indexMenu = new SysPermission();
|
||||
indexMenu.setUrl(defIndexCfg.getUrl());
|
||||
indexMenu.setComponent(defIndexCfg.getComponent());
|
||||
indexMenu.setRoute(defIndexCfg.isRoute());
|
||||
indexMenu.setRoute(defIndexCfg.getRoute());
|
||||
indexMenu.setName(DefIndexConst.DEF_INDEX_NAME);
|
||||
indexMenu.setMenuType(0);
|
||||
}
|
||||
|
||||
@ -10,10 +10,18 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.base.service.BaseCommonService;
|
||||
import org.jeecg.modules.system.constant.DefIndexConst;
|
||||
import org.jeecg.modules.system.entity.SysRoleIndex;
|
||||
import org.jeecg.modules.system.service.ISysRoleIndexService;
|
||||
import org.jeecg.modules.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@ -36,6 +44,14 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
||||
@Autowired
|
||||
private ISysRoleIndexService sysRoleIndexService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Autowired
|
||||
private BaseCommonService baseCommonService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@ -70,7 +86,12 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
||||
@PostMapping(value = "/add")
|
||||
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
||||
public Result<?> add(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
||||
String relationType = sysRoleIndex.getRelationType();
|
||||
if(oConvertUtils.isEmpty(relationType)){
|
||||
sysRoleIndex.setRelationType(CommonConstant.HOME_RELATION_ROLE);
|
||||
}
|
||||
sysRoleIndexService.save(sysRoleIndex);
|
||||
sysRoleIndexService.cleanDefaultIndexCache();
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@ -86,7 +107,12 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
||||
public Result<?> edit(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
||||
String relationType = sysRoleIndex.getRelationType();
|
||||
if(oConvertUtils.isEmpty(relationType)){
|
||||
sysRoleIndex.setRelationType(CommonConstant.HOME_RELATION_ROLE);
|
||||
}
|
||||
sysRoleIndexService.updateById(sysRoleIndex);
|
||||
sysRoleIndexService.cleanDefaultIndexCache();
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
@ -98,6 +124,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
||||
*/
|
||||
@AutoLog(value = "角色首页配置-通过id删除")
|
||||
@Operation(summary = "角色首页配置-通过id删除")
|
||||
@RequiresPermissions("system:roleindex:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
sysRoleIndexService.removeById(id);
|
||||
@ -112,8 +139,10 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
||||
*/
|
||||
@AutoLog(value = "角色首页配置-批量删除")
|
||||
@Operation(summary = "角色首页配置-批量删除")
|
||||
@RequiresPermissions("system:roleindex:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
baseCommonService.addLog("批量删除用户, ids: " +ids ,CommonConstant.LOG_TYPE_2, 3);
|
||||
this.sysRoleIndexService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
@ -196,5 +225,53 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
||||
return Result.error("设置失败");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 切换默认门户
|
||||
*
|
||||
* @param sysRoleIndex
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/changeDefHome")
|
||||
public Result<?> changeDefHome(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
sysRoleIndex.setRoleCode(username);
|
||||
sysRoleIndexService.changeDefHome(sysRoleIndex);
|
||||
//update-begin-author:liusq---date:2025-07-03--for: 切换完成后的homePath获取
|
||||
String version = request.getHeader(CommonConstant.VERSION);
|
||||
String homePath = null;
|
||||
SysRoleIndex defIndexCfg = sysUserService.getDynamicIndexByUserRole(username, version);
|
||||
if (defIndexCfg == null) {
|
||||
defIndexCfg = sysRoleIndexService.initDefaultIndex();
|
||||
}
|
||||
if (oConvertUtils.isNotEmpty(version) && defIndexCfg != null && oConvertUtils.isNotEmpty(defIndexCfg.getUrl())) {
|
||||
homePath = defIndexCfg.getUrl();
|
||||
if (!homePath.startsWith(SymbolConstant.SINGLE_SLASH)) {
|
||||
homePath = SymbolConstant.SINGLE_SLASH + homePath;
|
||||
}
|
||||
}
|
||||
//update-end-author:liusq---date:2025-07-03--for:切换完成后的homePath获取
|
||||
return Result.OK(homePath);
|
||||
}
|
||||
/**
|
||||
* 获取门户类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getCurrentHome")
|
||||
public Result<?> getCurrentHome(HttpServletRequest request) {
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
Object homeType = redisUtil.get(DefIndexConst.CACHE_TYPE + username);
|
||||
return Result.OK(oConvertUtils.getString(homeType,DefIndexConst.HOME_TYPE_SYSTEM));
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除缓存
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/cleanDefaultIndexCache")
|
||||
public Result<?> cleanDefaultIndexCache(HttpServletRequest request) {
|
||||
sysRoleIndexService.cleanDefaultIndexCache();
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,8 +412,11 @@ public class SysTenantController {
|
||||
*/
|
||||
@PutMapping("/invitationUserJoin")
|
||||
@RequiresPermissions("system:tenant:invitation:user")
|
||||
public Result<String> invitationUserJoin(@RequestParam("ids") String ids,@RequestParam("phone") String phone){
|
||||
sysTenantService.invitationUserJoin(ids,phone);
|
||||
public Result<String> invitationUserJoin(@RequestParam("ids") String ids,@RequestParam(value = "phone", required = false) String phone, @RequestParam(value = "username", required = false) String username){
|
||||
if(oConvertUtils.isEmpty(phone) && oConvertUtils.isEmpty(username)){
|
||||
return Result.error("手机号和用户账号不能同时为空!");
|
||||
}
|
||||
sysTenantService.invitationUserJoin(ids,phone,username);
|
||||
return Result.ok("邀请用户成功");
|
||||
}
|
||||
|
||||
|
||||
@ -1092,13 +1092,26 @@ public class SysUserController {
|
||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
String redisKey = CommonConstant.PHONE_REDIS_KEY_PRE+phone;
|
||||
Object code = redisUtil.get(redisKey);
|
||||
if (!smscode.equals(code)) {
|
||||
//update-begin---author:wangshuai---date:2025-07-15---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
if (null == code) {
|
||||
result.setMessage("短信验证码失效!");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
String smsCode = "";
|
||||
if (code.toString().contains("code")) {
|
||||
smsCode = JSONObject.parseObject(code.toString()).getString("code");
|
||||
} else {
|
||||
smsCode = code.toString();
|
||||
}
|
||||
if (!smscode.equals(smsCode)) {
|
||||
//update-end---author:wangshuai---date:2025-07-15---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
result.setMessage("手机验证码错误");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
//设置有效时间
|
||||
redisUtil.set(redisKey, smscode,600);
|
||||
redisUtil.set(redisKey, code,600);
|
||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
|
||||
//新增查询用户名
|
||||
@ -1144,6 +1157,22 @@ public class SysUserController {
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
|
||||
//update-begin---author:wangshuai---date:2025-07-14---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
String redisUsername = "";
|
||||
if(object.toString().contains("code")){
|
||||
JSONObject jsonObject = JSONObject.parseObject(object.toString());
|
||||
object = jsonObject.getString("code");
|
||||
redisUsername = jsonObject.getString("username");
|
||||
}
|
||||
//验证是否为当前用户的
|
||||
if(oConvertUtils.isNotEmpty(redisUsername) && !username.equals(redisUsername)){
|
||||
result.setMessage("此验证码不是当前用户的!");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
//update-end---author:wangshuai---date:2025-07-14---for:【issues/8567】严重:修改密码存在水平越权问题。---
|
||||
|
||||
if(!smscode.equals(object.toString())) {
|
||||
result.setMessage("短信验证码不匹配!");
|
||||
result.setSuccess(false);
|
||||
@ -1151,7 +1180,7 @@ public class SysUserController {
|
||||
}
|
||||
sysUser = this.sysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername,username).eq(SysUser::getPhone,phone));
|
||||
if (sysUser == null) {
|
||||
result.setMessage("当前登录用户和绑定的手机号不匹配,无法修改密码!");
|
||||
result.setMessage("当前用户和绑定的手机号不匹配,无法修改密码!");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
} else {
|
||||
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jeecg.dingtalk.api.core.response.Response;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.dto.message.MessageDTO;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.config.TenantContext;
|
||||
@ -422,6 +423,31 @@ public class ThirdAppController {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除第三方配置表
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping(value = "/deleteThirdAppConfig")
|
||||
@RequiresPermissions("system:third:config:delete")
|
||||
public Result<String> deleteThirdAppConfig(@RequestParam(name="id",required=true) String id) {
|
||||
Result<String> result = new Result<>();
|
||||
SysThirdAppConfig config = appConfigService.getById(id);
|
||||
if (null == config) {
|
||||
result.error500("数据不存在");
|
||||
return result;
|
||||
}
|
||||
try {
|
||||
appConfigService.removeById(id);
|
||||
result.success("解绑成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据租户id和第三方类型获取第三方app配置信息
|
||||
*
|
||||
|
||||
@ -171,4 +171,22 @@ public class SysAnnouncement implements Serializable {
|
||||
|
||||
/**租户ID*/
|
||||
private java.lang.Integer tenantId;
|
||||
|
||||
/**
|
||||
* 枚举:org.jeecg.common.constant.enums.NoticeTypeEnum
|
||||
* 通知类型(system:系统消息、file:知识库、flow:流程、plan:日程计划、meeting:会议)
|
||||
*/
|
||||
private String noticeType;
|
||||
/**附件字段*/
|
||||
private java.lang.String files;
|
||||
/**访问次数*/
|
||||
private java.lang.Integer visitsNum;
|
||||
/**是否置顶(0否 1是)*/
|
||||
private java.lang.Integer izTop;
|
||||
/**是否审批(0否 1是)*/
|
||||
private java.lang.String izApproval;
|
||||
/**流程状态*/
|
||||
private java.lang.String bpmStatus;
|
||||
/**消息归类*/
|
||||
private java.lang.String msgClassify;
|
||||
}
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
package org.jeecg.modules.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: app系统配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2021-07-07
|
||||
* @Version: V1.0
|
||||
*
|
||||
* e3e3NcxzbUiGa53YYVXxWc8ADo5ISgQGx/gaZwERF91oAryDlivjqBv3wqRArgChupi+Y/Gg/swwGEyL0PuVFg==
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description="app系统配置")
|
||||
public class SysAppVersion implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
/**创建人*/
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@Schema(description = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@Schema(description = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@Schema(description = "标题")
|
||||
private String appTitle;
|
||||
/**logo*/
|
||||
@Excel(name = "logo", width = 15)
|
||||
@Schema(description = "logo")
|
||||
private String appLogo;
|
||||
/**首页轮播图*/
|
||||
@Excel(name = "首页轮播图", width = 15)
|
||||
@Schema(description = "首页轮播图")
|
||||
private String carouselImgJson;
|
||||
/**首页菜单图*/
|
||||
@Excel(name = "首页菜单图", width = 15)
|
||||
@Schema(description = "首页菜单图")
|
||||
private String routeImgJson;
|
||||
/**app版本*/
|
||||
@Schema(description = "版本")
|
||||
private String appVersion;
|
||||
/**版本编码*/
|
||||
@Schema(description = "版本编码")
|
||||
private Integer versionNum;
|
||||
/**app下载路径*/
|
||||
@Schema(description = "app下载路径")
|
||||
private String downloadUrl;
|
||||
/**热更新路径*/
|
||||
@Schema(description = "热更新路径")
|
||||
private String wgtUrl;
|
||||
/**更新内容*/
|
||||
@Schema(description = "更新内容")
|
||||
private String updateNote;
|
||||
}
|
||||
@ -12,6 +12,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
@ -50,7 +51,7 @@ public class SysRoleIndex {
|
||||
@Excel(name = "是否路由菜单", width = 15)
|
||||
@Schema(description = "是否路由菜单")
|
||||
@TableField(value="is_route")
|
||||
private boolean route;
|
||||
private Boolean route;
|
||||
/**优先级*/
|
||||
@Excel(name = "优先级", width = 15)
|
||||
@Schema(description = "优先级")
|
||||
@ -84,6 +85,12 @@ public class SysRoleIndex {
|
||||
@Schema(description = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**关联类型(ROLE:角色 USER:表示用户)*/
|
||||
@Schema(description = "关联类型")
|
||||
@Excel(name = "关联类型", width = 15, dicCode = "relation_type")
|
||||
@Dict(dicCode = "relation_type")
|
||||
private java.lang.String relationType;
|
||||
|
||||
|
||||
public SysRoleIndex() {
|
||||
|
||||
|
||||
@ -33,9 +33,10 @@ public interface SysAnnouncementMapper extends BaseMapper<SysAnnouncement> {
|
||||
* 获取用户未读消息数量
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param noticeType
|
||||
* @return
|
||||
*/
|
||||
Integer getUnreadMessageCountByUserId(@Param("userId") String userId, @Param("beginDate") Date beginDate);
|
||||
Integer getUnreadMessageCountByUserId(@Param("userId") String userId, @Param("beginDate") Date beginDate, @Param("noticeType") String noticeType);
|
||||
|
||||
/**
|
||||
* 分页查询全部消息列表
|
||||
@ -44,9 +45,10 @@ public interface SysAnnouncementMapper extends BaseMapper<SysAnnouncement> {
|
||||
* @param fromUser
|
||||
* @param beginDate
|
||||
* @param endDate
|
||||
* @param noticeType
|
||||
* @return
|
||||
*/
|
||||
List<SysAnnouncement> queryAllMessageList(Page<SysAnnouncement> page, @Param("userId")String userId, @Param("fromUser")String fromUser, @Param("starFlag")String starFlag, @Param("busType")String busType, @Param("beginDate")Date beginDate, @Param("endDate")Date endDate);
|
||||
List<SysAnnouncement> queryAllMessageList(Page<SysAnnouncement> page, @Param("userId")String userId, @Param("fromUser")String fromUser, @Param("starFlag")String starFlag, @Param("busType")String busType, @Param("msgCategory")String msgCategory, @Param("beginDate")Date beginDate, @Param("endDate")Date endDate, @Param("noticeType") String noticeType);
|
||||
|
||||
/**
|
||||
* 查询用户未阅读的通知公告
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
<result column="bus_id" property="busId" jdbcType="VARCHAR"/>
|
||||
<result column="open_type" property="openType" jdbcType="VARCHAR"/>
|
||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||
<result column="files" property="files" jdbcType="VARCHAR"/>
|
||||
<result column="visits_num" property="visitsNum" jdbcType="INTEGER"/>
|
||||
<result column="iz_top" property="izTop" jdbcType="INTEGER"/>
|
||||
|
||||
<result column="read_flag" property="readFlag" jdbcType="INTEGER"/>
|
||||
<result column="star_flag" property="starFlag" jdbcType="VARCHAR"/>
|
||||
@ -51,6 +54,9 @@
|
||||
select count(1) from sys_announcement_send sas
|
||||
right join sys_announcement sa on sas.annt_id = sa.id and sa.send_status = '1'
|
||||
where sas.user_id = #{userId} and sas.read_flag = 0 and sas.create_time >= #{beginDate}
|
||||
<if test="noticeType != null and noticeType != ''">
|
||||
and sa.notice_type = #{noticeType}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询消息记录 -->
|
||||
@ -71,7 +77,10 @@
|
||||
a.open_page,
|
||||
a.msg_abstract,
|
||||
a.dt_task_id,
|
||||
b.read_flag,
|
||||
a.files,
|
||||
a.visits_num,
|
||||
a.iz_top,
|
||||
b.read_flag,
|
||||
b.star_flag,
|
||||
b.id as send_id
|
||||
from sys_announcement a
|
||||
@ -94,8 +103,14 @@
|
||||
</if>
|
||||
<if test="busType!=null and busType!=''">
|
||||
and a.bus_type = #{busType}
|
||||
</if>
|
||||
<if test="noticeType!=null and noticeType!=''">
|
||||
and a.notice_type = #{noticeType}
|
||||
</if>
|
||||
order by b.read_flag ASC, a.create_time DESC
|
||||
<if test="msgCategory!=null and msgCategory!=''">
|
||||
and a.msg_category = #{msgCategory}
|
||||
</if>
|
||||
order by a.iz_top DESC, b.read_flag ASC, a.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询用户未阅读的通知公告 -->
|
||||
|
||||
@ -16,6 +16,9 @@
|
||||
<result column="bus_type" property="busType" jdbcType="VARCHAR"/>
|
||||
<result column="open_type" property="openType" jdbcType="VARCHAR"/>
|
||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||
<result column="files" property="files" jdbcType="VARCHAR"/>
|
||||
<result column="visits_num" property="visitsNum" jdbcType="INTEGER"/>
|
||||
<result column="iz_top" property="izTop" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getMyAnnouncementSendList" parameterType="Object" resultMap="AnnouncementSendModel">
|
||||
@ -34,7 +37,10 @@
|
||||
sa.bus_type as bus_type,
|
||||
sa.open_type as open_type,
|
||||
sa.open_page as open_page,
|
||||
sa.msg_abstract
|
||||
sa.msg_abstract,
|
||||
sa.files,
|
||||
sa.visits_num,
|
||||
sa.iz_top
|
||||
from sys_announcement_send sas
|
||||
left join sys_announcement sa ON sas.annt_id = sa.id
|
||||
where sa.send_status = '1'
|
||||
@ -62,7 +68,7 @@
|
||||
and announcementSendModel.sendTimeEnd != '' and announcementSendModel.sendTimeEnd != ''">
|
||||
and sa.send_time between #{announcementSendModel.sendTimeBegin} and #{announcementSendModel.sendTimeEnd}
|
||||
</if>
|
||||
order by sas.read_flag,sa.send_time desc
|
||||
order by sa.iz_top DESC, sas.read_flag,sa.send_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@ -28,15 +28,16 @@
|
||||
,icon
|
||||
,is_leaf
|
||||
FROM sys_permission
|
||||
WHERE 1=1
|
||||
<choose>
|
||||
<when test="parentId != null and parentId != ''">
|
||||
AND parent_id = #{parentId,jdbcType=VARCHAR}
|
||||
</when>
|
||||
<otherwise>
|
||||
AND parent_id is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
<where>
|
||||
<choose>
|
||||
<when test="parentId != null and parentId != ''">
|
||||
parent_id = #{parentId,jdbcType=VARCHAR}
|
||||
</when>
|
||||
<otherwise>
|
||||
parent_id is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 获取登录用户拥有的权限 -->
|
||||
@ -212,7 +213,7 @@
|
||||
</select>
|
||||
|
||||
<!--根据用户名称和test角色id查询权限-->
|
||||
<select id="queryPermissionByTestRoleId" resultType="org.jeecg.modules.system.entity.SysPermission">
|
||||
<select id="queryPermissionByTestRoleId" resultMap="SysPermission">
|
||||
SELECT p.*
|
||||
FROM sys_permission p
|
||||
WHERE exists(
|
||||
|
||||
@ -83,4 +83,16 @@ public class AnnouncementSendModel implements Serializable {
|
||||
* 发布结束日期
|
||||
*/
|
||||
private java.lang.String sendTimeEnd;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private java.lang.String files;
|
||||
/**
|
||||
* 访问量
|
||||
*/
|
||||
private java.lang.Integer visitsNum;
|
||||
/**
|
||||
* 是否置顶(0否 1是)
|
||||
*/
|
||||
private java.lang.Integer izTop;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ public class TreeModel implements Serializable {
|
||||
|
||||
private String slotTitle;
|
||||
|
||||
private boolean isLeaf;
|
||||
private Boolean isLeaf;
|
||||
|
||||
private String icon;
|
||||
|
||||
@ -54,11 +54,11 @@ public class TreeModel implements Serializable {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean getIsLeaf() {
|
||||
public Boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setIsLeaf(boolean isLeaf) {
|
||||
public void setIsLeaf(Boolean isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package org.jeecg.modules.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.system.entity.SysAnnouncement;
|
||||
@ -48,10 +47,11 @@ public interface ISysAnnouncementService extends IService<SysAnnouncement> {
|
||||
/**
|
||||
* 获取用户未读消息数量
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param userId 用户id
|
||||
* @param noticeType 通知类型
|
||||
* @return
|
||||
*/
|
||||
public Integer getUnreadMessageCountByUserId(String userId, Date beginDate);
|
||||
public Integer getUnreadMessageCountByUserId(String userId, Date beginDate, String noticeType);
|
||||
|
||||
|
||||
/**
|
||||
@ -72,7 +72,7 @@ public interface ISysAnnouncementService extends IService<SysAnnouncement> {
|
||||
/**
|
||||
* 分页查询当前登录用户的消息, 并且标记哪些是未读消息
|
||||
*/
|
||||
List<SysAnnouncement> querySysMessageList(int pageSize, int pageNo, String fromUser, String starFlag, String busType, Date beginDate, Date endDate);
|
||||
List<SysAnnouncement> querySysMessageList(int pageSize, int pageNo, String fromUser, String starFlag, String busType, String msgCategory, Date beginDate, Date endDate, String noticeType);
|
||||
|
||||
/**
|
||||
* 修改为已读消息
|
||||
@ -91,4 +91,11 @@ public interface ISysAnnouncementService extends IService<SysAnnouncement> {
|
||||
* @return
|
||||
*/
|
||||
public List<String> getNotSendedAnnouncementlist(String userId);
|
||||
|
||||
/**
|
||||
* 添加访问次数
|
||||
* @param id
|
||||
* @param count
|
||||
*/
|
||||
void updateVisitsNum(String id, int count);
|
||||
}
|
||||
|
||||
@ -40,4 +40,9 @@ public interface ISysRoleIndexService extends IService<SysRoleIndex> {
|
||||
*/
|
||||
void cleanDefaultIndexCache();
|
||||
|
||||
/**
|
||||
* 切换默认门户
|
||||
* @param sysRoleIndex
|
||||
*/
|
||||
void changeDefHome(SysRoleIndex sysRoleIndex);
|
||||
}
|
||||
|
||||
@ -49,8 +49,9 @@ public interface ISysTenantService extends IService<SysTenant> {
|
||||
* 邀请用户加入租户,通过手机号
|
||||
* @param ids
|
||||
* @param phone
|
||||
* @param username
|
||||
*/
|
||||
void invitationUserJoin(String ids, String phone);
|
||||
void invitationUserJoin(String ids, String phone,String username);
|
||||
|
||||
/**
|
||||
* 请离用户(租户)
|
||||
|
||||
@ -8,7 +8,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.DateRangeUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||
import org.jeecg.modules.system.entity.SysAnnouncement;
|
||||
@ -149,8 +148,8 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getUnreadMessageCountByUserId(String userId, Date beginDate) {
|
||||
return sysAnnouncementMapper.getUnreadMessageCountByUserId(userId, beginDate);
|
||||
public Integer getUnreadMessageCountByUserId(String userId, Date beginDate, String noticeType) {
|
||||
return sysAnnouncementMapper.getUnreadMessageCountByUserId(userId, beginDate, noticeType);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -199,7 +198,7 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysAnnouncement> querySysMessageList(int pageSize, int pageNo, String fromUser, String starFlag, String busType, Date beginDate, Date endDate) {
|
||||
public List<SysAnnouncement> querySysMessageList(int pageSize, int pageNo, String fromUser, String starFlag, String busType, String msgCategory, Date beginDate, Date endDate, String noticeType) {
|
||||
// //1. 补全send表的数据
|
||||
// completeNoteThreadPool.execute(()->{
|
||||
// completeAnnouncementSendInfo();
|
||||
@ -208,7 +207,7 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
log.info(" 获取登录人 LoginUser id: {}", sysUser.getId());
|
||||
Page<SysAnnouncement> page = new Page<SysAnnouncement>(pageNo,pageSize);
|
||||
List<SysAnnouncement> list = baseMapper.queryAllMessageList(page, sysUser.getId(), fromUser, starFlag, busType, beginDate, endDate);
|
||||
List<SysAnnouncement> list = baseMapper.queryAllMessageList(page, sysUser.getId(), fromUser, starFlag, busType, msgCategory,beginDate, endDate, noticeType);
|
||||
return list;
|
||||
}
|
||||
|
||||
@ -235,4 +234,21 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
return sysAnnouncementMapper.getNotSendedAnnouncementlist(new Date(), userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新访问量
|
||||
* @param id
|
||||
* @param increaseCount
|
||||
*/
|
||||
@Override
|
||||
public void updateVisitsNum(String id, int increaseCount) {
|
||||
SysAnnouncement sysAnnouncement = sysAnnouncementMapper.selectById(id);
|
||||
if (oConvertUtils.isNotEmpty(sysAnnouncement)) {
|
||||
int visits = oConvertUtils.getInt(sysAnnouncement.getVisitsNum(), 0);
|
||||
int totalValue = increaseCount + visits;
|
||||
sysAnnouncement.setVisitsNum(totalValue);
|
||||
sysAnnouncementMapper.updateById(sysAnnouncement);
|
||||
log.info("通知公告:{} 访问次数+1,总访问数量:{}", sysAnnouncement.getTitile(), sysAnnouncement.getVisitsNum());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package org.jeecg.modules.system.service.impl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.jeecg.dingtalk.api.core.response.Response;
|
||||
import freemarker.core.TemplateClassResolver;
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.Template;
|
||||
@ -23,20 +25,17 @@ import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.aspect.UrlMatchEnum;
|
||||
import org.jeecg.common.constant.*;
|
||||
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
||||
import org.jeecg.common.constant.enums.MessageTypeEnum;
|
||||
import org.jeecg.common.constant.enums.SysAnnmentTypeEnum;
|
||||
import org.jeecg.common.constant.enums.*;
|
||||
import org.jeecg.common.desensitization.util.SensitiveInfoUtil;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.query.QueryCondition;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
import org.jeecg.common.util.HTMLUtils;
|
||||
import org.jeecg.common.util.YouBianCodeUtil;
|
||||
import org.jeecg.common.util.*;
|
||||
import org.jeecg.common.util.dynamic.db.FreemarkerParseFactory;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.config.firewall.SqlInjection.IDictTableWhiteListHandler;
|
||||
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||
import org.jeecg.modules.message.entity.SysMessageTemplate;
|
||||
@ -137,6 +136,9 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
@Autowired
|
||||
private IDictTableWhiteListHandler dictTableWhiteListHandler;
|
||||
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
|
||||
@Override
|
||||
//@SensitiveDecode
|
||||
public LoginUser getUserByName(String username) {
|
||||
@ -420,7 +422,8 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
message.getToUser(),
|
||||
message.getTitle(),
|
||||
message.getContent(),
|
||||
message.getCategory());
|
||||
message.getCategory(),
|
||||
message.getNoticeType());
|
||||
try {
|
||||
// 同步发送第三方APP消息
|
||||
wechatEnterpriseService.sendMessage(message, true);
|
||||
@ -488,7 +491,10 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
announcement.setSendTime(new Date());
|
||||
announcement.setMsgCategory(CommonConstant.MSG_CATEGORY_2);
|
||||
announcement.setDelFlag(String.valueOf(CommonConstant.DEL_FLAG_0));
|
||||
sysAnnouncementMapper.insert(announcement);
|
||||
//update-begin-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
announcement.setIzTop(CommonConstant.IZ_TOP_0);
|
||||
//update-end-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
sysAnnouncementMapper.insert(announcement);
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
String userId = toUser;
|
||||
String[] userIds = userId.split(",");
|
||||
@ -558,7 +564,9 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
announcement.setMsgType(CommonConstant.MSG_TYPE_UESR);
|
||||
announcement.setSendStatus(CommonConstant.HAS_SEND);
|
||||
announcement.setSendTime(new Date());
|
||||
|
||||
//update-begin-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
announcement.setIzTop(CommonConstant.IZ_TOP_0);
|
||||
//update-end-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
if(tmplateParam!=null && oConvertUtils.isNotEmpty(tmplateParam.get(CommonSendStatus.MSG_ABSTRACT_JSON))){
|
||||
announcement.setMsgAbstract(tmplateParam.get(CommonSendStatus.MSG_ABSTRACT_JSON));
|
||||
}
|
||||
@ -1285,14 +1293,16 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发消息
|
||||
* @param fromUser
|
||||
* @param toUser
|
||||
* @param title
|
||||
* @param msgContent
|
||||
* @param setMsgCategory
|
||||
*/
|
||||
private void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory) {
|
||||
* 发消息
|
||||
*
|
||||
* @param fromUser
|
||||
* @param toUser
|
||||
* @param title
|
||||
* @param msgContent
|
||||
* @param setMsgCategory
|
||||
* @param noticeType
|
||||
*/
|
||||
private void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory, String noticeType) {
|
||||
SysAnnouncement announcement = new SysAnnouncement();
|
||||
announcement.setTitile(title);
|
||||
announcement.setMsgContent(msgContent);
|
||||
@ -1303,6 +1313,13 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
announcement.setSendTime(new Date());
|
||||
announcement.setMsgCategory(setMsgCategory);
|
||||
announcement.setDelFlag(String.valueOf(CommonConstant.DEL_FLAG_0));
|
||||
//update-begin-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
announcement.setIzTop(CommonConstant.IZ_TOP_0);
|
||||
//update-end-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
if(oConvertUtils.isEmpty(noticeType)){
|
||||
noticeType = NoticeTypeEnum.NOTICE_TYPE_SYSTEM.getValue();
|
||||
}
|
||||
announcement.setNoticeType(noticeType);
|
||||
sysAnnouncementMapper.insert(announcement);
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
String userId = toUser;
|
||||
@ -1324,6 +1341,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
obj.put(WebsocketConst.MSG_USER_ID, sysUser.getId());
|
||||
obj.put(WebsocketConst.MSG_ID, announcement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, announcement.getTitile());
|
||||
obj.put(CommonConstant.NOTICE_TYPE, noticeType);
|
||||
webSocket.sendMessage(sysUser.getId(), obj.toJSONString());
|
||||
}
|
||||
}
|
||||
@ -1355,6 +1373,10 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
announcement.setBusType(busType);
|
||||
announcement.setOpenType(SysAnnmentTypeEnum.getByType(busType).getOpenType());
|
||||
announcement.setOpenPage(SysAnnmentTypeEnum.getByType(busType).getOpenPage());
|
||||
announcement.setNoticeType(NoticeTypeEnum.NOTICE_TYPE_FLOW.getValue());
|
||||
//update-begin-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
announcement.setIzTop(CommonConstant.IZ_TOP_0);
|
||||
//update-end-author:liusq---date:2025-07-01--for: [QQYUN-12999]系统通知,系统通知时间更新,但是排到下面了
|
||||
sysAnnouncementMapper.insert(announcement);
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
String userId = toUser;
|
||||
@ -1376,6 +1398,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
obj.put(WebsocketConst.MSG_USER_ID, sysUser.getId());
|
||||
obj.put(WebsocketConst.MSG_ID, announcement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, announcement.getTitile());
|
||||
obj.put(CommonConstant.NOTICE_TYPE, NoticeTypeEnum.NOTICE_TYPE_FLOW.getValue());
|
||||
webSocket.sendMessage(sysUser.getId(), obj.toJSONString());
|
||||
}
|
||||
}
|
||||
@ -1392,7 +1415,23 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
EmailSendMsgHandle emailHandle=new EmailSendMsgHandle();
|
||||
emailHandle.sendMsg(email, title, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送短信消息
|
||||
* @param phone 手机号
|
||||
* @param param 模版参数
|
||||
* @param dySmsEnum 短信模版
|
||||
*/
|
||||
@Override
|
||||
public void sendSmsMsg(String phone, JSONObject param,DySmsEnum dySmsEnum) {
|
||||
try {
|
||||
log.info(" 发送短信消息 phone = {}", phone);
|
||||
log.info(" 发送短信消息 param = {}", param);
|
||||
DySmsHelper.sendSms(phone, param,dySmsEnum);
|
||||
} catch (ClientException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送html模版邮件消息
|
||||
* @param email
|
||||
@ -1842,4 +1881,56 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动发布流程
|
||||
* @param dataId
|
||||
* @param currentUserName
|
||||
*/
|
||||
@Override
|
||||
public void announcementAutoRelease(String dataId, String currentUserName) {
|
||||
//根据ID查询通知公告
|
||||
SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(dataId);
|
||||
//流程通过后自动发布通告
|
||||
sysAnnouncement.setSendStatus(CommonSendStatus.PUBLISHED_STATUS_1);
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setSender(currentUserName);
|
||||
boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
|
||||
//推送通知消息
|
||||
if(ok) {
|
||||
if(sysAnnouncement.getMsgType().equals(CommonConstant.MSG_TYPE_ALL)) {
|
||||
// 补全公告和用户之前的关系
|
||||
sysAnnouncementService.batchInsertSysAnnouncementSend(sysAnnouncement.getId(), sysAnnouncement.getTenantId());
|
||||
|
||||
// 推送websocket通知
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||
obj.put(WebsocketConst.MSG_ID, sysAnnouncement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, sysAnnouncement.getTitile());
|
||||
webSocket.sendMessage(obj.toJSONString());
|
||||
}else {
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
String userId = sysAnnouncement.getUserIds();
|
||||
String[] userIds = userId.substring(0, (userId.length()-1)).split(",");
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_USER);
|
||||
obj.put(WebsocketConst.MSG_ID, sysAnnouncement.getId());
|
||||
obj.put(WebsocketConst.MSG_TXT, sysAnnouncement.getTitile());
|
||||
webSocket.sendMessage(userIds, obj.toJSONString());
|
||||
}
|
||||
try {
|
||||
// 同步企业微信、钉钉的消息通知
|
||||
Response<String> dtResponse = dingtalkService.sendActionCardMessage(sysAnnouncement, null, true);
|
||||
wechatEnterpriseService.sendTextCardMessage(sysAnnouncement, true);
|
||||
|
||||
if (dtResponse != null && dtResponse.isSuccess()) {
|
||||
String taskId = dtResponse.getResult();
|
||||
sysAnnouncement.setDtTaskId(taskId);
|
||||
sysAnnouncementService.updateById(sysAnnouncement);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("同步发送第三方APP消息失败:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.system.constant.DefIndexConst;
|
||||
import org.jeecg.modules.system.entity.SysRoleIndex;
|
||||
import org.jeecg.modules.system.mapper.SysRoleIndexMapper;
|
||||
@ -11,7 +12,9 @@ import org.jeecg.modules.system.service.ISysRoleIndexService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* @Description: 角色首页配置
|
||||
* @Author: jeecg-boot
|
||||
@ -53,6 +56,7 @@ public class SysRoleIndexServiceImpl extends ServiceImpl<SysRoleIndexMapper, Sys
|
||||
entity.setUrl(url);
|
||||
entity.setComponent(component);
|
||||
entity.setRoute(isRoute);
|
||||
entity.setRelationType(CommonConstant.HOME_RELATION_ROLE);
|
||||
success = super.updateById(entity);
|
||||
}
|
||||
// 4. 清理缓存
|
||||
@ -80,6 +84,7 @@ public class SysRoleIndexServiceImpl extends ServiceImpl<SysRoleIndexMapper, Sys
|
||||
entity.setComponent(indexComponent);
|
||||
entity.setRoute(isRoute);
|
||||
entity.setStatus(CommonConstant.STATUS_1);
|
||||
entity.setRelationType(CommonConstant.HOME_RELATION_ROLE);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@ -88,4 +93,61 @@ public class SysRoleIndexServiceImpl extends ServiceImpl<SysRoleIndexMapper, Sys
|
||||
redisUtil.del(DefIndexConst.CACHE_KEY + "::" + DefIndexConst.DEF_INDEX_ALL);
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换默认门户
|
||||
* @param sysRoleIndex
|
||||
*/
|
||||
@Override
|
||||
public void changeDefHome(SysRoleIndex sysRoleIndex) {
|
||||
// 1. 先查询出配置信息
|
||||
String username = sysRoleIndex.getRoleCode();
|
||||
//当前状态(1:工作台/门户 0:菜单默认)
|
||||
String status = sysRoleIndex.getStatus();
|
||||
LambdaQueryWrapper<SysRoleIndex> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysRoleIndex::getRoleCode, username);
|
||||
queryWrapper.eq(SysRoleIndex::getRelationType,CommonConstant.HOME_RELATION_USER);
|
||||
queryWrapper.orderByAsc(SysRoleIndex::getPriority);
|
||||
List<SysRoleIndex> list = super.list(queryWrapper);
|
||||
boolean success = false;
|
||||
if(CommonConstant.STATUS_1.equalsIgnoreCase(status)){
|
||||
// 2. 如果存在则编辑
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
sysRoleIndex.setId(list.get(0).getId());
|
||||
sysRoleIndex.setStatus(CommonConstant.STATUS_1);
|
||||
sysRoleIndex.setRoute(true);
|
||||
success = super.updateById(sysRoleIndex);
|
||||
} else {
|
||||
// 3. 如果不存在则新增
|
||||
sysRoleIndex.setRelationType(CommonConstant.HOME_RELATION_USER);
|
||||
sysRoleIndex.setStatus(CommonConstant.STATUS_1);
|
||||
sysRoleIndex.setRoute(true);
|
||||
success = super.save(sysRoleIndex);
|
||||
}
|
||||
}else {
|
||||
// 0:菜单默认,则是菜单默认首页
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
//将用户级别的首页配置状态设置成0
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
SysRoleIndex roleIndex = list.get(i);
|
||||
roleIndex.setStatus(CommonConstant.STATUS_0);
|
||||
success = super.updateById(roleIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 4. 清理缓存
|
||||
if (success) {
|
||||
this.cleanDefaultIndexCache();
|
||||
redisUtil.del(DefIndexConst.CACHE_TYPE + username);
|
||||
}
|
||||
// 5. 缓存类型
|
||||
//当前地址
|
||||
String url = sysRoleIndex.getUrl();
|
||||
//首页类型(默认首页)
|
||||
String type = DefIndexConst.HOME_TYPE_MENU;
|
||||
if(oConvertUtils.isNotEmpty(url) && CommonConstant.STATUS_1.equalsIgnoreCase(status)){
|
||||
type = url.contains(DefIndexConst.HOME_TYPE_SYSTEM) ? DefIndexConst.HOME_TYPE_SYSTEM : DefIndexConst.HOME_TYPE_PERSONAL;
|
||||
}
|
||||
redisUtil.set(DefIndexConst.CACHE_TYPE + username,type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -104,15 +104,27 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
|
||||
@Override
|
||||
@CacheEvict(value={CacheConstant.SYS_USERS_CACHE}, allEntries=true)
|
||||
public void invitationUserJoin(String ids, String phone) {
|
||||
public void invitationUserJoin(String ids, String phone,String username) {
|
||||
String[] idArray = ids.split(SymbolConstant.COMMA);
|
||||
String userId = null;
|
||||
SysUser userByPhone = null;
|
||||
//update-begin---author:wangshuai ---date:20230313 for:【QQYUN-4605】后台的邀请谁加入租户,没办法选不是租户下的用户,通过手机号邀请------------
|
||||
SysUser userByPhone = userService.getUserByPhone(phone);
|
||||
//说明用户不存在
|
||||
if(null == userByPhone){
|
||||
throw new JeecgBootException("当前用户不存在,请核对手机号");
|
||||
if(oConvertUtils.isNotEmpty(phone)){
|
||||
userByPhone = userService.getUserByPhone(phone);
|
||||
//说明用户不存在
|
||||
if(null == userByPhone){
|
||||
throw new JeecgBootException("当前用户不存在,请核对手机号");
|
||||
}
|
||||
userId = userByPhone.getId();
|
||||
}else{
|
||||
userByPhone = userService.getUserByName(username);
|
||||
//说明用户不存在
|
||||
if(null == userByPhone){
|
||||
throw new JeecgBootException("当前用户不存在,请核对手机号");
|
||||
}
|
||||
userId = userByPhone.getId();
|
||||
}
|
||||
String userId = userByPhone.getId();
|
||||
|
||||
//循环租户id
|
||||
for (String id:idArray) {
|
||||
//update-begin---author:wangshuai ---date:20221223 for:[QQYUN-3371]租户逻辑改造,改成关系表------------
|
||||
|
||||
@ -353,23 +353,49 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
*/
|
||||
@Override
|
||||
public SysRoleIndex getDynamicIndexByUserRole(String username, String version) {
|
||||
List<String> roles = sysUserRoleMapper.getRoleByUserName(username);
|
||||
String componentUrl = RoleIndexConfigEnum.getIndexByRoles(roles);
|
||||
SysRoleIndex roleIndex = new SysRoleIndex(componentUrl);
|
||||
boolean isV3 = CommonConstant.VERSION_V3.equals(version);
|
||||
SysRoleIndex roleIndex = new SysRoleIndex();
|
||||
//只有 X-Version=v3 的时候,才读取sys_role_index表获取角色首页配置
|
||||
if (isV3 && CollectionUtils.isNotEmpty(roles)) {
|
||||
LambdaQueryWrapper<SysRoleIndex> routeIndexQuery = new LambdaQueryWrapper<>();
|
||||
//用户所有角色
|
||||
routeIndexQuery.in(SysRoleIndex::getRoleCode, roles);
|
||||
//角色首页状态0:未开启 1:开启
|
||||
routeIndexQuery.eq(SysRoleIndex::getStatus, CommonConstant.STATUS_1);
|
||||
//优先级正序排序
|
||||
routeIndexQuery.orderByAsc(SysRoleIndex::getPriority);
|
||||
List<SysRoleIndex> list = sysRoleIndexService.list(routeIndexQuery);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
roleIndex = list.get(0);
|
||||
boolean isV3 = CommonConstant.VERSION_V3.equals(version);
|
||||
if (isV3) {
|
||||
//update-begin-author:liusq---date:2025-07-01--for: [QQYUN-12980] 【首页配置】首页自定义配置功能页面
|
||||
//1.先查询 用户USER级别 的所有首页配置
|
||||
if(oConvertUtils.isNotEmpty(username)){
|
||||
LambdaQueryWrapper<SysRoleIndex> routeIndexUserQuery = new LambdaQueryWrapper<>();
|
||||
//角色首页状态0:未开启 1:开启
|
||||
routeIndexUserQuery.eq(SysRoleIndex::getStatus, CommonConstant.STATUS_1);
|
||||
routeIndexUserQuery.eq(SysRoleIndex::getRelationType, CommonConstant.HOME_RELATION_USER);
|
||||
routeIndexUserQuery.eq(SysRoleIndex::getRoleCode, username);
|
||||
//优先级正序排序
|
||||
routeIndexUserQuery.orderByAsc(SysRoleIndex::getPriority);
|
||||
List<SysRoleIndex> list = sysRoleIndexService.list(routeIndexUserQuery);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
roleIndex = list.get(0);
|
||||
}else{
|
||||
//2.用户没有配置,再查询 角色ROLE级别 的所有首页配置
|
||||
LambdaQueryWrapper<SysRoleIndex> routeIndexQuery = new LambdaQueryWrapper<>();
|
||||
//角色首页状态0:未开启 1:开启
|
||||
routeIndexQuery.eq(SysRoleIndex::getStatus, CommonConstant.STATUS_1);
|
||||
//角色所有首页配置
|
||||
routeIndexQuery.eq(SysRoleIndex::getRelationType, CommonConstant.HOME_RELATION_ROLE);
|
||||
//当前用户角色
|
||||
List<String> roles = sysUserRoleMapper.getRoleByUserName(username);
|
||||
String componentUrl = RoleIndexConfigEnum.getIndexByRoles(roles);
|
||||
roleIndex = new SysRoleIndex(componentUrl);
|
||||
//用户所有角色
|
||||
//update-begin-author:liusq---date:2025-07-21--for: [QQYUN-13187]【新用户登录报错】没有添加角色时 报错
|
||||
if(CollectionUtil.isNotEmpty(roles)){
|
||||
routeIndexQuery.in(SysRoleIndex::getRoleCode, roles);
|
||||
}
|
||||
//update-end-author:liusq---date:2025-07-21--for: [QQYUN-13187]【新用户登录报错】没有添加角色时 报错
|
||||
//优先级正序排序
|
||||
routeIndexQuery.orderByAsc(SysRoleIndex::getPriority);
|
||||
list = sysRoleIndexService.list(routeIndexQuery);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
roleIndex = list.get(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
//update-end-author:liusq---date:2025-07-01--for: [QQYUN-12980] 【首页配置】首页自定义配置功能页面
|
||||
}
|
||||
|
||||
if (oConvertUtils.isEmpty(roleIndex.getComponent())) {
|
||||
|
||||
@ -1,27 +1,47 @@
|
||||
-- 注意:该页面对应的前台目录为views/${entityPackagePath}文件夹下
|
||||
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||
|
||||
<#assign id = '${.now?string["yyyyMMddhhmmSSsss"]}0'>
|
||||
<#assign mainId = "${.now?long}01">
|
||||
<#assign addId = "${.now?long}02">
|
||||
<#assign editId = "${.now?long}03">
|
||||
<#assign delId = "${.now?long}04">
|
||||
<#assign batchDelId = "${.now?long}05">
|
||||
<#assign exportId = "${.now?long}06">
|
||||
<#assign importId = "${.now?long}07">
|
||||
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||
VALUES ('${id}', NULL, '${tableVo.ftlDescription}', '/${entityPackagePath}/${entityName?uncap_first}List', '${entityPackagePath}/${entityName}List', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0);
|
||||
-- 主菜单
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||
VALUES ('${mainId}', NULL, '${tableVo.ftlDescription}', '/${entityPackagePath}/${entityName?uncap_first}List', '${entityPackagePath}/${entityName}List', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0);
|
||||
|
||||
-- 权限控制sql
|
||||
-- 新增
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}1', '${id}', '添加${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${addId}', '${mainId}', '添加${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
|
||||
-- 编辑
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}2', '${id}', '编辑${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${editId}', '${mainId}', '编辑${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
|
||||
-- 删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}3', '${id}', '删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${delId}', '${mainId}', '删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
|
||||
-- 批量删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}4', '${id}', '批量删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${batchDelId}', '${mainId}', '批量删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
|
||||
-- 导出excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}5', '${id}', '导出excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${exportId}', '${mainId}', '导出excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
|
||||
-- 导入excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}6', '${id}', '导入excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${importId}', '${mainId}', '导入excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
|
||||
-- 角色授权(以 admin 角色为例,role_id 可替换)
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}08', 'f6817f48af4fb3af11b9e8bf182f618b', '${mainId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}09', 'f6817f48af4fb3af11b9e8bf182f618b', '${addId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}10', 'f6817f48af4fb3af11b9e8bf182f618b', '${editId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}11', 'f6817f48af4fb3af11b9e8bf182f618b', '${delId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}12', 'f6817f48af4fb3af11b9e8bf182f618b', '${batchDelId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}13', 'f6817f48af4fb3af11b9e8bf182f618b', '${exportId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}14', 'f6817f48af4fb3af11b9e8bf182f618b', '${importId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||
@ -134,6 +134,11 @@
|
||||
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7527]vue3代码生成默认带上高级查询---------- -->
|
||||
<#-- ** 高级查询生成(Vue3 * -->
|
||||
<#function superQueryFieldListForVue3(po,order)>
|
||||
<#-- 高级查询日期格式化 -->
|
||||
<#assign picker=''>
|
||||
<#if po.extendParams?exists && po.extendParams.picker?exists>
|
||||
<#assign picker='fieldExtendJson:"{\\"picker\\":\\"${po.extendParams.picker}\\"}",'>
|
||||
</#if>
|
||||
<#-- 字段展示/DB类型 -->
|
||||
<#assign baseAttrs="view: '${po.classType}', type: 'string',">
|
||||
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
|
||||
@ -189,7 +194,7 @@
|
||||
<#assign extAttrs="code: '${po.dictTable?default('')}', orgFields: '${orgField}', destFields: '${po.fieldName}', popupMulti: false,">
|
||||
</#if>
|
||||
|
||||
<#return "${po.fieldName}: {title: '${po.filedComment}',order: ${order},${baseAttrs}${extAttrs}}" >
|
||||
<#return "${po.fieldName}: {title: '${po.filedComment}',order: ${order},${baseAttrs}${extAttrs}${picker}}" >
|
||||
</#function>
|
||||
<#-- update-end---author:chenrui ---date:20231228 for:[QQYUN-7527]vue3代码生成默认带上高级查询---------- -->
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -303,7 +303,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -339,7 +339,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -378,7 +378,7 @@
|
||||
</#if>
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
};
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='form'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -368,7 +368,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -404,7 +404,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -484,7 +484,7 @@
|
||||
</#if>
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
visible.value = false;
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='form'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -447,7 +447,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -483,7 +483,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -544,7 +544,7 @@
|
||||
</#if>
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
};
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='form'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -117,8 +117,10 @@
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -516,7 +518,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -557,7 +559,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -595,7 +597,7 @@
|
||||
}
|
||||
</#if>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -349,7 +349,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -384,7 +384,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -443,7 +443,7 @@
|
||||
</#if>
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
}
|
||||
};
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='form'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -389,7 +389,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
},
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -426,7 +426,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -464,7 +464,7 @@
|
||||
}
|
||||
</#if>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='form'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'button'>
|
||||
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
|
||||
</#if>
|
||||
@ -356,7 +356,7 @@
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -392,7 +392,7 @@
|
||||
auth: '${entityPackage}:${tableName}:delete'
|
||||
}
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle == 'link'>
|
||||
,{
|
||||
label: '${btn.buttonName}',
|
||||
@ -451,7 +451,7 @@
|
||||
</#if>
|
||||
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='button'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
@ -252,7 +252,7 @@
|
||||
</#list>
|
||||
};
|
||||
<#if buttonList?size gt 0>
|
||||
<#list buttonList?sort_by('orderNum') as btn>
|
||||
<#list buttonList?filter(it -> it.orderNum?? && it.orderNum != null)?sort_by("orderNum") as btn>
|
||||
<#if btn.buttonStyle=='form'>
|
||||
function handle${btn.buttonCode?cap_first}(){
|
||||
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user