Browse Source

重新让git生效

yq 3 years ago
parent
commit
d930d55db8

+ 38 - 0
.gitignore

@@ -0,0 +1,38 @@
+# Created by .ignore support plugin (hsz.mobi)
+### Example user template template
+### Example user template
+
+# IntelliJ project files
+.idea
+*.iml
+out
+gen
+target
+### Java template
+# Compiled class file
+*.class
+
+# Log file
+*.log
+log
+logs
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+.DS_Store

+ 0 - 206
src/main/java/com/usky/entity/sys/log/SysLogDTO.java

@@ -1,206 +0,0 @@
-package com.usky.entity.sys.log;
-
-import javax.persistence.*;
-import java.sql.Timestamp;
-import java.util.Objects;
-
-/**
- * @author laowo
- * @version v1.0
- * @date 2021/7/14 13:57
- * @description 系统日志DTO
- **/
-@Entity
-@Table(name = "sys_log", schema = "sd_party_school", catalog = "")
-public class SysLogDTO {
-    private long id;
-    private Integer logType;
-    private String logContent;
-    private Integer operateType;
-    private String userid;
-    private String username;
-    private String ip;
-    private String method;
-    private String requestUrl;
-    private String requestParam;
-    private String requestType;
-    private Long costTime;
-    private String createBy;
-    private Timestamp createTime;
-    private String updateBy;
-    private Timestamp updateTime;
-
-
-    @Id
-    @Column(name = "id")
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    @Basic
-    @Column(name = "log_type", nullable = true)
-    public Integer getLogType() {
-        return logType;
-    }
-
-    public void setLogType(Integer logType) {
-        this.logType = logType;
-    }
-
-    @Basic
-    @Column(name = "log_content", nullable = true, length = 1000)
-    public String getLogContent() {
-        return logContent;
-    }
-
-    public void setLogContent(String logContent) {
-        this.logContent = logContent;
-    }
-
-    @Basic
-    @Column(name = "operate_type", nullable = true)
-    public Integer getOperateType() {
-        return operateType;
-    }
-
-    public void setOperateType(Integer operateType) {
-        this.operateType = operateType;
-    }
-
-    @Basic
-    @Column(name = "userid", nullable = true, length = 32)
-    public String getUserid() {
-        return userid;
-    }
-
-    public void setUserid(String userid) {
-        this.userid = userid;
-    }
-
-    @Basic
-    @Column(name = "username", nullable = true, length = 100)
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Basic
-    @Column(name = "ip", nullable = true, length = 100)
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    @Basic
-    @Column(name = "method", nullable = true, length = 500)
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    @Basic
-    @Column(name = "request_url", nullable = true, length = 255)
-    public String getRequestUrl() {
-        return requestUrl;
-    }
-
-    public void setRequestUrl(String requestUrl) {
-        this.requestUrl = requestUrl;
-    }
-
-    @Basic
-    @Column(name = "request_param", nullable = true, length = -1)
-    public String getRequestParam() {
-        return requestParam;
-    }
-
-    public void setRequestParam(String requestParam) {
-        this.requestParam = requestParam;
-    }
-
-    @Basic
-    @Column(name = "request_type", nullable = true, length = 10)
-    public String getRequestType() {
-        return requestType;
-    }
-
-    public void setRequestType(String requestType) {
-        this.requestType = requestType;
-    }
-
-    @Basic
-    @Column(name = "cost_time", nullable = true)
-    public Long getCostTime() {
-        return costTime;
-    }
-
-    public void setCostTime(Long costTime) {
-        this.costTime = costTime;
-    }
-
-    @Basic
-    @Column(name = "create_by", nullable = true, length = 32)
-    public String getCreateBy() {
-        return createBy;
-    }
-
-    public void setCreateBy(String createBy) {
-        this.createBy = createBy;
-    }
-
-    @Basic
-    @Column(name = "create_time", nullable = true)
-    public Timestamp getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Timestamp createTime) {
-        this.createTime = createTime;
-    }
-
-    @Basic
-    @Column(name = "update_by", nullable = true, length = 32)
-    public String getUpdateBy() {
-        return updateBy;
-    }
-
-    public void setUpdateBy(String updateBy) {
-        this.updateBy = updateBy;
-    }
-
-    @Basic
-    @Column(name = "update_time", nullable = true)
-    public Timestamp getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Timestamp updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        SysLogDTO sysLog = (SysLogDTO) o;
-        return Objects.equals(id, sysLog.id) && Objects.equals(logType, sysLog.logType) && Objects.equals(logContent, sysLog.logContent) && Objects.equals(operateType, sysLog.operateType) && Objects.equals(userid, sysLog.userid) && Objects.equals(username, sysLog.username) && Objects.equals(ip, sysLog.ip) && Objects.equals(method, sysLog.method) && Objects.equals(requestUrl, sysLog.requestUrl) && Objects.equals(requestParam, sysLog.requestParam) && Objects.equals(requestType, sysLog.requestType) && Objects.equals(costTime, sysLog.costTime) && Objects.equals(createBy, sysLog.createBy) && Objects.equals(createTime, sysLog.createTime) && Objects.equals(updateBy, sysLog.updateBy) && Objects.equals(updateTime, sysLog.updateTime);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(id, logType, logContent, operateType, userid, username, ip, method, requestUrl, requestParam, requestType, costTime, createBy, createTime, updateBy, updateTime);
-    }
-}

