Merge branch 'feature/iot' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk17

This commit is contained in:
YunaiV
2025-03-17 08:54:10 +08:00
347 changed files with 18235 additions and 2052 deletions

View File

@@ -1,6 +1,10 @@
package cn.iocoder.yudao.server.controller;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
import jakarta.annotation.security.PermitAll;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -13,6 +17,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC
* @author 芋道源码
*/
@RestController
@Slf4j
public class DefaultController {
@RequestMapping("/admin-api/bpm/**")
@@ -27,9 +32,9 @@ public class DefaultController {
"[微信公众号 yudao-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]");
}
@RequestMapping(value = {"/admin-api/product/**", // 商品中心
@RequestMapping(value = { "/admin-api/product/**", // 商品中心
"/admin-api/trade/**", // 交易中心
"/admin-api/promotion/**"}) // 营销中心
"/admin-api/promotion/**" }) // 营销中心
public CommonResult<Boolean> mall404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[商城系统 yudao-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]");
@@ -47,28 +52,43 @@ public class DefaultController {
"[CRM 模块 yudao-module-crm - 已禁用][参考 https://doc.iocoder.cn/crm/build/ 开启]");
}
@RequestMapping(value = {"/admin-api/report/**"})
@RequestMapping(value = { "/admin-api/report/**"})
public CommonResult<Boolean> report404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[报表模块 yudao-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]");
}
@RequestMapping(value = {"/admin-api/pay/**"})
@RequestMapping(value = { "/admin-api/pay/**"})
public CommonResult<Boolean> pay404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[支付模块 yudao-module-pay - 已禁用][参考 https://doc.iocoder.cn/pay/build/ 开启]");
}
@RequestMapping(value = {"/admin-api/ai/**"})
@RequestMapping(value = { "/admin-api/ai/**"})
public CommonResult<Boolean> ai404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[AI 大模型 yudao-module-ai - 已禁用][参考 https://doc.iocoder.cn/ai/build/ 开启]");
}
@RequestMapping(value = {"/admin-api/iot/**"})
@RequestMapping(value = { "/admin-api/iot/**"})
public CommonResult<Boolean> iot404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[IOT 物联网 yudao-module-iot - 已禁用][参考 https://doc.iocoder.cn/iot/build/ 开启]");
"[IoT 物联网 yudao-module-iot - 已禁用][参考 https://doc.iocoder.cn/iot/build/ 开启]");
}
/**
* 测试接口:打印 query、header、body
*/
@RequestMapping(value = { "/test" })
@PermitAll
public CommonResult<Boolean> test(HttpServletRequest request) {
// 打印查询参数
log.info("Query: {}", ServletUtils.getParamMap(request));
// 打印请求头
log.info("Header: {}", ServletUtils.getHeaderMap(request));
// 打印请求体
log.info("Body: {}", ServletUtils.getBody(request));
return CommonResult.success(true);
}
}

View File

@@ -217,4 +217,9 @@ iot:
# 保持连接
keepalive: 60
# 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
clearSession: true
clearSession: true
# 插件配置
pf4j:
pluginsDir: ${user.home}/plugins # 插件目录

View File

@@ -68,13 +68,20 @@ spring:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
username: root
password: 123456
tdengine: # IoT 数据库
lazy: true # 开启懒加载,保证启动速度
url: jdbc:TAOS-RS://chaojiniu.top:6041/ruoyi_vue_pro
driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
username: root
password: taosdata
druid:
validation-query: SELECT SERVER_STATUS() # TDengine 数据源的有效性检查 SQL
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 127.0.0.1 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
redis:
host: 127.0.0.1 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: dev # 密码,建议生产环境开启
--- #################### 定时任务相关配置 ####################
@@ -177,6 +184,7 @@ logging:
cn.iocoder.yudao.module.crm.dal.mysql: debug
cn.iocoder.yudao.module.erp.dal.mysql: debug
cn.iocoder.yudao.module.iot.dal.mysql: debug
cn.iocoder.yudao.module.iot.dal.tdengine: DEBUG
cn.iocoder.yudao.module.ai.dal.mysql: debug
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
@@ -258,20 +266,7 @@ justauth:
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
--- #################### iot相关配置 TODO 芋艿:再瞅瞅 ####################
iot:
emq:
# 账号
username: anhaohao
# 密码
password: ahh@123456
# 主机地址
hostUrl: tcp://chaojiniu.top:1883
# 客户端Id不能相同采用随机数 ${random.value}
client-id: ${random.int}
# 默认主题
default-topic: test
# 保持连接
keepalive: 60
# 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
clearSession: true
--- #################### iot相关配置 TODO 芋艿【IOT】:再瞅瞅 ####################
pf4j:
# pluginsDir: /tmp/
pluginsDir: ../plugins

View File

@@ -303,6 +303,8 @@ yudao:
- infra_job
- infra_job_log
- infra_job_log
- iot_plugin_info
- iot_plugin_instance
- infra_data_source_config
- jimu_dict
- jimu_dict_item
@@ -328,6 +330,8 @@ yudao:
- mail_account
- mail_template
- sms_template
- iot:device
- iot:thing_model_list
sms-code: # 短信验证码相关的配置项
expire-times: 10m
send-frequency: 1m
@@ -349,4 +353,7 @@ yudao:
key: pLXUGAwK5305
customer: E77DF18BE109F454A5CD319E44BF5177
debug: false
debug: false
# 插件配置 TODO 芋艿【IOT】需要处理下
pf4j:
pluginsDir: /Users/anhaohao/code/gitee/ruoyi-vue-pro/plugins # 插件目录