44 Commits

Author SHA1 Message Date
随遇而安
8216db72b4 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-11 17:53:10 +00:00
随遇而安
8501632079 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-08 02:11:38 +00:00
随遇而安
1a3c6fd460 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 14:02:54 +00:00
随遇而安
2cf44dc4ef update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 14:00:10 +00:00
随遇而安
7b361e6eae update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 13:57:36 +00:00
随遇而安
07392576f3 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 13:52:38 +00:00
随遇而安
79d2a82e2d update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 13:51:11 +00:00
随遇而安
d357a68e35 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 13:48:27 +00:00
随遇而安
ce0abdfbb1 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 13:47:58 +00:00
kerwincui
bc93c2d2eb 增加gitee投票说明 2025-12-03 21:45:15 +08:00
随遇而安
5f33234e8b update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 08:47:07 +00:00
随遇而安
73f66f8d78 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 08:28:49 +00:00
随遇而安
3c7a64327d update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 08:19:27 +00:00
随遇而安
fa25f771a2 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 07:40:45 +00:00
随遇而安
3e4d271be8 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 07:37:47 +00:00
随遇而安
63d2258911 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 07:36:19 +00:00
随遇而安
f48e7a1579 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 07:12:51 +00:00
随遇而安
44f3182ec3 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 07:04:27 +00:00
随遇而安
0306e5c6cb update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 06:29:21 +00:00
随遇而安
4dc62fdecd update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 06:25:07 +00:00
随遇而安
61a9c0a846 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 06:22:07 +00:00
随遇而安
b3cb59e151 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 03:42:59 +00:00
随遇而安
9dad5ec04c update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-03 03:41:28 +00:00
随遇而安
6cf181ee8d update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-02 10:05:42 +00:00
随遇而安
d7b5ce1c16 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-12-02 10:03:17 +00:00
随遇而安
c5a9d0d567 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-11-22 15:13:28 +00:00
gx_ma
f5af688500 refactor(多数据源): 运行报错修复 2025-11-20 15:40:42 +08:00
gx_ma
908c4e58a7 Merge remote-tracking branch 'origin/master' 2025-11-20 15:39:37 +08:00
gx_ma
1e7bd72bfa refactor(多数据源): 运行报错修复 2025-11-20 15:33:13 +08:00
zhuangpeng.li
5058e2edc7 fix(XXE漏洞修复): XXE漏洞修复 2025-11-20 11:23:29 +08:00
随遇而安
d56c600643 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-11-06 03:01:50 +00:00
随遇而安
c5ddae9565 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-09-04 04:06:01 +00:00
随遇而安
edf2dc0b88 update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-07-29 07:49:43 +00:00
随遇而安
21f0a90a2d update README.md.
Signed-off-by: 随遇而安 <164770707@qq.com>
2025-07-29 07:46:25 +00:00
gx_ma
fe28413ab2 fix(删除用户): 用户删除bug修复 2025-06-04 14:50:23 +08:00
gx_ma
25bcaae210 fix(用户注册): 注册失败修复 2025-05-26 10:16:41 +08:00
gx_ma
a082c61f6b refactor(开源演示地址删除): 开源地址删除 2025-05-23 16:31:47 +08:00
baiying
2ad5d6ff28 fix(修改密码):修改密码传参方式修改 2025-05-20 16:52:26 +08:00
kerwincui
7f58d3e12b 后端配置简化 2025-05-15 12:07:16 +08:00
kerwincui
7079610ee4 认证信息输入框宽度调整 2025-05-15 12:06:50 +08:00
Zhu
5bb2794e8c fix(设备详情): 报错修复 2025-05-15 10:10:29 +08:00
gx_ma
4ec2f3eeaa feat(多数据源): 初始化sql更新 2025-05-07 15:45:40 +08:00
zhuangpeng.li
bc5b492d26 Merge branch 'dev-ruoyi-5.8.9' 2025-04-28 10:44:57 +08:00
zhuangpeng.li
a3625cd254 fix(去除sun包): 去除sun包,兼容其他版本jdk 2025-04-28 10:43:48 +08:00
185 changed files with 935 additions and 870 deletions

144
README.md
View File

