diff --git a/.gitignore b/.gitignore index c8e82cc..a70b169 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,5 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser +**/.idea/ +**/logs/ \ No newline at end of file diff --git a/docs/databases/table_create_gf.sql b/docs/databases/table_create_gf.sql new file mode 100644 index 0000000..e69de29 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..cdc86c3 --- /dev/null +++ b/pom.xml @@ -0,0 +1,19 @@ + + + + + 4.0.0 + yxt-supervise-gf + + yxt-supervise-gf-api + yxt-supervise-gf-biz + + com.yxt.supervise.gf + 0.0.1 + + pom + 光伏(山海新能源)项目后台逻辑和接口 + + \ No newline at end of file diff --git a/yxt-supervise-gf-api/pom.xml b/yxt-supervise-gf-api/pom.xml new file mode 100644 index 0000000..7b02084 --- /dev/null +++ b/yxt-supervise-gf-api/pom.xml @@ -0,0 +1,44 @@ + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-supervise-gf-api + com.yxt.supervise.gf + 0.0.1-SNAPSHOT + + + + com.yxt + yxt-common-core + 0.0.1 + + + org.projectlombok + lombok + 1.18.24 + true + + + + + + + nexus-releases + http://172.18.0.3:8081/repository/yxt-mvn-releases/ + + + nexus-snapshots + http://172.18.0.3:8081/repository/yxt-mvn-snapshot/ + + + + + \ No newline at end of file diff --git a/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/package-info.java b/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/package-info.java new file mode 100644 index 0000000..658efd1 --- /dev/null +++ b/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.supervise.gf.api; \ No newline at end of file diff --git a/yxt-supervise-gf-biz/pom.xml b/yxt-supervise-gf-biz/pom.xml new file mode 100644 index 0000000..beb0b19 --- /dev/null +++ b/yxt-supervise-gf-biz/pom.xml @@ -0,0 +1,148 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-supervise-gf-biz + com.yxt.supervise.monitor + 0.0.1 + + + + com.yxt.supervise.monitor + yxt-supervise-gf-api + 0.0.1-SNAPSHOT + + + com.yxt + yxt-common-base + 0.0.1 + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + javax.servlet + javax.servlet-api + 4.0.1 + compile + + + + org.apache.rocketmq + rocketmq-spring-boot-starter + 2.2.3 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.bytedeco + javacv + 1.3.3 + + + org.bytedeco + javacv-platform + 1.3.3 + + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + + org.projectlombok + lombok + + + + org.springframework.boot + spring-boot-starter-web + + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-websocket + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java new file mode 100644 index 0000000..9addaf1 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java @@ -0,0 +1,22 @@ +package com.yxt.supervise.monitor; + + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * @author dimengzhe + */ +@SpringBootApplication(scanBasePackages = { + "com.yxt.common.base.config", + "com.yxt.supervise.gf" +}) +// 启用自带定时任务 +@EnableScheduling +public class YxtSuperviseGfApplication { + public static void main(String[] args) { + SpringApplication.run(YxtSuperviseGfApplication.class, args); + } +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/package-info.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/package-info.java new file mode 100644 index 0000000..4cb2870 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口 + */ +package com.yxt.supervise.gf.biz; \ No newline at end of file diff --git a/yxt-supervise-gf-biz/src/main/resources/application-devv.yml b/yxt-supervise-gf-biz/src/main/resources/application-devv.yml new file mode 100644 index 0000000..4788493 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/resources/application-devv.yml @@ -0,0 +1,31 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/yxt_supervise_gf?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: root + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: + port: 6379 + timeout: 0 # 连接超时时间(毫秒) + +image: + upload: + path: D:\supervise\upload\ + url: + prefix: http://127.0.0.1:8112/upload/ + diff --git a/yxt-supervise-gf-biz/src/main/resources/application-pro.yml b/yxt-supervise-gf-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000..97caf75 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/resources/application-pro.yml @@ -0,0 +1,38 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/yxt_supervise_gf?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: shxngf + password: shxngf + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:/supervise/upload/ + url: + prefix: http://127.0.0.1/api/upload/ + +scheduleTime: + cron: 0 59 * * * ? + folder: D:/webapps/supervise/static/upload/monitor + +websocket: + port: 19800 + boss: + thread: 4 + worker: + thread: 8 diff --git a/yxt-supervise-gf-biz/src/main/resources/application-test.yml b/yxt-supervise-gf-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000..b2a8282 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/resources/application-test.yml @@ -0,0 +1,41 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/yxt_supervise_gf?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: shxngf + password: shxngf + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: + port: 6379 + timeout: 0 # 连接超时时间(毫秒) + + +image: + upload: + path: D:/webapps/supervise/static/upload/ + url: + prefix: http://122.14.222.186:7003/upload/ + +scheduleTime: + cron: 0 59 * * * ? +# folder: D:\resources\download + folder: /root/huirong/monitor-java/imagesDownload +websocket: + port: 19800 + boss: + thread: 4 + worker: + thread: 8 + diff --git a/yxt-supervise-gf-biz/src/main/resources/application.yml b/yxt-supervise-gf-biz/src/main/resources/application.yml new file mode 100644 index 0000000..2881656 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/resources/application.yml @@ -0,0 +1,50 @@ +spring: + application: + name: yxt-supervise-gf + profiles: + active: devv +# active: test +# active: pro + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7102 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#rocketmq: +# producer: +# group: yxt-supervise-gf +# name-server: 127.0.0.1:9876 + + + + diff --git a/yxt-supervise-gf-biz/src/main/resources/logback-spring.xml b/yxt-supervise-gf-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..f0e6688 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.base}.log + + ${log.base}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-supervise-gf-biz/src/test/java/demo/rocketmq/RocketMQTest.java b/yxt-supervise-gf-biz/src/test/java/demo/rocketmq/RocketMQTest.java new file mode 100644 index 0000000..e69de29