+ 0 - 7
src/main/java/com/usky/service/log/LogService.java

@@ -1,7 +0,0 @@
-package com.usky.service.log;
-
-import com.usky.entity.sys.log.SysLogDTO;
-
-public interface LogService {
-    void addLog(SysLogDTO dto);
-}

+ 0 - 19
src/main/java/com/usky/service/log/LogServiceImpl.java

@@ -1,19 +0,0 @@
-package com.usky.service.log;
-
-import com.usky.dao.impl.BaseDaoImpl;
-import com.usky.entity.sys.log.SysLogDTO;
-import org.springframework.stereotype.Service;
-
-/**
- * @author laowo
- * @version v1.0
- * @date 2021/7/14 14:10
- * @description TODO
- **/
-@Service
-public class LogServiceImpl extends BaseDaoImpl implements LogService {
-    @Override
-    public void addLog(SysLogDTO dto) {
-        getSession().save(dto);
-    }
-}

+ 0 - 11
src/main/main.iml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 107 - 0
src/main/resources/application-dev.yml

@@ -0,0 +1,107 @@
+#开发环境
+server:
+  port: 8013
+spring:
+  redis:
+    database: 1
+    host: 47.111.81.118
+    # host: 172.16.120.184
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: uskyredis
+    # password:
+    port: 6379
+  jackson:
+    time-zone: GMT+8
+  application:
+    name: JX_Cover
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    druid:
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      maxWait: 60000
+      timeBetweenEvictionRunsMillis: 60000
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      poolPreparedStatements: true
+      aopPatterns: com.usky.*
+      # filters: stat,slf4j
+      maxPoolPreparedStatementPerConnectionSize: 20
+      useGlobalDataSourceStat: false
+      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
+      db-type: com.alibaba.druid.pool.DruidDataSource
+      url: jdbc:mysql://47.111.81.118:3306/jx_cover?useunicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+      username: root
+      password: Yt2021
+  jpa:
+    database-platform: org.hibernate.dialect.MySQLDialect
+    hibernate:
+      ddl-auto: update
+    database: mysql
+    show-sql: true
+    open-in-view: false #懒加载时使用,建议false
+
+swagger:
+  enable: true
+
+cron:
+  #测试每隔十秒执行一次定时任务
+  test: 0/10 * * * * ?
+  #每一小时入库一次视频数据
+  rk: 0 0 0/12 * * ?
+  #请求每十秒执行一次
+  req: 0/10 * * * * ?
+sms:
+  accessKeyID: LTAI5tCTtstCUtCPBrmFAUCk # 你自己的accessKeyId
+  accessKeySecret: V6X2hMOEbepkTPdjeqjESs3Pc0jgPk # 你自己的AccessKeySecret
+  signName: 上海永天科技股份有限公司 # 签名名称
+  #verifyCodeTemplate: SMS_164095840 # 模板名称
+  verifyCodeTemplate: SMS_220385321 # 模板名称
+  domain: dysmsapi.aliyuncs.com # 域名
+  action: SendSMS # API类型,发送短信
+  version: 2017-05-25 # API版本,固定值
+  regionID: cn-hangzhou # 区域id
+
+mqtt:
+  config:
+    channel1:
+      consumer-enable: true
+      producer-enable: true
+      url: [tcp://124.71.175.91:1883]
+      # url: [tcp://47.98.201.73:1883]
+      topics: [/2usky/10012/861050040560669/#,/2usky/10012/861050040560321/#,/2usky/10012/861050040533286/#]
+      qos: [0,0,0]
+      username: wjzn2021
+      password: wjzn2021
+      #username: usky
+      # password: usky
+      timeout: 60
+      kep-alive-interval: 60
+      async: true
+      client-id-append-ip: true
+      consumer-client-id: consumer_client_test1
+      producer-client-id: producer_client_test1
+      consumer-will:
+        qos: 1
+        topic: will_topic
+        payload: '{"id": "consumer_client_test1"}'
+        retained: false
+      producer-will:
+        qos: 1
+        topic: will_topic
+        payload: '{"id": "producer_client_test1"}'
+        retained: false
+
+
+
+

+ 107 - 0
src/main/resources/application-prod.yml

@@ -0,0 +1,107 @@
+#开发环境
+server:
+  port: 8013
+spring:
+  redis:
+    database: 1
+    host: 10.23.39.1
+    # host: 172.16.120.184
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: caih123
+    # password:
+    port: 63790
+  jackson:
+    time-zone: GMT+8
+  application:
+    name: JX_Cover
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    druid:
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      maxWait: 60000
+      timeBetweenEvictionRunsMillis: 60000
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      poolPreparedStatements: true
+      aopPatterns: com.usky.*
+      # filters: stat,slf4j
+      maxPoolPreparedStatementPerConnectionSize: 20
+      useGlobalDataSourceStat: false
+      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
+      db-type: com.alibaba.druid.pool.DruidDataSource
+      url: jdbc:mysql://47.111.81.118:3306/jx_cover?useunicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+      username: root
+      password: Yt2021
+  jpa:
+    database-platform: org.hibernate.dialect.MySQLDialect
+    hibernate:
+      ddl-auto: update
+    database: mysql
+    show-sql: true
+    open-in-view: false #懒加载时使用,建议false
+
+swagger:
+  enable: true
+
+cron:
+  #测试每隔十秒执行一次定时任务
+  test: 0/10 * * * * ?
+  #每一小时入库一次视频数据
+  rk: 0 0 0/12 * * ?
+  #请求每十秒执行一次
+  req: 0/10 * * * * ?
+sms:
+  accessKeyID: LTAI5tCTtstCUtCPBrmFAUCk # 你自己的accessKeyId
+  accessKeySecret: V6X2hMOEbepkTPdjeqjESs3Pc0jgPk # 你自己的AccessKeySecret
+  signName: 上海永天科技股份有限公司 # 签名名称
+  #verifyCodeTemplate: SMS_164095840 # 模板名称
+  verifyCodeTemplate: SMS_220385321 # 模板名称
+  domain: dysmsapi.aliyuncs.com # 域名
+  action: SendSMS # API类型,发送短信
+  version: 2017-05-25 # API版本,固定值
+  regionID: cn-hangzhou # 区域id
+
+mqtt:
+  config:
+    channel1:
+      consumer-enable: true
+      producer-enable: true
+      url: [tcp://124.71.175.91:1883]
+      # url: [tcp://47.98.201.73:1883]
+      topics: [/2usky/10012/861050040560669/#,/2usky/10012/861050040560321/#,/2usky/10012/861050040533286/#]
+      qos: [0,0,0]
+      username: wjzn2021
+      password: wjzn2021
+      #username: usky
+      # password: usky
+      timeout: 60
+      kep-alive-interval: 60
+      async: true
+      client-id-append-ip: true
+      consumer-client-id: consumer_client_test1
+      producer-client-id: producer_client_test1
+      consumer-will:
+        qos: 1
+        topic: will_topic
+        payload: '{"id": "consumer_client_test1"}'
+        retained: false
+      producer-will:
+        qos: 1
+        topic: will_topic
+        payload: '{"id": "producer_client_test1"}'
+        retained: false
+
+
+
+

+ 107 - 0
src/main/resources/application-test.yml

@@ -0,0 +1,107 @@
+#开发环境
+server:
+  port: 8013
+spring:
+  redis:
+    database: 1
+    host: 47.111.81.118
+    # host: 172.16.120.184
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: uskyredis
+    # password:
+    port: 6379
+  jackson:
+    time-zone: GMT+8
+  application:
+    name: JX_Cover
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    druid:
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      maxWait: 60000
+      timeBetweenEvictionRunsMillis: 60000
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      poolPreparedStatements: true
+      aopPatterns: com.usky.*
+      # filters: stat,slf4j
+      maxPoolPreparedStatementPerConnectionSize: 20
+      useGlobalDataSourceStat: false
+      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
+      db-type: com.alibaba.druid.pool.DruidDataSource
+      url: jdbc:mysql://47.111.81.118:3306/jx_cover?useunicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+      username: root
+      password: Yt2021
+  jpa:
+    database-platform: org.hibernate.dialect.MySQLDialect
+    hibernate:
+      ddl-auto: update
+    database: mysql
+    show-sql: true
+    open-in-view: false #懒加载时使用,建议false
+
+swagger:
+  enable: true
+
+cron:
+  #测试每隔十秒执行一次定时任务
+  test: 0/10 * * * * ?
+  #每一小时入库一次视频数据
+  rk: 0 0 0/12 * * ?
+  #请求每十秒执行一次
+  req: 0/10 * * * * ?
+sms:
+  accessKeyID: LTAI5tCTtstCUtCPBrmFAUCk # 你自己的accessKeyId
+  accessKeySecret: V6X2hMOEbepkTPdjeqjESs3Pc0jgPk # 你自己的AccessKeySecret
+  signName: 上海永天科技股份有限公司 # 签名名称
+  #verifyCodeTemplate: SMS_164095840 # 模板名称
+  verifyCodeTemplate: SMS_220385321 # 模板名称
+  domain: dysmsapi.aliyuncs.com # 域名
+  action: SendSMS # API类型,发送短信
+  version: 2017-05-25 # API版本,固定值
+  regionID: cn-hangzhou # 区域id
+
+mqtt:
+  config:
+    channel1:
+      consumer-enable: true
+      producer-enable: true
+      url: [tcp://124.71.175.91:1883]
+      # url: [tcp://47.98.201.73:1883]
+      topics: [/2usky/10012/861050040560669/#,/2usky/10012/861050040560321/#,/2usky/10012/861050040533286/#]
+      qos: [0,0,0]
+      username: wjzn2021
+      password: wjzn2021
+      #username: usky
+      # password: usky
+      timeout: 60
+      kep-alive-interval: 60
+      async: true
+      client-id-append-ip: true
+      consumer-client-id: consumer_client_test1
+      producer-client-id: producer_client_test1
+      consumer-will:
+        qos: 1
+        topic: will_topic
+        payload: '{"id": "consumer_client_test1"}'
+        retained: false
+      producer-will:
+        qos: 1
+        topic: will_topic
+        payload: '{"id": "producer_client_test1"}'
+        retained: false
+
+
+
+

+ 0 - 12
src/main/test/test.iml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="main" />
-  </component>
-</module>