@@ -1,93 +1,95 @@
![](./images/banner.jpg)
[![gitee投票](./images/banner1.png)](https://gitee.com/activity/2025opensource?ident=IKKZS9)
FastBee 是一款面向中小企业与个人开发者的**轻量**、**易用**、**全栈**开源物联网平台。
---
### 一、项目介绍
1. FastBee开源物联网平台,简单易用,更适合中小企业和个人学习使用。适用于智能家居、智慧办公、智慧社区、农业监测、水利监测、工业控制等
2. 系统后端采用Spring boot前端采用VueMqtt服务端使用netty搭建移动端支持微信小程序、安卓、苹果和H5采用Uniapp数据库采用Mysql、TDengine和Redis设备端支持ESP32、ESP8266、树莓派、合宙等
FastBee 集设备管理、数据监控、多端应用于一体,支持[一键容器化部署](https://fastbee.cn/doc/install/docker.html),适用于智能家居、智慧办公、智慧社区、农业监测、水利监测、工业控制等多种场景。平台基于 Spring Boot 开发,<b>内置高性能 MQTT 服务端,无需额外部署 EMQX 或其他 MQTT 服务端</b>,前端采用 Vue 与 ElementUI移动端支持微信小程序、Android、iOS 及 H5设备端兼容 ESP32、ESP8266、树莓派、合宙等常见硬件
---
### 二、系统功能
| 系统功能 | 功能说明 |
|:------------------------:|:-----------------------------------------------:|
| 产品管理 | 产品详情、产品物模型、产品分类、设备授权、产品固件 |
| 设备管理 | 设备详情、设备分组、设备日志、设备分享、设备实时控制、实时状态、数据监测 |
| 物模型管理 | 属性(设备状态和监测数据),功能(执行特定任务),事件(设备主动上报给云端) |
| MQTT接入 | emqx开源版、netty版本MqttBroker |
| 硬件 SDK | ESP-IDF、Arduino、RaspberryPi、合宙等平台设备接入 |
| 视频监控接入 | 基于GB/T28181协议支持主流厂商监控设备接入,直播 |
| 权限管理 | 基于若依权限管理系统,用户、部分、角色、岗位、权限、日志等 |
| 系统功能 | 功能说明 |
|----------------|--------------------------------------------------------------------------|
| 产品管理 | 创建产品、定义物模型、设置设备认证方式、管理产品分类及固件版本 |
| 设备管理 | 设备注册、分组、实时状态监测、远程控制、操作日志追溯及设备分享功能 |
| 物模型管理 | 提供标准化的属性、功能和事件定义,实现设备与平台的数据语义统一 |
| 规则脚本 | 对设备上报和平台下发的原始数据进行处理,转发后匹配设备交互格式 |
| MQTT 接入 | 内置基于 Netty 开发的高性能 MQTT Broker无需额外部署第三方服务 |
| 视频监控接入 | 支持 GB/T 28181 国家标准协议,实现视频直播与设备管理 |
| 权限管理 | 基于成熟的若依权限框架,实现用户、角色、部门、岗位及操作日志的精细化管控 |
| 多数据源 | 支持 MySQL、PostgreSQL、MSSQL 等关系型数据库 |
| 硬件 SDK | 提供 ESP-IDF、Arduino、树莓派、合宙等常见硬件平台的接入示例与 SDK |
| 多端应用支持 | 提供 Web 控制台Vue + ElementUI、微信小程序、Android/iOS App 及 H5 界面 |
| 一键部署 | 推荐使用 Docker 容器化部署,支持[快速搭建](https://fastbee.cn/doc/install/docker.html)完整环境 |
[![](https://gitee.com/beecue/fastbee-sdk/raw/master/Arduino/FastBeeEsp32/device.png)](https://gitee.com/beecue/FastBee-Arduino)
![](https://oscimg.oschina.net/oscnet/up-a9a7fdaf40208becd26c2485783bc0f86e6.png)
---
### 三、快速开始
1. **环境准备**:确保服务器已安装 `Docker``Docker Compose`
2. **执行命令**
```bash
sudo wget -c https://hub.fastbee.cn/resource/install.sh && bash ./install.sh
```
根据提示选择“开源版本”,脚本将自动完成所有服务的拉取与启动。
3. **访问系统**:部署完成后,通过浏览器访问 `http://你的服务器IP:端口`,默认账号为 `admin`,密码为 `admin123`。
4. **详细步骤**:请查阅 [官方安装文档](https://fastbee.cn/doc/install/docker.html)。
---
### 四、技术栈
##### 服务端
- 相关技术Spring boot、MyBatis、Spring Security、Jwt、Mysql、Redis、TDengine、Netty等
- 开发工具IDEA
- 源码目录spring-boot文件夹下
##### Web端
- 相关技术ES6、Vue、Vuex、Vue-router、Vue-cli、Axios、Element-ui、Echart等
- 开发工具Visual Studio Code
- 源码目录vue文件夹下
##### 移动端(微信小程序 / Android / Ios / H5
- 相关技术uniapp、[uView](https://www.uviewui.com/)、[uChart](https://www.ucharts.cn/)
- 开发工具HBuilder
- 源码地址:[https://gitee.com/beecue/fastbee-app](https://gitee.com/beecue/fastbee-app)
##### 硬件端
- 相关技术: ESP-IDF、Arduino、FreeRTOS、Python、Lua等
- 开发工具Visual Studio Code 和 Arduino等
- 源码地址:[https://gitee.com/beecue/fastbee-sdk](https://gitee.com/beecue/fastbee-sdk)
##### 部署与运维
- 相关技术docker、docker-compose、shell
- [快速部署](https://fastbee.cn/doc/install/docker.html)安装好docker和docker-compose后执行命令 ` sudo wget -c https://hub.fastbee.cn/resource/install.sh && bash ./install.sh ` 然后选择开源版本,等待完成部署
|空气检测仪| 物联网开发板 | Air724开发板 | 智能开关| [查看更多>>](https://fastbee.cn/doc/device/) |
| :----: | :----------: |:----------: |:----------: |:----------: |
| ![](https://oscimg.oschina.net/oscnet/up-ad98a81677e5e68d660866770e3266ca4cf.png) | ![](https://oscimg.oschina.net/oscnet/up-68caf860d0659444e73f42717a03d2fdf72.png) | ![](https://oscimg.oschina.net/oscnet/up-cf690f6058042dccb567ff382ea9432ebab.png) |![](https://oscimg.oschina.net/oscnet/up-c4a7971510127324d6566dd6ea95d571483.jpg) | ![](https://oscimg.oschina.net/oscnet/up-4ce09be3599e3ff7ed91fe182572abd258b.jpg) |
---
### 三、技术栈
* 服务端
- 相关技术Spring boot、MyBatis、Spring Security、Jwt、Mysql、Redis、TDengine、EMQX、Netty等
- 开发工具IDEA
* Web端
- 相关技术ES6、Vue、Vuex、Vue-router、Vue-cli、Axios、Element-ui、Echart等
- 开发工具Visual Studio Code
* 移动端(微信小程序 / Android / Ios / H5
- 相关技术uniapp、[uView](https://www.uviewui.com/)、[uChart](https://www.ucharts.cn/)
- 开发工具HBuilder
* 硬件端
- 相关技术: ESP-IDF、Arduino、FreeRTOS、Python、Lua等
- 开发工具Visual Studio Code 和 Arduino等
### 五、其他
1. **商用授权**:开源版本采用 AGPL3 协议,可用于个人学习和使用,商业用途推荐购买[商业版本授权](https://fastbee.cn/doc/pages/sponsor/)。
2. **在线演示**[商业版本演示地址](https://iot.fastbee.cn/)(开源版本暂仅支持 MQTT 协议)。
3. **系统文档**[https://fastbee.cn/doc/](https://fastbee.cn/doc/)
4. **QQ 交流群**720136372、946029159、1073236354
### 四、项目目录
&nbsp;&nbsp;&nbsp;&nbsp; app -------------------- 移动端(微信小程序 / Android / Ios / H5 商业版开源<br/>
&nbsp;&nbsp;&nbsp;&nbsp; docker ---------------- docker部署文件<br />
&nbsp;&nbsp;&nbsp;&nbsp; spring-boot ---------- 后端<br/>
&nbsp;&nbsp;&nbsp;&nbsp; vue -------------------- 前端<br />
---
### 六、部分图片
### 五、商用授权
项目采用AGPL3协议可用于个人学习和使用商业用途需要赞助项目获得授权并提供商业版本源码、可视化平台和移动端源码。赞助过的用户请下载商业版本源码。
- [授权详情>>](https://fastbee.cn/doc/pages/sponsor/) &nbsp; [商业版本源码>>](https://fastbee.cn/doc/pages/sponsor/)
- [移动端源码>>](https://gitee.com/beecue/fastbee-app) &nbsp; [可视化平台源码>>](https://fastbee.cn/doc/pages/sponsor/)
- [硬件SDK源码>>](https://gitee.com/beecue/fastbee-sdk)
- 二开项目同样遵守AGPL3.0协议进行开源,可以向原作者申请授权
- 如果商业项目想转闭源,可以向原作者申请或者购买闭源授权
### 六、贡献代码
- [贡献者指南>>](./doc/贡献者指南.md)
- [Git提交规范>>](./doc/Git提交规范.md)
- [功能规划>>](./RoadMap.md)
### 七、其他
1. QQ交流群&#x1F680;946029159(已满) &#x1F680;1073236354 &#x1F680;720136372
2. 权限管理基于ruoyi-vue系统开发Mqtt消息服务器使用EMQX5.0开源版
* [开源版本在线演示](http://101.33.237.12/)
* [商业版本在线演示](https://iot.fastbee.cn/)
* [项目使用文档](https://fastbee.cn/doc/)
* [若依权限管理系统文档](http://doc.ruoyi.vip/ruoyi-vue/)
* [EMQX5.0消息服务器文档](https://www.emqx.io/docs/zh/v5.0/)
* [uCharts高性能跨平台图表库](https://www.ucharts.cn)
3. 项目贡献者(如有遗漏请联系作者)
- [小驿物联](https://gitee.com/iot-xiaoyi)、[CrazyDull](https://gitee.com/crazyDull)、[YBZX](https://github.com/YBZX)、 [CQAdu](https://gitee.com/iot.adu)、[孙阿龙](https://gitee.com/sunalong)、[xxmfl](https://gitee.com/xxmfl)、[董晓龙-3715687@qq.com](https://fastbee.cn/)
- [SXH](https://gitee.com/sixiaohu)、 [Redamancy_zxp](https://gitee.com/redamancy-zxp)、 [LEE](https://gitee.com/yueming188)、 [LemonTree](https://gitee.com/fishhunterplus)、 [Tang](https://gitee.com/mexiaotang)、 [Tang](https://gitee.com/mexiaotang)、[KUN](https://gitee.com/L_KUN_KUN)
4. 主要参与用户:
- [Guanshubiao](https://gitee.com/guanshubiao):熟悉物联网开发,完善和优化系统的网关架构和部分功能等
- [帐篷](https://gitee.com/zhuangpengli):熟悉物联网开发,完善视频监控模块和部分协议等
- [JaminDeng](https://gitee.com/jamin-deng):熟悉物联网开发,完善平台前端设计可视化等
### 八、部分图片
![](https://oscimg.oschina.net/oscnet/up-972dea7b54eca705dcc8bf2fe0680b12c09.png)
![](https://oscimg.oschina.net/oscnet/up-6d89f1558797a9becf07c20f92c1407a13a.png)
![部分功能截图](https://oscimg.oschina.net/oscnet/up-972dea7b54eca705dcc8bf2fe0680b12c09.png)
![部分功能截图](https://oscimg.oschina.net/oscnet/up-6d89f1558797a9becf07c20f92c1407a13a.png)
<table>
<tr>
@@ -112,4 +114,6 @@
</tr>
</table>
---
FastBee 项目代码完全开源,覆盖设备 SDK、后端服务、前端应用和移动端兼顾成熟度、性能与开发效率适合中小企业快速构建物联网业务也便于开发者进行二次开发与学习研究。

View File

@@ -24,6 +24,7 @@ DROP TABLE IF EXISTS `gen_table`;
CREATE TABLE `gen_table` (
`table_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '表名称',
`data_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据源名称',
`table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '表描述',
`sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联子表的表名',
`sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子表关联的外键名',
@@ -230,7 +231,7 @@ INSERT INTO `iot_device_job` VALUES (5, '告警定时触发', 'DEFAULT', '0 13 1
DROP TABLE IF EXISTS `iot_device_log`;
CREATE TABLE `iot_device_log` (
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设备监测信息ID',
`identity` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标识符',
`identify` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标识符',
`model_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物模型名称',
`log_type` tinyint(1) NOT NULL COMMENT '类型1=属性上报2=调用功能3=事件上报4=设备升级5=设备上线6=设备离线)',
`log_value` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '日志值',
@@ -327,7 +328,7 @@ INSERT INTO `iot_device_user` VALUES (140, 1, 1, 'admin', '¥视频监控', '15
DROP TABLE IF EXISTS `iot_event_log`;
CREATE TABLE `iot_event_log` (
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设备事件日志ID',
`identity` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标识符',
`identify` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标识符',
`model_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物模型名称',
`log_type` tinyint(1) NOT NULL COMMENT '类型3=事件上报5=设备上线6=设备离线)',
`log_value` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '日志值',
@@ -1530,7 +1531,7 @@ CREATE TABLE `sip_config` (
`enabled` tinyint(1) NULL DEFAULT NULL COMMENT '使能开关',
`isdefault` tinyint(1) NULL DEFAULT NULL COMMENT '系统默认配置',
`seniorSdp` tinyint(1) NULL DEFAULT NULL COMMENT '拓展sdp',
`domain` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '服务器域',
`domain_alias` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '服务器域',
`server_sipid` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '服务器sipid',
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'sip认证密码',
`ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'sip接入IP',
@@ -1566,14 +1567,14 @@ CREATE TABLE `sip_device` (
`model` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品型号',
`firmware` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '固件版本',
`transport` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'UDP' COMMENT '传输模式',
`streamMode` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'UDP' COMMENT '流模式',
`stream_mode` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'UDP' COMMENT '流模式',
`online` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '在线状态',
`registerTime` datetime NOT NULL COMMENT '注册时间',
`lastConnectTime` datetime NULL DEFAULT NULL COMMENT '最后上线时间',
`register_time` datetime NOT NULL COMMENT '注册时间',
`last_connect_time` datetime NULL DEFAULT NULL COMMENT '最后上线时间',
`active_time` datetime NULL DEFAULT NULL COMMENT '激活时间',
`ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备入网IP',
`port` bigint(10) NULL DEFAULT NULL COMMENT '设备接入端口号',
`hostAddress` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备地址',
`host_address` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备地址',
`del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 2代表删除',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
@@ -2436,7 +2437,11 @@ CREATE TABLE `sys_oper_log` (
`status` int(1) NULL DEFAULT 0 COMMENT '操作状态0正常 1异常',
`error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误消息',
`oper_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`oper_id`) USING BTREE
`cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间',
PRIMARY KEY (`oper_id`) USING BTREE,
KEY idx_sys_oper_log_bt (business_type),
KEY idx_sys_oper_log_s (status),
KEY idx_sys_oper_log_ot (oper_time)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------

BIN
images/banner1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -39,9 +39,8 @@
<!-- Mysql驱动包 -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${mysql.version}</version>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 核心模块-->

View File

@@ -1,6 +1,5 @@
package com.fastbee;
import com.dtflys.forest.springboot.annotation.ForestScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@@ -3,9 +3,9 @@ package com.fastbee.web.controller.common;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -25,7 +25,7 @@ import com.fastbee.system.service.ISysConfigService;
/**
* 验证码操作处理
*
*
* @author ruoyi
*/
@Api(tags = "验证码操作")
@@ -40,7 +40,7 @@ public class CaptchaController
@Autowired
private RedisCache redisCache;
@Autowired
private ISysConfigService configService;
/**

View File

@@ -2,8 +2,8 @@ package com.fastbee.web.controller.common;
import java.util.ArrayList;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -26,7 +26,7 @@ import com.fastbee.framework.config.ServerConfig;
/**
* 通用请求处理
*
*
* @author ruoyi
*/
@Api(tags = "通用请求处理")
@@ -43,7 +43,7 @@ public class CommonController
/**
* 通用下载请求
*
*
* @param fileName 文件名称
* @param delete 是否删除
*/

View File

@@ -1,7 +1,7 @@
package com.fastbee.web.controller.monitor;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -25,7 +25,7 @@ import com.fastbee.system.service.ISysLogininforService;
/**
* 系统访问记录
*
*
* @author ruoyi
*/
@Api(tags = "日志管理:登录日志")

View File

@@ -1,7 +1,7 @@
package com.fastbee.web.controller.monitor;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -24,7 +24,7 @@ import com.fastbee.system.service.ISysOperLogService;
/**
* 操作日志记录
*
*
* @author ruoyi
*/
@Api(tags = "日志管理:操作日志")

View File

@@ -1,7 +1,7 @@
package com.fastbee.web.controller.system;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -2,7 +2,7 @@ package com.fastbee.web.controller.system;
import java.util.ArrayList;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@@ -27,7 +27,7 @@ import com.fastbee.system.service.ISysDictTypeService;
/**
* 数据字典信息
*
*
* @author ruoyi
*/
@RestController

View File

@@ -1,7 +1,7 @@
package com.fastbee.web.controller.system;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -1,7 +1,7 @@
package com.fastbee.web.controller.system;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -1,7 +1,7 @@
package com.fastbee.web.controller.system;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -22,7 +22,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.stream.Collectors;

View File

@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
/**
* swagger 用户测试方法

View File

@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

View File

@@ -39,12 +39,11 @@ spring:
# redis 配置
spring.data:
# redis 配置
redis:
host: localhost # 地址
port: 6379 # 端口默认为6379
database: 10 # 数据库索引
database: 15 # 数据库索引
password: fastbee # 密码
timeout: 10s # 连接超时时间
lettuce:

View File

@@ -38,7 +38,6 @@ spring:
# password: fastbee
# redis 配置
spring.data:
redis:
host: 177.7.0.10 # 地址
port: 6379 # 端口默认为6379

View File

@@ -66,11 +66,10 @@ spring:
# redis 配置
spring.data:
redis:
host: 192.168.5.12 # 地址
host: 81.71.97.58 # 地址
port: 6379 # 端口默认为6379
database: 11 # 数据库索引
database: 11 # 数据库索引
password: fastbee # 密码
timeout: 10s # 连接超时时间
lettuce:
@@ -86,7 +85,7 @@ sip:
## 本地调试时绑定网卡局域网IP设备在同一局域网设备接入IP填写绑定IP
## 部署服务端时默认绑定容器IP设备接入IP填写服务器公网IP
#ip: 177.7.0.13
ip: 192.168.5.12
ip: 192.168.5.27
port: 5061 # SIP端口(保持默认)
domain: 3402000000 # 由省级、市级、区级、基层编号组成
id: 34020000002000000001 # 同上,另外增加编号,(可保持默认)

View File

@@ -5,7 +5,7 @@ fastbee:
copyrightYear: 2024 # 版权年份
demoEnabled: true # 实例演示开关
# 文件路径以uploadPath结尾 示例( Windows配置 D:/uploadPathLinux配置 /uploadPath
profile: /uploadPath
profile: D:/uploadPath
addressEnabled: true # 获取ip地址开关
captchaType: math # 验证码类型 math 数组计算 char 字符验证
@@ -22,24 +22,17 @@ server:
min-spare: 100 # Tomcat启动初始化的线程数默认值10
# 基于netty的服务器
broker:
must-pass: false # 客户端连接是否需要密码
enabled: true # 需要配置为true
broker-node: node1
port: 1883
websocket-port: 8083
websocket-path: /mqtt
keep-alive: 30 # 默认的全部客户端心跳上传时间
keep-alive: 70 # 默认的全部客户端心跳上传时间
# Spring配置
spring:
# 环境配置dev=开发环境prod=生产环境
profiles:
active: prod # 环境配置dev=开发环境prod=生产环境
main:
allow-circular-references: true
mvc:
pathmatch:
matching-strategy: ant_path_matcher
active: dev # 环境配置dev=开发环境prod=生产环境
# 资源信息
messages:
# 国际化资源文件路径
@@ -75,12 +68,6 @@ spring:
strict: false
lazy: true
#集群配置
cluster:
enable: true
type: redis
# 用户配置
user:
password:
@@ -95,16 +82,11 @@ token:
# mybatis-plus配置
mybatis-plus:
# 搜索指定包别名
typeAliasesPackage: com.fastbee.**.domain
# 配置mapper的扫描找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
typeAliasesPackage: com.fastbee.**.domain # 搜索指定包别名
mapperLocations: classpath*:mapper/**/*Mapper.xml # 配置mapper的扫描找到所有的mapper.xml映射文件
configLocation: classpath:mybatis/mybatis-config.xml # 加载全局的配置文件
global-config:
dbConfig:
# 主键类型
# AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
# 如需改为自增 需要将数据库表全部设置为自增
db-config:
id-type: AUTO # 自增 ID
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
@@ -120,8 +102,3 @@ xss:
enabled: true # 过滤开关
excludes: /system/notice # 排除链接(多个用逗号分隔)
urlPatterns: /system/*,/monitor/*,/tool/* # 匹配链接
forest:
max-connections: 1000 # 连接池最大连接数
connect-timeout: 3000 # 连接超时时间,单位为毫秒
read-timeout: 3000 # 数据读取超时时间,单位为毫秒

View File

@@ -38,7 +38,7 @@
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
@@ -74,7 +74,7 @@
<!-- 动态数据源 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<!-- 阿里JSON解析器 -->
@@ -139,10 +139,9 @@
<!-- servlet包 -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@@ -174,16 +173,16 @@
<artifactId>guava</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.redisson</groupId>-->
<!-- <artifactId>redisson-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel-core</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,13 +1,14 @@
package com.fastbee.common.annotation;
import com.fastbee.common.utils.poi.ExcelHandlerAdapter;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.math.BigDecimal;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import com.fastbee.common.utils.poi.ExcelHandlerAdapter;
/**
* 自定义导出Excel数据注解
@@ -56,7 +57,6 @@ public @interface Excel
/**
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
*/
@SuppressWarnings("deprecation")
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
/**

View File

@@ -15,13 +15,12 @@ import com.fastbee.common.utils.StringUtils;
import com.fastbee.common.utils.sql.SqlUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import javax.annotation.Resource;
import java.beans.PropertyEditorSupport;
import java.util.Date;
import java.util.List;

View File

@@ -1,11 +1,10 @@
package com.fastbee.common.core.domain;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data

View File

@@ -4,14 +4,12 @@ import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fastbee.common.constant.UserConstants;
import com.fastbee.common.core.domain.entity.SysDept;
import com.fastbee.common.core.domain.entity.SysMenu;
import com.fastbee.common.utils.StringUtils;
/**
* Treeselect树结构实体类
*
*
* @author ruoyi
*/
public class TreeSelect implements Serializable
@@ -24,9 +22,6 @@ public class TreeSelect implements Serializable
/** 节点名称 */
private String label;
/** 节点禁用 */
private boolean disabled = false;
/** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeSelect> children;
@@ -40,7 +35,6 @@ public class TreeSelect implements Serializable
{
this.id = dept.getDeptId();
this.label = dept.getDeptName();
this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus());
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
@@ -71,16 +65,6 @@ public class TreeSelect implements Serializable
this.label = label;
}
public boolean isDisabled()
{
return disabled;
}
public void setDisabled(boolean disabled)
{
this.disabled = disabled;
}
public List<TreeSelect> getChildren()
{
return children;

View File

@@ -2,20 +2,20 @@ package com.fastbee.common.core.domain.entity;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.core.domain.BaseEntity;
/**
* 部门表 sys_dept
*
*
* @author ruoyi
*/
@ApiModel(value = "SysDept", description = "部门表 sys_dept")
@@ -66,7 +66,7 @@ public class SysDept extends BaseEntity
/** 父部门名称 */
@ApiModelProperty("父部门名称")
private String parentName;
/** 子部门 */
@ApiModelProperty("子部门")
private List<SysDept> children = new ArrayList<SysDept>();

View File

@@ -1,7 +1,8 @@
package com.fastbee.common.core.domain.entity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -13,7 +14,7 @@ import com.fastbee.common.core.domain.BaseEntity;
/**
* 字典数据表 sys_dict_data
*
*
* @author ruoyi
*/
@ApiModel(value = "SysDictData", description = "字典数据表 sys_dict_data")
@@ -165,7 +166,7 @@ public class SysDictData extends BaseEntity
{
this.status = status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@@ -1,9 +1,8 @@
package com.fastbee.common.core.domain.entity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -15,7 +14,7 @@ import com.fastbee.common.core.domain.BaseEntity;
/**
* 字典类型表 sys_dict_type
*
*
* @author ruoyi
*/
@ApiModel(value = "SysDictType", description = "字典类型表 sys_dict_type")
@@ -87,7 +86,7 @@ public class SysDictType extends BaseEntity
{
this.status = status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@@ -2,9 +2,9 @@ package com.fastbee.common.core.domain.entity;
import java.util.ArrayList;
import java.util.List;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

View File

@@ -1,13 +1,12 @@
package com.fastbee.common.core.domain.entity;
import java.util.Set;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.annotation.Excel;
@@ -16,7 +15,7 @@ import com.fastbee.common.core.domain.BaseEntity;
/**
* 角色表 sys_role
*
*
* @author ruoyi
*/
@ApiModel(value = "SysRole", description = "角色表 sys_role")

View File

@@ -2,9 +2,7 @@ package com.fastbee.common.core.domain.entity;
import java.util.Date;
import java.util.List;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

View File

@@ -5,7 +5,7 @@ import com.fastbee.common.utils.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.Map;

View File

@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import javax.validation.constraints.NotNull;
/**
* OTA远程升级

View File

@@ -627,7 +627,7 @@ public class RedisCache {
public List<Object> scan(String query) {
Set<String> keys = (Set<String>) redisTemplate.execute((RedisCallback<Set<String>>) connection -> {
Set<String> keysTmp = new HashSet<>();
Cursor<byte[]> cursor = connection.scan(ScanOptions.scanOptions().match(query).count(1000).build());
Cursor<byte[]> cursor = connection.scan(new ScanOptions.ScanOptionsBuilder().match(query).count(1000).build());
while (cursor.hasNext()) {
keysTmp.add(new String(cursor.next()));
}

View File

@@ -1,5 +1,7 @@
package com.fastbee.common.core.text;
import com.fastbee.common.utils.StringUtils;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
@@ -7,7 +9,6 @@ import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.text.NumberFormat;
import java.util.Set;
import com.fastbee.common.utils.StringUtils;
/**
* 类型转换器

View File

@@ -1,8 +1,9 @@
package com.fastbee.common.enums;
import java.util.function.Function;
import com.fastbee.common.utils.DesensitizedUtil;
import java.util.function.Function;
/**
* 脱敏类型
*

View File

@@ -1,19 +1,19 @@
package com.fastbee.common.filter;
import java.io.IOException;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.FilterConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.MediaType;
import com.fastbee.common.utils.StringUtils;
/**
* Repeatable 过滤器
*
*
* @author ruoyi
*/
public class RepeatableFilter implements Filter

View File

@@ -4,17 +4,17 @@ import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import jakarta.servlet.ReadListener;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import com.fastbee.common.utils.http.HttpHelper;
import com.fastbee.common.constant.Constants;
/**
* 构建可重复读取inputStream的request
*
*
* @author ruoyi
*/
public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper

View File

@@ -3,14 +3,14 @@ package com.fastbee.common.filter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.FilterConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.common.utils.StringUtils;
import com.fastbee.common.enums.HttpMethod;

View File

@@ -2,10 +2,10 @@ package com.fastbee.common.filter;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import jakarta.servlet.ReadListener;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.apache.commons.io.IOUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
@@ -14,7 +14,7 @@ import com.fastbee.common.utils.html.EscapeUtil;
/**
* XSS过滤处理
*
*
* @author ruoyi
*/
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
@@ -100,7 +100,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
/**
* 是否是Json请求
*
*
* @param request
*/
public boolean isJsonRequest()
@@ -108,4 +108,4 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
String header = super.getHeader(HttpHeaders.CONTENT_TYPE);
return StringUtils.startsWithIgnoreCase(header, MediaType.APPLICATION_JSON_VALUE);
}
}
}

View File

@@ -1,13 +1,14 @@
package com.fastbee.common.utils;
import java.util.Collection;
import java.util.List;
import com.alibaba.fastjson2.JSONArray;
import com.fastbee.common.constant.CacheConstants;
import com.fastbee.common.core.domain.entity.SysDictData;
import com.fastbee.common.core.redis.RedisCache;
import com.fastbee.common.utils.spring.SpringUtils;
import java.util.Collection;
import java.util.List;
/**
* 字典工具类
*

View File

@@ -2,7 +2,7 @@ package com.fastbee.common.utils;
import lombok.NoArgsConstructor;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import java.io.PrintWriter;
import java.io.StringWriter;

View File

@@ -7,10 +7,12 @@ import java.net.URLEncoder;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import cn.hutool.extra.servlet.ServletUtil;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -215,4 +217,12 @@ public class ServletUtils
return StringUtils.EMPTY;
}
}
public static String getClientIP() {
HttpServletRequest request = getRequest();
if (request == null) {
return null;
}
return ServletUtil.getClientIP(request);
}
}

View File

@@ -4,10 +4,10 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import org.springframework.util.StringUtils;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Validation;
import javax.validation.Validator;
import java.util.Set;
import java.util.regex.Pattern;

View File

@@ -1,13 +1,13 @@
package com.fastbee.common.utils.bean;
import java.util.Set;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validator;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Validator;
/**
* bean对象属性验证
*
*
* @author ruoyi
*/
public class BeanValidators

View File

@@ -9,8 +9,8 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;

View File

@@ -24,8 +24,7 @@ import java.util.*;
@Component
public class TopicsUtils {
@Value("${server.broker.enabled}")
private Boolean enabled;
private Boolean enabled = true;
/**
* 拼接topic

View File

@@ -5,14 +5,14 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import jakarta.servlet.ServletRequest;
import javax.servlet.ServletRequest;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 通用http工具封装
*
*
* @author ruoyi
*/
public class HttpHelper

View File

@@ -1,11 +1,12 @@
package com.fastbee.common.utils.ip;
import java.net.InetAddress;
import java.net.UnknownHostException;
import jakarta.servlet.http.HttpServletRequest;
import com.fastbee.common.utils.ServletUtils;
import com.fastbee.common.utils.StringUtils;
import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* 获取IP方法
*

View File

@@ -30,7 +30,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

View File

@@ -1,7 +1,7 @@
package com.fastbee.common.xss;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -9,7 +9,7 @@ import java.lang.annotation.Target;
/**
* 自定义xss校验注解
*
*
* @author ruoyi
*/
@Retention(RetentionPolicy.RUNTIME)

View File

@@ -1,8 +1,8 @@
package com.fastbee.common.xss;
import com.fastbee.common.utils.StringUtils;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

View File

@@ -42,7 +42,7 @@
<!-- 阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-3-starter</artifactId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- 验证码 -->
@@ -66,15 +66,10 @@
<!-- 动态数据源 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>${dynamic-datasource.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -29,8 +29,8 @@ import org.springframework.stereotype.Component;
import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.Map;

View File

@@ -1,8 +1,6 @@
package com.fastbee.framework.config;
import java.util.TimeZone;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -16,7 +14,6 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
@Configuration
// 表示通过aop框架暴露该代理对象,AopContext能够访问
@EnableAspectJAutoProxy(exposeProxy = true)
@MapperScan("com.fastbee.**.mapper")
public class ApplicationConfig
{
/**

View File

@@ -1,16 +1,13 @@
package com.fastbee.framework.config;
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
import com.alibaba.druid.util.Utils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import javax.servlet.*;
import java.io.IOException;
@Configuration
@@ -33,7 +30,7 @@ public class DruidConfig {
Filter filter = new Filter()
{
@Override
public void init(jakarta.servlet.FilterConfig filterConfig) throws ServletException
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException
{
}
@Override

View File

@@ -1,16 +1,17 @@
package com.fastbee.framework.config;
import java.util.HashMap;
import java.util.Map;
import jakarta.servlet.DispatcherType;
import com.fastbee.common.filter.RepeatableFilter;
import com.fastbee.common.filter.XssFilter;
import com.fastbee.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.fastbee.common.filter.RepeatableFilter;
import com.fastbee.common.filter.XssFilter;
import com.fastbee.common.utils.StringUtils;
import javax.servlet.DispatcherType;
import java.util.HashMap;
import java.util.Map;
/**
* Filter配置

View File

@@ -99,38 +99,40 @@ public class SecurityConfig
protected SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception
{
return httpSecurity
// CSRF禁用因为不使用session
.csrf(csrf -> csrf.disable())
// 禁用HTTP响应标头
.headers((headersCustomizer) -> {
headersCustomizer.cacheControl(cache -> cache.disable()).frameOptions(options -> options.sameOrigin());
})
// 认证失败处理类
.exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler))
// 基于token所以不需要session
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
// 注解标记允许匿名访问的url
.authorizeHttpRequests((requests) -> {
permitAllUrl.getUrls().forEach(url -> requests.requestMatchers(url).permitAll());
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
requests.requestMatchers("/login", "/register", "/captchaImage","/iot/tool/register","/iot/tool/ntp","/iot/tool/download",
"/iot/tool/mqtt/auth","/iot/tool/mqtt/authv5","/iot/tool/mqtt/webhook","/iot/tool/mqtt/webhookv5","/auth/**/**",
"/wechat/mobileLogin", "/wechat/miniLogin", "/wechat/wxBind/callback").permitAll()
.requestMatchers("/zlmhook/**","/goview/sys/login","/goview/project/getData").permitAll()
// 静态资源,可匿名访问
.requestMatchers(HttpMethod.GET, "/", "/*.html", "/**.html", "/**.css", "/**.js", "/profile/**").permitAll()
.requestMatchers("/swagger-ui.html", "/v3/api-docs/**", "/swagger-ui/**", "/druid/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})
// 添加Logout filter
.logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler))
// 添加JWT filter
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class)
// 添加CORS filter
.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class)
.addFilterBefore(corsFilter, LogoutFilter.class)
.build();
// CSRF禁用因为不使用session
.csrf(csrf -> csrf.disable())
// 禁用HTTP响应标头
.headers((headersCustomizer) -> {
headersCustomizer.cacheControl(cache -> cache.disable()).frameOptions(options -> options.sameOrigin());
})
// 认证失败处理类
.exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler))
// 基于token所以不需要session
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
// 注解标记允许匿名访问的url
.authorizeHttpRequests((requests) -> {
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
// 静态资源,可匿名访问
requests.antMatchers("/login", "/register", "/captchaImage","/iot/tool/register","/iot/tool/ntp","/iot/tool/download",
"/iot/tool/mqtt/auth","/iot/tool/mqtt/authv5","/iot/tool/mqtt/webhook","/iot/tool/mqtt/webhookv5","/auth/**/**",
"/wechat/mobileLogin", "/wechat/miniLogin", "/wechat/wxBind/callback").permitAll()
.antMatchers("/zlmhook/**").permitAll()
.antMatchers("/goview/sys/login","/goview/project/getData").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})
// 添加Logout filter
.logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler))
// 添加JWT filter
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class)
// 添加CORS filter
.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class)
.addFilterBefore(corsFilter, LogoutFilter.class)
.build();
}
/**

View File

@@ -3,7 +3,7 @@ package com.fastbee.framework.config;
import com.fastbee.common.utils.ServletUtils;
import org.springframework.stereotype.Component;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
/**
* 服务相关配置

View File

@@ -10,7 +10,7 @@ import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

View File

@@ -1,8 +1,8 @@
package com.fastbee.framework.interceptor;
import java.lang.reflect.Method;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;

View File

@@ -3,7 +3,7 @@ package com.fastbee.framework.interceptor.impl;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@@ -19,7 +19,7 @@ import com.fastbee.framework.interceptor.RepeatSubmitInterceptor;
/**
* 判断请求url和数据是否和上一次相同
* 如果和上次相同,则是重复提交表单。 有效时间为10秒内。
*
*
* @author ruoyi
*/
@Component

View File

@@ -3,7 +3,7 @@ package com.fastbee.framework.manager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import jakarta.annotation.PreDestroy;
import javax.annotation.PreDestroy;
/**
* 确保应用退出时能关闭后台线程

View File

@@ -1,5 +1,6 @@
package com.fastbee.framework.mybatis.config;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.pagination.DialectFactory;
import com.baomidou.mybatisplus.extension.plugins.pagination.dialects.IDialect;

View File

@@ -4,9 +4,9 @@ import cn.hutool.core.net.NetUtil;
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.fastbee.framework.config.SqlFilterArgumentResolver;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
@@ -18,6 +18,7 @@ import java.util.List;
* @author admin
*/
@Configuration(proxyBeanMethods = false)
@MapperScan("com.fastbee.**.mapper")
public class MybatisPlusConfig implements WebMvcConfigurer {
/**
@@ -29,6 +30,13 @@ public class MybatisPlusConfig implements WebMvcConfigurer {
argumentResolvers.add(new SqlFilterArgumentResolver());
}
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(paginationInnerInterceptor());
return interceptor;
}
/**
* 分页插件,自动识别数据库类型
*/
@@ -55,22 +63,5 @@ public class MybatisPlusConfig implements WebMvcConfigurer {
public MybatisPlusMetaObjectHandler mybatisPlusMetaObjectHandler() {
return new MybatisPlusMetaObjectHandler();
}
/**
* 乐观锁插件
*/
public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor() {
return new OptimisticLockerInnerInterceptor();
}
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 数据权限处理
// interceptor.addInnerInterceptor(dataPermissionInterceptor());
// 分页插件
interceptor.addInnerInterceptor(paginationInnerInterceptor());
// 乐观锁插件
interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
return interceptor;
}
}

View File

@@ -1,10 +1,10 @@
package com.fastbee.framework.security.filter;
import java.io.IOException;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
@@ -18,7 +18,7 @@ import com.fastbee.framework.web.service.TokenService;
/**
* token过滤器 验证token有效性
*
*
* @author ruoyi
*/
@Component

View File

@@ -2,8 +2,8 @@ package com.fastbee.framework.security.handle;
import java.io.IOException;
import java.io.Serializable;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.stereotype.Component;
@@ -15,7 +15,7 @@ import com.fastbee.common.utils.StringUtils;
/**
* 认证失败处理类 返回未授权
*
*
* @author ruoyi
*/
@Component

View File

@@ -1,9 +1,11 @@
package com.fastbee.framework.security.handle;
import java.io.IOException;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.common.utils.MessageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.Authentication;
@@ -12,7 +14,6 @@ import com.alibaba.fastjson2.JSON;
import com.fastbee.common.constant.Constants;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.core.domain.model.LoginUser;
import com.fastbee.common.utils.MessageUtils;
import com.fastbee.common.utils.ServletUtils;
import com.fastbee.common.utils.StringUtils;
import com.fastbee.framework.manager.AsyncManager;

View File

@@ -1,16 +1,8 @@
package com.fastbee.framework.web.domain;
import java.net.UnknownHostException;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
import com.fastbee.common.utils.Arith;
import com.fastbee.common.utils.ip.IpUtils;
import com.fastbee.framework.web.domain.server.Cpu;
import com.fastbee.framework.web.domain.server.Jvm;
import com.fastbee.framework.web.domain.server.Mem;
import com.fastbee.framework.web.domain.server.Sys;
import com.fastbee.framework.web.domain.server.SysFile;
import com.fastbee.framework.web.domain.server.*;
import oshi.SystemInfo;
import oshi.hardware.CentralProcessor;
import oshi.hardware.CentralProcessor.TickType;
@@ -21,6 +13,11 @@ import oshi.software.os.OSFileStore;
import oshi.software.os.OperatingSystem;
import oshi.util.Util;
import java.net.UnknownHostException;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
/**
* 服务器相关信息
*

View File

@@ -1,9 +1,11 @@
package com.fastbee.framework.web.domain.server;
import java.lang.management.ManagementFactory;
import com.fastbee.common.utils.Arith;
import com.fastbee.common.utils.DateUtils;
import java.lang.management.ManagementFactory;
/**
* JVM相关信息
*

View File

@@ -1,5 +1,6 @@
package com.fastbee.framework.web.domain.server;
import com.fastbee.common.utils.Arith;
/**

View File

@@ -1,6 +1,6 @@
package com.fastbee.framework.web.exception;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;

View File

@@ -26,7 +26,7 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
/**
* 登录校验方法

View File

@@ -1,21 +1,8 @@
package com.fastbee.framework.web.service;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import com.fastbee.common.core.domain.entity.SysUser;
import com.fastbee.system.domain.SysClient;
import com.fastbee.system.service.ISysClientService;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;
import com.fastbee.common.constant.CacheConstants;
import com.fastbee.common.constant.Constants;
import com.fastbee.common.core.domain.entity.SysUser;
import com.fastbee.common.core.domain.model.LoginUser;
import com.fastbee.common.core.redis.RedisCache;
import com.fastbee.common.utils.ServletUtils;
@@ -23,10 +10,24 @@ import com.fastbee.common.utils.StringUtils;
import com.fastbee.common.utils.ip.AddressUtils;
import com.fastbee.common.utils.ip.IpUtils;
import com.fastbee.common.utils.uuid.IdUtils;
import com.fastbee.system.domain.SysClient;
import com.fastbee.system.service.ISysClientService;
import eu.bitwalker.useragentutils.UserAgent;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
/**
* token验证处理

View File

@@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
/**
* @author gsb

View File

@@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
/**
* @author gsb

View File

@@ -6,9 +6,10 @@ import com.fastbee.mq.model.ReportDataBo;
import com.fastbee.mq.service.IDataHandler;
import com.fastbee.mq.service.IMqttMessagePublish;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
/**
* @author gsb

View File

@@ -1,16 +1,25 @@
package com.fastbee.mq.service.impl;
import com.fastbee.common.core.mq.DeviceReplyBo;
import com.fastbee.common.core.mq.InvokeReqDto;
import com.fastbee.common.core.mq.MQSendMessageBo;
import com.fastbee.common.core.mq.MessageReplyBo;
import com.fastbee.common.core.protocol.modbus.ModbusCode;
import com.fastbee.common.core.redis.RedisCache;
import com.fastbee.common.core.redis.RedisKeyBuilder;
import com.fastbee.common.enums.ThingsModelType;
import com.fastbee.common.utils.bean.BeanUtils;
import com.fastbee.iot.util.SnowflakeIdWorker;
import com.fastbee.mq.redischannel.producer.MessageProducer;
import com.fastbee.mq.service.IFunctionInvoke;
import com.fastbee.mq.service.IMqttMessagePublish;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @author gsb

View File

@@ -10,7 +10,7 @@ import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
/**
* 启动类

View File

@@ -13,7 +13,7 @@ import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.stereotype.Component;
import jakarta.annotation.Resource;
import javax.annotation.Resource;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Objects;

View File

@@ -1,9 +1,13 @@
package com.fastbee.data.controller;
import java.util.ArrayList;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.common.core.domain.entity.SysRole;
import com.fastbee.common.core.domain.entity.SysUser;
import com.fastbee.common.core.page.TableDataInfo;
import com.fastbee.iot.model.IdAndName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -26,7 +30,7 @@ import com.fastbee.common.utils.poi.ExcelUtil;
/**
* 产品分类Controller
*
*
* @author kerwincui
* @date 2021-12-16
*/

View File

@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**

View File

@@ -17,12 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 调度任务信息操作处理
*
*
* @author kerwincui
*/
@Api(tags = "调度任务信息操作处理模块")

View File

@@ -1,8 +1,13 @@
package com.fastbee.data.controller;
import com.fastbee.common.annotation.Log;
import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.core.page.TableDataInfo;
import com.fastbee.common.enums.BusinessType;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.iot.domain.DeviceLog;
import com.fastbee.iot.model.HistoryModel;
import com.fastbee.iot.model.MonitorModel;
import com.fastbee.iot.service.IDeviceLogService;
import io.swagger.annotations.Api;
@@ -11,7 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 设备日志Controller

View File

@@ -1,7 +1,7 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.iot.domain.EventLog;
import io.swagger.annotations.Api;
@@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 事件日志Controller
*
*
* @author kerwincui
* @date 2023-03-28
*/

View File

@@ -1,7 +1,7 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 设备服务下发日志Controller
*
*
* @author kerwincui
* @date 2022-10-22
*/

View File

@@ -1,8 +1,10 @@
package com.fastbee.data.controller;
import java.util.ArrayList;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.iot.domain.DeviceGroup;
import com.fastbee.iot.model.DeviceGroupInput;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -27,7 +29,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 设备分组Controller
*
*
* @author kerwincui
* @date 2021-12-16
*/

View File

@@ -1,7 +1,7 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.iot.model.IdAndName;
import io.swagger.annotations.Api;
@@ -27,7 +27,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 新闻分类Controller
*
*
* @author kerwincui
* @date 2022-04-09
*/

View File

@@ -1,7 +1,7 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.iot.model.CategoryNews;
import io.swagger.annotations.Api;
@@ -27,7 +27,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 新闻资讯Controller
*
*
* @author kerwincui
* @date 2022-04-09
*/

View File

@@ -1,7 +1,7 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 云云对接Controller
*
*
* @author kerwincui
* @date 2022-02-07
*/

View File

@@ -1,11 +1,12 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.iot.model.ProductAuthorizeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -20,7 +21,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* 产品授权码Controller
*
*
* @author kami
* @date 2022-04-11
*/

View File

@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**

View File

@@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**

View File

@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**

View File

@@ -11,8 +11,8 @@ import me.zhyd.oauth.model.AuthCallback;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**

View File

@@ -1,7 +1,7 @@
package com.fastbee.data.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -5,6 +5,7 @@ import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.core.page.TableDataInfo;
import com.fastbee.common.enums.BusinessType;
import com.fastbee.common.utils.StringUtils;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.iot.domain.ThingsModel;
import com.fastbee.iot.model.ImportThingsModelInput;
@@ -18,12 +19,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* 物模型Controller
*
*
* @author kerwincui
* @date 2021-12-16
*/

View File

@@ -1,8 +1,12 @@
package com.fastbee.data.controller;
import java.util.ArrayList;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.common.core.domain.entity.SysRole;
import com.fastbee.common.core.domain.entity.SysUser;
import com.fastbee.iot.domain.ThingsModel;
import com.fastbee.iot.domain.VarTemp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@@ -44,9 +44,9 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;

Some files were not shown because too many files have changed in this diff Show More