mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-20 01:45:55 +08:00
Compare commits
3 Commits
master
...
dev-spring
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9abbecf61c | ||
|
|
efe562f7e6 | ||
|
|
4d8e1c5167 |
144
README.md
144
README.md
@@ -1,95 +1,93 @@
|
|||||||
[](https://gitee.com/activity/2025opensource?ident=IKKZS9)
|

|
||||||
|
|
||||||
|
|
||||||
FastBee 是一款面向中小企业与个人开发者的**轻量**、**易用**、**全栈**开源物联网平台。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 一、项目介绍
|
### 一、项目介绍
|
||||||
|
|
||||||
FastBee 集设备管理、数据监控、多端应用于一体,支持[一键容器化部署](https://fastbee.cn/doc/install/docker.html),适用于智能家居、智慧办公、智慧社区、农业监测、水利监测、工业控制等多种场景。平台基于 Spring Boot 开发,<b>内置高性能 MQTT 服务端,无需额外部署 EMQX 或其他 MQTT 服务端</b>,前端采用 Vue 与 ElementUI,移动端支持微信小程序、Android、iOS 及 H5,设备端兼容 ESP32、ESP8266、树莓派、合宙等常见硬件。
|
1. FastBee开源物联网平台,简单易用,更适合中小企业和个人学习使用。适用于智能家居、智慧办公、智慧社区、农业监测、水利监测、工业控制等。
|
||||||
|
|
||||||
|
2. 系统后端采用Spring boot;前端采用Vue;Mqtt服务端使用netty搭建;移动端支持微信小程序、安卓、苹果和H5采用Uniapp;数据库采用Mysql、TDengine和Redis;设备端支持ESP32、ESP8266、树莓派、合宙等;
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 二、系统功能
|
### 二、系统功能
|
||||||
|
|
||||||
| 系统功能 | 功能说明 |
|
| 系统功能 | 功能说明 |
|
||||||
|----------------|--------------------------------------------------------------------------|
|
|:------------------------:|:-----------------------------------------------:|
|
||||||
| 产品管理 | 创建产品、定义物模型、设置设备认证方式、管理产品分类及固件版本 |
|
| 产品管理 | 产品详情、产品物模型、产品分类、设备授权、产品固件 |
|
||||||
| 设备管理 | 设备注册、分组、实时状态监测、远程控制、操作日志追溯及设备分享功能 |
|
| 设备管理 | 设备详情、设备分组、设备日志、设备分享、设备实时控制、实时状态、数据监测 |
|
||||||
| 物模型管理 | 提供标准化的属性、功能和事件定义,实现设备与平台的数据语义统一 |
|
| 物模型管理 | 属性(设备状态和监测数据),功能(执行特定任务),事件(设备主动上报给云端) |
|
||||||
| 规则脚本 | 对设备上报和平台下发的原始数据进行处理,转发后匹配设备交互格式 |
|
| MQTT接入 | emqx开源版、netty版本MqttBroker |
|
||||||
| MQTT 接入 | 内置基于 Netty 开发的高性能 MQTT Broker,无需额外部署第三方服务 |
|
| 硬件 SDK | ESP-IDF、Arduino、RaspberryPi、合宙等平台设备接入 |
|
||||||
| 视频监控接入 | 支持 GB/T 28181 国家标准协议,实现视频直播与设备管理 |
|
| 视频监控接入 | 基于GB/T28181协议支持主流厂商监控设备接入,直播 |
|
||||||
| 权限管理 | 基于成熟的若依权限框架,实现用户、角色、部门、岗位及操作日志的精细化管控 |
|
| 权限管理 | 基于若依的权限管理系统,用户、部分、角色、岗位、权限、日志等 |
|
||||||
| 多数据源 | 支持 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-Arduino)
|
|
||||||
|
|
||||||
---
|

|
||||||
|
|
||||||
### 三、快速开始
|
|
||||||
|
|
||||||
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/) |
|
|空气检测仪| 物联网开发板 | Air724开发板 | 智能开关| [查看更多>>](https://fastbee.cn/doc/device/) |
|
||||||
| :----: | :----------: |:----------: |:----------: |:----------: |
|
| :----: | :----------: |:----------: |:----------: |:----------: |
|
||||||
|  |  |  | |  |
|
|  |  |  | |  |
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 五、其他
|
### 三、技术栈
|
||||||
|
* 服务端
|
||||||
|
- 相关技术: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
|
|
||||||
|
|
||||||
---
|
### 四、项目目录
|
||||||
|
app -------------------- 移动端(微信小程序 / Android / Ios / H5) 商业版开源<br/>
|
||||||
|
docker ---------------- docker部署文件<br />
|
||||||
|
spring-boot ---------- 后端<br/>
|
||||||
|
vue -------------------- 前端<br />
|
||||||
|
|
||||||
### 六、部分图片
|
|
||||||
|
|
||||||

|
### 五、商用授权
|
||||||

|
项目采用AGPL3协议,可用于个人学习和使用,商业用途需要赞助项目,获得授权,并提供商业版本源码、可视化平台和移动端源码。赞助过的用户请下载商业版本源码。
|
||||||
|
- [授权详情>>](https://fastbee.cn/doc/pages/sponsor/) [商业版本源码>>](https://fastbee.cn/doc/pages/sponsor/)
|
||||||
|
- [移动端源码>>](https://gitee.com/beecue/fastbee-app) [可视化平台源码>>](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交流群:🚀946029159(已满) 🚀1073236354 🚀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):熟悉物联网开发,完善平台前端设计可视化等
|
||||||
|
|
||||||
|
### 八、部分图片
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -114,6 +112,4 @@ FastBee 集设备管理、数据监控、多端应用于一体,支持[一键
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
FastBee 项目代码完全开源,覆盖设备 SDK、后端服务、前端应用和移动端,兼顾成熟度、性能与开发效率,适合中小企业快速构建物联网业务,也便于开发者进行二次开发与学习研究。
|
|
||||||
@@ -24,7 +24,6 @@ DROP TABLE IF EXISTS `gen_table`;
|
|||||||
CREATE TABLE `gen_table` (
|
CREATE TABLE `gen_table` (
|
||||||
`table_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
`table_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||||
`table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' 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 '表描述',
|
`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_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 '子表关联的外键名',
|
`sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子表关联的外键名',
|
||||||
@@ -231,7 +230,7 @@ INSERT INTO `iot_device_job` VALUES (5, '告警定时触发', 'DEFAULT', '0 13 1
|
|||||||
DROP TABLE IF EXISTS `iot_device_log`;
|
DROP TABLE IF EXISTS `iot_device_log`;
|
||||||
CREATE TABLE `iot_device_log` (
|
CREATE TABLE `iot_device_log` (
|
||||||
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设备监测信息ID',
|
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设备监测信息ID',
|
||||||
`identify` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标识符',
|
`identity` 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 '物模型名称',
|
`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_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 '日志值',
|
`log_value` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '日志值',
|
||||||
@@ -328,7 +327,7 @@ INSERT INTO `iot_device_user` VALUES (140, 1, 1, 'admin', '¥视频监控', '15
|
|||||||
DROP TABLE IF EXISTS `iot_event_log`;
|
DROP TABLE IF EXISTS `iot_event_log`;
|
||||||
CREATE TABLE `iot_event_log` (
|
CREATE TABLE `iot_event_log` (
|
||||||
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设备事件日志ID',
|
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '设备事件日志ID',
|
||||||
`identify` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标识符',
|
`identity` 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 '物模型名称',
|
`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_type` tinyint(1) NOT NULL COMMENT '类型(3=事件上报,5=设备上线,6=设备离线)',
|
||||||
`log_value` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '日志值',
|
`log_value` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '日志值',
|
||||||
@@ -1531,7 +1530,7 @@ CREATE TABLE `sip_config` (
|
|||||||
`enabled` tinyint(1) NULL DEFAULT NULL COMMENT '使能开关',
|
`enabled` tinyint(1) NULL DEFAULT NULL COMMENT '使能开关',
|
||||||
`isdefault` tinyint(1) NULL DEFAULT NULL COMMENT '系统默认配置',
|
`isdefault` tinyint(1) NULL DEFAULT NULL COMMENT '系统默认配置',
|
||||||
`seniorSdp` tinyint(1) NULL DEFAULT NULL COMMENT '拓展sdp',
|
`seniorSdp` tinyint(1) NULL DEFAULT NULL COMMENT '拓展sdp',
|
||||||
`domain_alias` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '服务器域',
|
`domain` 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',
|
`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认证密码',
|
`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',
|
`ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'sip接入IP',
|
||||||
@@ -1567,14 +1566,14 @@ CREATE TABLE `sip_device` (
|
|||||||
`model` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品型号',
|
`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 '固件版本',
|
`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 '传输模式',
|
`transport` 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 '流模式',
|
`streamMode` 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 '在线状态',
|
`online` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '在线状态',
|
||||||
`register_time` datetime NOT NULL COMMENT '注册时间',
|
`registerTime` datetime NOT NULL COMMENT '注册时间',
|
||||||
`last_connect_time` datetime NULL DEFAULT NULL COMMENT '最后上线时间',
|
`lastConnectTime` datetime NULL DEFAULT NULL COMMENT '最后上线时间',
|
||||||
`active_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',
|
`ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备入网IP',
|
||||||
`port` bigint(10) NULL DEFAULT NULL COMMENT '设备接入端口号',
|
`port` bigint(10) NULL DEFAULT NULL COMMENT '设备接入端口号',
|
||||||
`host_address` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备地址',
|
`hostAddress` 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代表删除)',
|
`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_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者',
|
||||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||||
@@ -2437,11 +2436,7 @@ CREATE TABLE `sys_oper_log` (
|
|||||||
`status` int(1) NULL DEFAULT 0 COMMENT '操作状态(0正常 1异常)',
|
`status` int(1) NULL DEFAULT 0 COMMENT '操作状态(0正常 1异常)',
|
||||||
`error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误消息',
|
`error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误消息',
|
||||||
`oper_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
|
`oper_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
|
||||||
`cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间',
|
PRIMARY KEY (`oper_id`) USING BTREE
|
||||||
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;
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志记录' ROW_FORMAT = DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 114 KiB |
@@ -39,8 +39,9 @@
|
|||||||
|
|
||||||
<!-- Mysql驱动包 -->
|
<!-- Mysql驱动包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
<version>${mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.fastbee;
|
package com.fastbee;
|
||||||
|
|
||||||
|
import com.dtflys.forest.springboot.annotation.ForestScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package com.fastbee.web.controller.common;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.fastbee.web.controller.common;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.web.controller.monitor;
|
package com.fastbee.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.web.controller.monitor;
|
package com.fastbee.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.web.controller.system;
|
package com.fastbee.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.fastbee.web.controller.system;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.web.controller.system;
|
package com.fastbee.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.web.controller.system;
|
package com.fastbee.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.web.controller.system;
|
package com.fastbee.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger 用户测试方法
|
* swagger 用户测试方法
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -39,11 +39,12 @@ spring:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# redis 配置
|
# redis 配置
|
||||||
|
spring.data:
|
||||||
redis:
|
redis:
|
||||||
host: localhost # 地址
|
host: localhost # 地址
|
||||||
port: 6379 # 端口,默认为6379
|
port: 6379 # 端口,默认为6379
|
||||||
database: 15 # 数据库索引
|
database: 10 # 数据库索引
|
||||||
password: fastbee # 密码
|
password: fastbee # 密码
|
||||||
timeout: 10s # 连接超时时间
|
timeout: 10s # 连接超时时间
|
||||||
lettuce:
|
lettuce:
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ spring:
|
|||||||
# password: fastbee
|
# password: fastbee
|
||||||
|
|
||||||
# redis 配置
|
# redis 配置
|
||||||
|
spring.data:
|
||||||
redis:
|
redis:
|
||||||
host: 177.7.0.10 # 地址
|
host: 177.7.0.10 # 地址
|
||||||
port: 6379 # 端口,默认为6379
|
port: 6379 # 端口,默认为6379
|
||||||
|
|||||||
@@ -66,10 +66,11 @@ spring:
|
|||||||
|
|
||||||
|
|
||||||
# redis 配置
|
# redis 配置
|
||||||
|
spring.data:
|
||||||
redis:
|
redis:
|
||||||
host: 81.71.97.58 # 地址
|
host: 192.168.5.12 # 地址
|
||||||
port: 6379 # 端口,默认为6379
|
port: 6379 # 端口,默认为6379
|
||||||
database: 11 # 数据库索引
|
database: 11 # 数据库索引
|
||||||
password: fastbee # 密码
|
password: fastbee # 密码
|
||||||
timeout: 10s # 连接超时时间
|
timeout: 10s # 连接超时时间
|
||||||
lettuce:
|
lettuce:
|
||||||
@@ -85,7 +86,7 @@ sip:
|
|||||||
## 本地调试时,绑定网卡局域网IP,设备在同一局域网,设备接入IP填写绑定IP
|
## 本地调试时,绑定网卡局域网IP,设备在同一局域网,设备接入IP填写绑定IP
|
||||||
## 部署服务端时,默认绑定容器IP,设备接入IP填写服务器公网IP
|
## 部署服务端时,默认绑定容器IP,设备接入IP填写服务器公网IP
|
||||||
#ip: 177.7.0.13
|
#ip: 177.7.0.13
|
||||||
ip: 192.168.5.27
|
ip: 192.168.5.12
|
||||||
port: 5061 # SIP端口(保持默认)
|
port: 5061 # SIP端口(保持默认)
|
||||||
domain: 3402000000 # 由省级、市级、区级、基层编号组成
|
domain: 3402000000 # 由省级、市级、区级、基层编号组成
|
||||||
id: 34020000002000000001 # 同上,另外增加编号,(可保持默认)
|
id: 34020000002000000001 # 同上,另外增加编号,(可保持默认)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ fastbee:
|
|||||||
copyrightYear: 2024 # 版权年份
|
copyrightYear: 2024 # 版权年份
|
||||||
demoEnabled: true # 实例演示开关
|
demoEnabled: true # 实例演示开关
|
||||||
# 文件路径,以uploadPath结尾 示例( Windows配置 D:/uploadPath,Linux配置 /uploadPath)
|
# 文件路径,以uploadPath结尾 示例( Windows配置 D:/uploadPath,Linux配置 /uploadPath)
|
||||||
profile: D:/uploadPath
|
profile: /uploadPath
|
||||||
addressEnabled: true # 获取ip地址开关
|
addressEnabled: true # 获取ip地址开关
|
||||||
captchaType: math # 验证码类型 math 数组计算 char 字符验证
|
captchaType: math # 验证码类型 math 数组计算 char 字符验证
|
||||||
|
|
||||||
@@ -22,17 +22,24 @@ server:
|
|||||||
min-spare: 100 # Tomcat启动初始化的线程数,默认值10
|
min-spare: 100 # Tomcat启动初始化的线程数,默认值10
|
||||||
# 基于netty的服务器
|
# 基于netty的服务器
|
||||||
broker:
|
broker:
|
||||||
|
must-pass: false # 客户端连接是否需要密码
|
||||||
|
enabled: true # 需要配置为true
|
||||||
broker-node: node1
|
broker-node: node1
|
||||||
port: 1883
|
port: 1883
|
||||||
websocket-port: 8083
|
websocket-port: 8083
|
||||||
websocket-path: /mqtt
|
websocket-path: /mqtt
|
||||||
keep-alive: 70 # 默认的全部客户端心跳上传时间
|
keep-alive: 30 # 默认的全部客户端心跳上传时间
|
||||||
|
|
||||||
# Spring配置
|
# Spring配置
|
||||||
spring:
|
spring:
|
||||||
# 环境配置,dev=开发环境,prod=生产环境
|
# 环境配置,dev=开发环境,prod=生产环境
|
||||||
profiles:
|
profiles:
|
||||||
active: dev # 环境配置,dev=开发环境,prod=生产环境
|
active: prod # 环境配置,dev=开发环境,prod=生产环境
|
||||||
|
main:
|
||||||
|
allow-circular-references: true
|
||||||
|
mvc:
|
||||||
|
pathmatch:
|
||||||
|
matching-strategy: ant_path_matcher
|
||||||
# 资源信息
|
# 资源信息
|
||||||
messages:
|
messages:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
@@ -68,6 +75,12 @@ spring:
|
|||||||
strict: false
|
strict: false
|
||||||
lazy: true
|
lazy: true
|
||||||
|
|
||||||
|
#集群配置
|
||||||
|
cluster:
|
||||||
|
enable: true
|
||||||
|
type: redis
|
||||||
|
|
||||||
|
|
||||||
# 用户配置
|
# 用户配置
|
||||||
user:
|
user:
|
||||||
password:
|
password:
|
||||||
@@ -82,11 +95,16 @@ token:
|
|||||||
|
|
||||||
# mybatis-plus配置
|
# mybatis-plus配置
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
typeAliasesPackage: com.fastbee.**.domain # 搜索指定包别名
|
# 搜索指定包别名
|
||||||
mapperLocations: classpath*:mapper/**/*Mapper.xml # 配置mapper的扫描,找到所有的mapper.xml映射文件
|
typeAliasesPackage: com.fastbee.**.domain
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||||
configLocation: classpath:mybatis/mybatis-config.xml # 加载全局的配置文件
|
configLocation: classpath:mybatis/mybatis-config.xml # 加载全局的配置文件
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
dbConfig:
|
||||||
|
# 主键类型
|
||||||
|
# AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
||||||
|
# 如需改为自增 需要将数据库表全部设置为自增
|
||||||
id-type: AUTO # 自增 ID
|
id-type: AUTO # 自增 ID
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||||
@@ -102,3 +120,8 @@ xss:
|
|||||||
enabled: true # 过滤开关
|
enabled: true # 过滤开关
|
||||||
excludes: /system/notice # 排除链接(多个用逗号分隔)
|
excludes: /system/notice # 排除链接(多个用逗号分隔)
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/* # 匹配链接
|
urlPatterns: /system/*,/monitor/*,/tool/* # 匹配链接
|
||||||
|
|
||||||
|
forest:
|
||||||
|
max-connections: 1000 # 连接池最大连接数
|
||||||
|
connect-timeout: 3000 # 连接超时时间,单位为毫秒
|
||||||
|
read-timeout: 3000 # 数据读取超时时间,单位为毫秒
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<!-- mybatis-plus -->
|
<!-- mybatis-plus -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<!-- 动态数据源 -->
|
<!-- 动态数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里JSON解析器 -->
|
<!-- 阿里JSON解析器 -->
|
||||||
@@ -139,9 +139,10 @@
|
|||||||
|
|
||||||
<!-- servlet包 -->
|
<!-- servlet包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>jakarta.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>jakarta.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
@@ -173,16 +174,16 @@
|
|||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.redisson</groupId>-->
|
|
||||||
<!-- <artifactId>redisson-spring-boot-starter</artifactId>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>easyexcel-core</artifactId>
|
<artifactId>easyexcel-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
package com.fastbee.common.annotation;
|
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.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
import java.math.BigDecimal;
|
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数据注解
|
* 自定义导出Excel数据注解
|
||||||
@@ -57,6 +56,7 @@ public @interface Excel
|
|||||||
/**
|
/**
|
||||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ import com.fastbee.common.utils.StringUtils;
|
|||||||
import com.fastbee.common.utils.sql.SqlUtil;
|
import com.fastbee.common.utils.sql.SqlUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.WebDataBinder;
|
import org.springframework.web.bind.WebDataBinder;
|
||||||
import org.springframework.web.bind.annotation.InitBinder;
|
import org.springframework.web.bind.annotation.InitBinder;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.beans.PropertyEditorSupport;
|
import java.beans.PropertyEditorSupport;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package com.fastbee.common.core.domain;
|
package com.fastbee.common.core.domain;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.Max;
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.Max;
|
|
||||||
import javax.validation.constraints.Min;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
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.SysDept;
|
||||||
import com.fastbee.common.core.domain.entity.SysMenu;
|
import com.fastbee.common.core.domain.entity.SysMenu;
|
||||||
|
import com.fastbee.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Treeselect树结构实体类
|
* Treeselect树结构实体类
|
||||||
@@ -22,6 +24,9 @@ public class TreeSelect implements Serializable
|
|||||||
/** 节点名称 */
|
/** 节点名称 */
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
/** 节点禁用 */
|
||||||
|
private boolean disabled = false;
|
||||||
|
|
||||||
/** 子节点 */
|
/** 子节点 */
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private List<TreeSelect> children;
|
private List<TreeSelect> children;
|
||||||
@@ -35,6 +40,7 @@ public class TreeSelect implements Serializable
|
|||||||
{
|
{
|
||||||
this.id = dept.getDeptId();
|
this.id = dept.getDeptId();
|
||||||
this.label = dept.getDeptName();
|
this.label = dept.getDeptName();
|
||||||
|
this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus());
|
||||||
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +71,16 @@ public class TreeSelect implements Serializable
|
|||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDisabled()
|
||||||
|
{
|
||||||
|
return disabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisabled(boolean disabled)
|
||||||
|
{
|
||||||
|
this.disabled = disabled;
|
||||||
|
}
|
||||||
|
|
||||||
public List<TreeSelect> getChildren()
|
public List<TreeSelect> getChildren()
|
||||||
{
|
{
|
||||||
return children;
|
return children;
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package com.fastbee.common.core.domain.entity;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
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.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.fastbee.common.core.domain.BaseEntity;
|
import com.fastbee.common.core.domain.BaseEntity;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.fastbee.common.core.domain.entity;
|
package com.fastbee.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package com.fastbee.common.core.domain.entity;
|
package com.fastbee.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Pattern;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import jakarta.validation.constraints.Pattern;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package com.fastbee.common.core.domain.entity;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package com.fastbee.common.core.domain.entity;
|
package com.fastbee.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Set;
|
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.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
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.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.fastbee.common.annotation.Excel;
|
import com.fastbee.common.annotation.Excel;
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package com.fastbee.common.core.domain.entity;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import jakarta.validation.constraints.Email;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.fastbee.common.utils.DateUtils;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OTA远程升级
|
* OTA远程升级
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ public class RedisCache {
|
|||||||
public List<Object> scan(String query) {
|
public List<Object> scan(String query) {
|
||||||
Set<String> keys = (Set<String>) redisTemplate.execute((RedisCallback<Set<String>>) connection -> {
|
Set<String> keys = (Set<String>) redisTemplate.execute((RedisCallback<Set<String>>) connection -> {
|
||||||
Set<String> keysTmp = new HashSet<>();
|
Set<String> keysTmp = new HashSet<>();
|
||||||
Cursor<byte[]> cursor = connection.scan(new ScanOptions.ScanOptionsBuilder().match(query).count(1000).build());
|
Cursor<byte[]> cursor = connection.scan(ScanOptions.scanOptions().match(query).count(1000).build());
|
||||||
while (cursor.hasNext()) {
|
while (cursor.hasNext()) {
|
||||||
keysTmp.add(new String(cursor.next()));
|
keysTmp.add(new String(cursor.next()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.fastbee.common.core.text;
|
package com.fastbee.common.core.text;
|
||||||
|
|
||||||
import com.fastbee.common.utils.StringUtils;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
@@ -9,6 +7,7 @@ import java.nio.ByteBuffer;
|
|||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import com.fastbee.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型转换器
|
* 类型转换器
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.fastbee.common.enums;
|
package com.fastbee.common.enums;
|
||||||
|
|
||||||
import com.fastbee.common.utils.DesensitizedUtil;
|
|
||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
import com.fastbee.common.utils.DesensitizedUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 脱敏类型
|
* 脱敏类型
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.fastbee.common.filter;
|
package com.fastbee.common.filter;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.servlet.Filter;
|
import jakarta.servlet.Filter;
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.FilterConfig;
|
import jakarta.servlet.FilterConfig;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import com.fastbee.common.utils.StringUtils;
|
import com.fastbee.common.utils.StringUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import java.io.BufferedReader;
|
|||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import javax.servlet.ReadListener;
|
import jakarta.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import jakarta.servlet.ServletInputStream;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import jakarta.servlet.http.HttpServletRequestWrapper;
|
||||||
import com.fastbee.common.utils.http.HttpHelper;
|
import com.fastbee.common.utils.http.HttpHelper;
|
||||||
import com.fastbee.common.constant.Constants;
|
import com.fastbee.common.constant.Constants;
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ package com.fastbee.common.filter;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.Filter;
|
import jakarta.servlet.Filter;
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.FilterConfig;
|
import jakarta.servlet.FilterConfig;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import com.fastbee.common.utils.StringUtils;
|
import com.fastbee.common.utils.StringUtils;
|
||||||
import com.fastbee.common.enums.HttpMethod;
|
import com.fastbee.common.enums.HttpMethod;
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package com.fastbee.common.filter;
|
|||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.servlet.ReadListener;
|
import jakarta.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import jakarta.servlet.ServletInputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import jakarta.servlet.http.HttpServletRequestWrapper;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
package com.fastbee.common.utils;
|
package com.fastbee.common.utils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.fastbee.common.constant.CacheConstants;
|
import com.fastbee.common.constant.CacheConstants;
|
||||||
import com.fastbee.common.core.domain.entity.SysDictData;
|
import com.fastbee.common.core.domain.entity.SysDictData;
|
||||||
import com.fastbee.common.core.redis.RedisCache;
|
import com.fastbee.common.core.redis.RedisCache;
|
||||||
import com.fastbee.common.utils.spring.SpringUtils;
|
import com.fastbee.common.utils.spring.SpringUtils;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典工具类
|
* 字典工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.fastbee.common.utils;
|
|||||||
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,10 @@ import java.net.URLEncoder;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import cn.hutool.extra.servlet.ServletUtil;
|
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
@@ -217,12 +215,4 @@ public class ServletUtils
|
|||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getClientIP() {
|
|
||||||
HttpServletRequest request = getRequest();
|
|
||||||
if (request == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return ServletUtil.getClientIP(request);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import cn.hutool.core.collection.CollUtil;
|
|||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.validation.ConstraintViolation;
|
import jakarta.validation.ConstraintViolation;
|
||||||
import javax.validation.ConstraintViolationException;
|
import jakarta.validation.ConstraintViolationException;
|
||||||
import javax.validation.Validation;
|
import jakarta.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import jakarta.validation.Validator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.fastbee.common.utils.bean;
|
package com.fastbee.common.utils.bean;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.ConstraintViolation;
|
import jakarta.validation.ConstraintViolation;
|
||||||
import javax.validation.ConstraintViolationException;
|
import jakarta.validation.ConstraintViolationException;
|
||||||
import javax.validation.Validator;
|
import jakarta.validation.Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bean对象属性验证
|
* bean对象属性验证
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import java.io.OutputStream;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import java.util.*;
|
|||||||
@Component
|
@Component
|
||||||
public class TopicsUtils {
|
public class TopicsUtils {
|
||||||
|
|
||||||
private Boolean enabled = true;
|
@Value("${server.broker.enabled}")
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼接topic
|
* 拼接topic
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.fastbee.common.utils.ip;
|
package com.fastbee.common.utils.ip;
|
||||||
|
|
||||||
import com.fastbee.common.utils.ServletUtils;
|
|
||||||
import com.fastbee.common.utils.StringUtils;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import com.fastbee.common.utils.ServletUtils;
|
||||||
|
import com.fastbee.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.common.xss;
|
package com.fastbee.common.xss;
|
||||||
|
|
||||||
import javax.validation.Constraint;
|
import jakarta.validation.Constraint;
|
||||||
import javax.validation.Payload;
|
import jakarta.validation.Payload;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.fastbee.common.xss;
|
package com.fastbee.common.xss;
|
||||||
|
|
||||||
import com.fastbee.common.utils.StringUtils;
|
import com.fastbee.common.utils.StringUtils;
|
||||||
import javax.validation.ConstraintValidator;
|
import jakarta.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import jakarta.validation.ConstraintValidatorContext;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-starter</artifactId>
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
@@ -66,10 +66,15 @@
|
|||||||
<!-- 动态数据源 -->
|
<!-- 动态数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||||
<version>${dynamic-datasource.version}</version>
|
<version>${dynamic-datasource.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-jsqlparser</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ import org.springframework.stereotype.Component;
|
|||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.fastbee.framework.config;
|
package com.fastbee.framework.config;
|
||||||
|
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -14,6 +16,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
|||||||
@Configuration
|
@Configuration
|
||||||
// 表示通过aop框架暴露该代理对象,AopContext能够访问
|
// 表示通过aop框架暴露该代理对象,AopContext能够访问
|
||||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||||
|
@MapperScan("com.fastbee.**.mapper")
|
||||||
public class ApplicationConfig
|
public class ApplicationConfig
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
package com.fastbee.framework.config;
|
package com.fastbee.framework.config;
|
||||||
|
|
||||||
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
|
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
|
||||||
import com.alibaba.druid.util.Utils;
|
import com.alibaba.druid.util.Utils;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import jakarta.servlet.Filter;
|
||||||
import javax.servlet.*;
|
import jakarta.servlet.FilterChain;
|
||||||
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.ServletRequest;
|
||||||
|
import jakarta.servlet.ServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@@ -30,7 +33,7 @@ public class DruidConfig {
|
|||||||
Filter filter = new Filter()
|
Filter filter = new Filter()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException
|
public void init(jakarta.servlet.FilterConfig filterConfig) throws ServletException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.fastbee.framework.config;
|
package com.fastbee.framework.config;
|
||||||
|
|
||||||
import com.fastbee.common.filter.RepeatableFilter;
|
import java.util.HashMap;
|
||||||
import com.fastbee.common.filter.XssFilter;
|
import java.util.Map;
|
||||||
import com.fastbee.common.utils.StringUtils;
|
import jakarta.servlet.DispatcherType;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import com.fastbee.common.filter.RepeatableFilter;
|
||||||
import javax.servlet.DispatcherType;
|
import com.fastbee.common.filter.XssFilter;
|
||||||
import java.util.HashMap;
|
import com.fastbee.common.utils.StringUtils;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter配置
|
* Filter配置
|
||||||
|
|||||||
@@ -99,40 +99,38 @@ public class SecurityConfig
|
|||||||
protected SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception
|
protected SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception
|
||||||
{
|
{
|
||||||
return httpSecurity
|
return httpSecurity
|
||||||
// CSRF禁用,因为不使用session
|
// CSRF禁用,因为不使用session
|
||||||
.csrf(csrf -> csrf.disable())
|
.csrf(csrf -> csrf.disable())
|
||||||
// 禁用HTTP响应标头
|
// 禁用HTTP响应标头
|
||||||
.headers((headersCustomizer) -> {
|
.headers((headersCustomizer) -> {
|
||||||
headersCustomizer.cacheControl(cache -> cache.disable()).frameOptions(options -> options.sameOrigin());
|
headersCustomizer.cacheControl(cache -> cache.disable()).frameOptions(options -> options.sameOrigin());
|
||||||
})
|
})
|
||||||
// 认证失败处理类
|
// 认证失败处理类
|
||||||
.exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler))
|
.exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler))
|
||||||
// 基于token,所以不需要session
|
// 基于token,所以不需要session
|
||||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
||||||
// 注解标记允许匿名访问的url
|
// 注解标记允许匿名访问的url
|
||||||
.authorizeHttpRequests((requests) -> {
|
.authorizeHttpRequests((requests) -> {
|
||||||
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
|
permitAllUrl.getUrls().forEach(url -> requests.requestMatchers(url).permitAll());
|
||||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||||
// 静态资源,可匿名访问
|
requests.requestMatchers("/login", "/register", "/captchaImage","/iot/tool/register","/iot/tool/ntp","/iot/tool/download",
|
||||||
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/**/**",
|
||||||
"/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()
|
||||||
"/wechat/mobileLogin", "/wechat/miniLogin", "/wechat/wxBind/callback").permitAll()
|
.requestMatchers("/zlmhook/**","/goview/sys/login","/goview/project/getData").permitAll()
|
||||||
.antMatchers("/zlmhook/**").permitAll()
|
// 静态资源,可匿名访问
|
||||||
.antMatchers("/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()
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.anyRequest().authenticated();
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
})
|
||||||
.anyRequest().authenticated();
|
// 添加Logout filter
|
||||||
})
|
.logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler))
|
||||||
// 添加Logout filter
|
// 添加JWT filter
|
||||||
.logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler))
|
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class)
|
||||||
// 添加JWT filter
|
// 添加CORS filter
|
||||||
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class)
|
.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class)
|
||||||
// 添加CORS filter
|
.addFilterBefore(corsFilter, LogoutFilter.class)
|
||||||
.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class)
|
.build();
|
||||||
.addFilterBefore(corsFilter, LogoutFilter.class)
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.fastbee.framework.config;
|
|||||||
import com.fastbee.common.utils.ServletUtils;
|
import com.fastbee.common.utils.ServletUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务相关配置
|
* 服务相关配置
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.springframework.web.context.request.NativeWebRequest;
|
|||||||
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||||
import org.springframework.web.method.support.ModelAndViewContainer;
|
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.fastbee.framework.interceptor;
|
package com.fastbee.framework.interceptor;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.method.HandlerMethod;
|
import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.fastbee.framework.interceptor.impl;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.fastbee.framework.manager;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import javax.annotation.PreDestroy;
|
import jakarta.annotation.PreDestroy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确保应用退出时能关闭后台线程
|
* 确保应用退出时能关闭后台线程
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.fastbee.framework.mybatis.config;
|
package com.fastbee.framework.mybatis.config;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.DialectFactory;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.DialectFactory;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.dialects.IDialect;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.dialects.IDialect;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import cn.hutool.core.net.NetUtil;
|
|||||||
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
||||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
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.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
import com.fastbee.framework.config.SqlFilterArgumentResolver;
|
import com.fastbee.framework.config.SqlFilterArgumentResolver;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||||
@@ -18,7 +18,6 @@ import java.util.List;
|
|||||||
* @author admin
|
* @author admin
|
||||||
*/
|
*/
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
@MapperScan("com.fastbee.**.mapper")
|
|
||||||
public class MybatisPlusConfig implements WebMvcConfigurer {
|
public class MybatisPlusConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,13 +29,6 @@ public class MybatisPlusConfig implements WebMvcConfigurer {
|
|||||||
argumentResolvers.add(new SqlFilterArgumentResolver());
|
argumentResolvers.add(new SqlFilterArgumentResolver());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
||||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
||||||
interceptor.addInnerInterceptor(paginationInnerInterceptor());
|
|
||||||
return interceptor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页插件,自动识别数据库类型
|
* 分页插件,自动识别数据库类型
|
||||||
*/
|
*/
|
||||||
@@ -63,5 +55,22 @@ public class MybatisPlusConfig implements WebMvcConfigurer {
|
|||||||
public MybatisPlusMetaObjectHandler mybatisPlusMetaObjectHandler() {
|
public MybatisPlusMetaObjectHandler mybatisPlusMetaObjectHandler() {
|
||||||
return new 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.fastbee.framework.security.filter;
|
package com.fastbee.framework.security.filter;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.fastbee.framework.security.handle;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.security.core.AuthenticationException;
|
import org.springframework.security.core.AuthenticationException;
|
||||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package com.fastbee.framework.security.handle;
|
package com.fastbee.framework.security.handle;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fastbee.common.utils.MessageUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
@@ -14,6 +12,7 @@ import com.alibaba.fastjson2.JSON;
|
|||||||
import com.fastbee.common.constant.Constants;
|
import com.fastbee.common.constant.Constants;
|
||||||
import com.fastbee.common.core.domain.AjaxResult;
|
import com.fastbee.common.core.domain.AjaxResult;
|
||||||
import com.fastbee.common.core.domain.model.LoginUser;
|
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.ServletUtils;
|
||||||
import com.fastbee.common.utils.StringUtils;
|
import com.fastbee.common.utils.StringUtils;
|
||||||
import com.fastbee.framework.manager.AsyncManager;
|
import com.fastbee.framework.manager.AsyncManager;
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
package com.fastbee.framework.web.domain;
|
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.Arith;
|
||||||
import com.fastbee.common.utils.ip.IpUtils;
|
import com.fastbee.common.utils.ip.IpUtils;
|
||||||
import com.fastbee.framework.web.domain.server.*;
|
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 oshi.SystemInfo;
|
import oshi.SystemInfo;
|
||||||
import oshi.hardware.CentralProcessor;
|
import oshi.hardware.CentralProcessor;
|
||||||
import oshi.hardware.CentralProcessor.TickType;
|
import oshi.hardware.CentralProcessor.TickType;
|
||||||
@@ -13,11 +21,6 @@ import oshi.software.os.OSFileStore;
|
|||||||
import oshi.software.os.OperatingSystem;
|
import oshi.software.os.OperatingSystem;
|
||||||
import oshi.util.Util;
|
import oshi.util.Util;
|
||||||
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器相关信息
|
* 服务器相关信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package com.fastbee.framework.web.domain.server;
|
package com.fastbee.framework.web.domain.server;
|
||||||
|
|
||||||
|
import java.lang.management.ManagementFactory;
|
||||||
import com.fastbee.common.utils.Arith;
|
import com.fastbee.common.utils.Arith;
|
||||||
import com.fastbee.common.utils.DateUtils;
|
import com.fastbee.common.utils.DateUtils;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JVM相关信息
|
* JVM相关信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.fastbee.framework.web.domain.server;
|
package com.fastbee.framework.web.domain.server;
|
||||||
|
|
||||||
|
|
||||||
import com.fastbee.common.utils.Arith;
|
import com.fastbee.common.utils.Arith;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.fastbee.framework.web.exception;
|
package com.fastbee.framework.web.exception;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.security.core.Authentication;
|
|||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录校验方法
|
* 登录校验方法
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
package com.fastbee.framework.web.service;
|
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.CacheConstants;
|
||||||
import com.fastbee.common.constant.Constants;
|
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.domain.model.LoginUser;
|
||||||
import com.fastbee.common.core.redis.RedisCache;
|
import com.fastbee.common.core.redis.RedisCache;
|
||||||
import com.fastbee.common.utils.ServletUtils;
|
import com.fastbee.common.utils.ServletUtils;
|
||||||
@@ -10,24 +23,10 @@ import com.fastbee.common.utils.StringUtils;
|
|||||||
import com.fastbee.common.utils.ip.AddressUtils;
|
import com.fastbee.common.utils.ip.AddressUtils;
|
||||||
import com.fastbee.common.utils.ip.IpUtils;
|
import com.fastbee.common.utils.ip.IpUtils;
|
||||||
import com.fastbee.common.utils.uuid.IdUtils;
|
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 eu.bitwalker.useragentutils.UserAgent;
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
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验证处理
|
* token验证处理
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author gsb
|
* @author gsb
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author gsb
|
* @author gsb
|
||||||
|
|||||||
@@ -6,10 +6,9 @@ import com.fastbee.mq.model.ReportDataBo;
|
|||||||
import com.fastbee.mq.service.IDataHandler;
|
import com.fastbee.mq.service.IDataHandler;
|
||||||
import com.fastbee.mq.service.IMqttMessagePublish;
|
import com.fastbee.mq.service.IMqttMessagePublish;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author gsb
|
* @author gsb
|
||||||
|
|||||||
@@ -1,25 +1,16 @@
|
|||||||
package com.fastbee.mq.service.impl;
|
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.InvokeReqDto;
|
||||||
import com.fastbee.common.core.mq.MQSendMessageBo;
|
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.enums.ThingsModelType;
|
||||||
import com.fastbee.common.utils.bean.BeanUtils;
|
import com.fastbee.common.utils.bean.BeanUtils;
|
||||||
import com.fastbee.iot.util.SnowflakeIdWorker;
|
import com.fastbee.iot.util.SnowflakeIdWorker;
|
||||||
import com.fastbee.mq.redischannel.producer.MessageProducer;
|
|
||||||
import com.fastbee.mq.service.IFunctionInvoke;
|
import com.fastbee.mq.service.IFunctionInvoke;
|
||||||
import com.fastbee.mq.service.IMqttMessagePublish;
|
import com.fastbee.mq.service.IMqttMessagePublish;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author gsb
|
* @author gsb
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.springframework.boot.ApplicationRunner;
|
|||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动类
|
* 启动类
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
|
|||||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.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.common.core.page.TableDataInfo;
|
||||||
import com.fastbee.iot.model.IdAndName;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import com.fastbee.common.annotation.Log;
|
|
||||||
import com.fastbee.common.core.controller.BaseController;
|
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.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.domain.DeviceLog;
|
||||||
import com.fastbee.iot.model.HistoryModel;
|
|
||||||
import com.fastbee.iot.model.MonitorModel;
|
import com.fastbee.iot.model.MonitorModel;
|
||||||
import com.fastbee.iot.service.IDeviceLogService;
|
import com.fastbee.iot.service.IDeviceLogService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -16,9 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备日志Controller
|
* 设备日志Controller
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fastbee.iot.domain.EventLog;
|
import com.fastbee.iot.domain.EventLog;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fastbee.iot.domain.DeviceGroup;
|
|
||||||
import com.fastbee.iot.model.DeviceGroupInput;
|
import com.fastbee.iot.model.DeviceGroupInput;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fastbee.iot.model.IdAndName;
|
import com.fastbee.iot.model.IdAndName;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fastbee.iot.model.CategoryNews;
|
import com.fastbee.iot.model.CategoryNews;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fastbee.iot.model.ProductAuthorizeVO;
|
import com.fastbee.iot.model.ProductAuthorizeVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import me.zhyd.oauth.model.AuthCallback;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.fastbee.common.core.controller.BaseController;
|
|||||||
import com.fastbee.common.core.domain.AjaxResult;
|
import com.fastbee.common.core.domain.AjaxResult;
|
||||||
import com.fastbee.common.core.page.TableDataInfo;
|
import com.fastbee.common.core.page.TableDataInfo;
|
||||||
import com.fastbee.common.enums.BusinessType;
|
import com.fastbee.common.enums.BusinessType;
|
||||||
import com.fastbee.common.utils.StringUtils;
|
|
||||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||||
import com.fastbee.iot.domain.ThingsModel;
|
import com.fastbee.iot.domain.ThingsModel;
|
||||||
import com.fastbee.iot.model.ImportThingsModelInput;
|
import com.fastbee.iot.model.ImportThingsModelInput;
|
||||||
@@ -19,8 +18,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.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 com.fastbee.iot.domain.VarTemp;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user