From 36eccebd31cc8e6755f6782646d829a9fc7801d2 Mon Sep 17 00:00:00 2001
From: huzhengkao <562572218@qq.com>
Date: Thu, 22 May 2025 15:08:05 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sql/iot.sql | 21 +++++
tcctyn-common/tcctyn-common-core/pom.xml | 5 ++
tcctyn-modules/pom.xml | 1 +
tcctyn-modules/tcctyn-iot/pom.xml | 89 +++++++++++++++++++
.../com/tcctyn/iot/TcctynIotApplication.java | 18 ++++
.../src/main/resources/application.yml | 25 ++++++
.../tcctyn-iot/src/main/resources/banner.txt | 11 +++
7 files changed, 170 insertions(+)
create mode 100644 sql/iot.sql
create mode 100644 tcctyn-modules/tcctyn-iot/pom.xml
create mode 100644 tcctyn-modules/tcctyn-iot/src/main/java/com/tcctyn/iot/TcctynIotApplication.java
create mode 100644 tcctyn-modules/tcctyn-iot/src/main/resources/application.yml
create mode 100644 tcctyn-modules/tcctyn-iot/src/main/resources/banner.txt
diff --git a/sql/iot.sql b/sql/iot.sql
new file mode 100644
index 0000000..41ef815
--- /dev/null
+++ b/sql/iot.sql
@@ -0,0 +1,21 @@
+CREATE TABLE api_configs (
+ id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+ name VARCHAR(64) NOT NULL COMMENT 'API名称',
+ url VARCHAR(255) NOT NULL COMMENT 'API URL地址',
+ api_key VARCHAR(255) DEFAULT NULL COMMENT 'API访问密钥',
+ api_secret VARCHAR(512) DEFAULT NULL COMMENT 'API安全密钥',
+ status TINYINT(1) UNSIGNED DEFAULT 0 COMMENT '状态(0-启用 1-停用)',
+ create_time datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ update_time datetime COMMENT '更新时间',
+ create_by VARCHAR(64) DEFAULT NULL COMMENT '创建人',
+ update_by VARCHAR(64) DEFAULT NULL COMMENT '更新人',
+ is_deleted TINYINT(1) UNSIGNED DEFAULT 0 COMMENT '是否删除(0-未删除 1-已删除)',
+ remark VARCHAR(255) DEFAULT NULL COMMENT '备注',
+ PRIMARY KEY (id),
+ UNIQUE KEY uk_name (name) COMMENT 'API名称唯一索引',
+ KEY idx_status (status) COMMENT '状态索引'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='API信息配置表';
+
+
+INSERT INTO api_configs (name, url, api_key, api_secret, status,create_by)
+VALUES("海康平台API","https://116.53.205.228:14443/artemis","21887937","hwOzOEqxuPDz5frAnEXb",0,"admin");
\ No newline at end of file
diff --git a/tcctyn-common/tcctyn-common-core/pom.xml b/tcctyn-common/tcctyn-common-core/pom.xml
index b4016c2..e2f9873 100644
--- a/tcctyn-common/tcctyn-common-core/pom.xml
+++ b/tcctyn-common/tcctyn-common-core/pom.xml
@@ -107,6 +107,11 @@
javax.servlet-api
+
+ org.projectlombok
+ lombok
+
+
diff --git a/tcctyn-modules/pom.xml b/tcctyn-modules/pom.xml
index 55037f6..8ed4a4c 100644
--- a/tcctyn-modules/pom.xml
+++ b/tcctyn-modules/pom.xml
@@ -11,6 +11,7 @@
tcctyn-system
tcctyn-gen
+ tcctyn-iot
tcctyn-modules
diff --git a/tcctyn-modules/tcctyn-iot/pom.xml b/tcctyn-modules/tcctyn-iot/pom.xml
new file mode 100644
index 0000000..7b61830
--- /dev/null
+++ b/tcctyn-modules/tcctyn-iot/pom.xml
@@ -0,0 +1,89 @@
+
+
+ 4.0.0
+
+ com.tcctyn
+ tcctyn-modules
+ 1.0.0
+
+ tcctyn-iot
+
+
+ tcctyn-iot物联网模块
+
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ org.apache.velocity
+ velocity-engine-core
+
+
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
+
+ com.tcctyn
+ tcctyn-common-log
+
+
+
+
+ com.tcctyn
+ tcctyn-common-swagger
+
+
+
+ com.tcctyn
+ tcctyn-common-core
+
+
+
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tcctyn-modules/tcctyn-iot/src/main/java/com/tcctyn/iot/TcctynIotApplication.java b/tcctyn-modules/tcctyn-iot/src/main/java/com/tcctyn/iot/TcctynIotApplication.java
new file mode 100644
index 0000000..3235800
--- /dev/null
+++ b/tcctyn-modules/tcctyn-iot/src/main/java/com/tcctyn/iot/TcctynIotApplication.java
@@ -0,0 +1,18 @@
+package com.tcctyn.iot;
+
+import com.tcctyn.common.security.annotation.EnableCustomConfig;
+import com.tcctyn.common.security.annotation.EnableRyFeignClients;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@EnableCustomConfig
+@EnableRyFeignClients
+@SpringBootApplication
+public class TcctynIotApplication {
+
+ public static void main(String[] args)
+ {
+ SpringApplication.run(TcctynIotApplication.class, args);
+ System.out.println("(♥◠‿◠)ノ゙ 物联网模块启动成功 ლ(´ڡ`ლ)゙");
+ }
+}
\ No newline at end of file
diff --git a/tcctyn-modules/tcctyn-iot/src/main/resources/application.yml b/tcctyn-modules/tcctyn-iot/src/main/resources/application.yml
new file mode 100644
index 0000000..f8feccf
--- /dev/null
+++ b/tcctyn-modules/tcctyn-iot/src/main/resources/application.yml
@@ -0,0 +1,25 @@
+# Tomcat
+server:
+ port: 9004
+
+spring:
+ application:
+ name: ${artifactId}
+ cloud:
+ nacos:
+ username: @nacos.username@
+ password: @nacos.password@
+ # 服务发现配置
+ discovery:
+ server-addr: 47.109.202.121:8858
+ config:
+ server-addr: ${spring.cloud.nacos.discovery.server-addr}
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-@profiles.active@.${spring.cloud.nacos.config.file-extension}
+ config:
+ import:
+ # - optional:nacos:application-@profiles.active@.yml
+ - optional:nacos:${spring.application.name}-@profiles.active@.yml
diff --git a/tcctyn-modules/tcctyn-iot/src/main/resources/banner.txt b/tcctyn-modules/tcctyn-iot/src/main/resources/banner.txt
new file mode 100644
index 0000000..ad83e3e
--- /dev/null
+++ b/tcctyn-modules/tcctyn-iot/src/main/resources/banner.txt
@@ -0,0 +1,11 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
+
+ _ _ _ _
+ | | | | (_) | |
+ | |_ ___ ___ | |_ _ _ _ __ _ ___ | |_
+ | __| / __| / __| | __| | | | | | '_ \ | | / _ \ | __|
+ | |_ | (__ | (__ | |_ | |_| | | | | | | | | (_) | | |_
+ \__| \___| \___| \__| \__, | |_| |_| |_| \___/ \__|
+ __/ |
+ |___/
\ No newline at end of file