Browse Source

添加报警功能

523096025 4 năm trước cách đây
mục cha
commit
95faf09218
24 tập tin đã thay đổi với 703 bổ sung21 xóa
  1. 53 0
      huimv-ql-farm/huimv-ql-environment/src/main/java/com/huimv/environment/entity/WarningInfoEntity.java
  2. 9 0
      huimv-ql-farm/huimv-ql-environment/src/main/java/com/huimv/environment/repo/WarningInfoEntityRepo.java
  3. 47 17
      huimv-ql-farm/huimv-ql-environment/src/main/java/com/huimv/environment/service/impl/EnvironmentControlServiceImpl.java
  4. 2 2
      huimv-ql-farm/huimv-ql-environment/src/main/resources/application.properties
  5. 26 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/controller/WarningInfoController.java
  6. 26 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/domain/FarmSmEntity.java
  7. 51 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/domain/WarningInfoEntity.java
  8. 10 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/FarmSmEntityRepo.java
  9. 9 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/WarningInfoEntityRepo.java
  10. 14 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/service/WarningInfoService.java
  11. 57 0
      huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/service/impl/WarningInfoServiceImpl.java
  12. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo1.yml
  13. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo2.yml
  14. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo3.yml
  15. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo4.yml
  16. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo5.yml
  17. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo6.yml
  18. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo1.yml
  19. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo2.yml
  20. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo3.yml
  21. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo4.yml
  22. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo5.yml
  23. 32 0
      huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo6.yml
  24. 15 2
      huimv-ql-farm/huimv-ql-production/src/main/resources/application.properties

+ 53 - 0
huimv-ql-farm/huimv-ql-environment/src/main/java/com/huimv/environment/entity/WarningInfoEntity.java

@@ -0,0 +1,53 @@
+package com.huimv.environment.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+@Entity
+@Table(name = "warning_info")
+@Data
+public class WarningInfoEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id", nullable = false)
+    private Integer id;
+
+    /**
+     * 温度
+     */
+    @Column(name = "temperature")
+    private Double temperature;
+
+    /**
+     * 湿度
+     */
+    @Column(name = "humidity")
+    private Integer humidity;
+
+    /**
+     * 上传时间
+     */
+    @Column(name = "upload_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
+    private Date uploadTime;
+
+    /**
+     * 报警类型
+     */
+    @Column(name = "type")
+    private String type;
+
+    /**
+     * 机器编号
+     */
+    @Column(name = "LQID")
+    private String LQID;
+
+}

+ 9 - 0
huimv-ql-farm/huimv-ql-environment/src/main/java/com/huimv/environment/repo/WarningInfoEntityRepo.java

@@ -0,0 +1,9 @@
+package com.huimv.environment.repo;
+
+import com.huimv.environment.entity.WarningInfoEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+public interface WarningInfoEntityRepo extends JpaRepository<WarningInfoEntity, Integer>, JpaSpecificationExecutor<WarningInfoEntity> {
+
+}

+ 47 - 17
huimv-ql-farm/huimv-ql-environment/src/main/java/com/huimv/environment/service/impl/EnvironmentControlServiceImpl.java

@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
@@ -170,30 +171,59 @@ public class EnvironmentControlServiceImpl implements IEnvironmentControlService
     }
 
 
+//    @Override
+//    @DS("slave")
+//    public Result warningInfor() {
+//        List endList  = new ArrayList();
+//        List<DeviceUpDataEntity> allByTimestampBetween = deviceUpDataEntityRepo.findAllByTimestampBetween(minTemp, maxTemp, cn.hutool.core.date.DateUtil.today());
+//        for (DeviceUpDataEntity deviceUpDataEntity : allByTimestampBetween) {
+//            Map map  = new HashMap();
+//            map.put("farmName",farmSmRepository.findByLqid(deviceUpDataEntity.getDeviceId()).getName());
+//            map.put("time",deviceUpDataEntity.getTimestamp());
+//            String str  = "";
+//            if (deviceUpDataEntity.getDataTempConvert() < minTemp){
+//                str = str +"温度过低,温度:"+ deviceUpDataEntity.getDataTempConvert();
+//            }
+//            if (deviceUpDataEntity.getDataTempConvert() > maxTemp){
+//                str = str +"温度过高,温度:"+ deviceUpDataEntity.getDataTempConvert();
+//            }
+//            map.put("msg",str);
+//            endList.add(map);
+//        }
+//
+//        return new Result(ResultCode.SUCCESS,endList) ;
+//    }
+
+    @Autowired
+    private WarningInfoEntityRepo warningInfoEntityRepo;
+
     @Override
     @DS("master")
     public Result warningInfor() {
-        List endList  = new ArrayList();
-        List<DeviceUpDataEntity> allByTimestampBetween = deviceUpDataEntityRepo.findAllByTimestampBetween(minTemp, maxTemp, cn.hutool.core.date.DateUtil.today());
-        for (DeviceUpDataEntity deviceUpDataEntity : allByTimestampBetween) {
-            Map map  = new HashMap();
-            map.put("farmName",farmSmRepository.findByLqid(deviceUpDataEntity.getDeviceId()).getName());
-            map.put("time",deviceUpDataEntity.getTimestamp());
-            String str  = "";
-            if (deviceUpDataEntity.getDataTempConvert() < minTemp){
-                str = str +"温度过低,温度:"+ deviceUpDataEntity.getDataTempConvert();
-            }
-            if (deviceUpDataEntity.getDataTempConvert() > maxTemp){
-                str = str +"温度过高,温度:"+ deviceUpDataEntity.getDataTempConvert();
-            }
+        List<WarningInfoEntity> all = warningInfoEntityRepo.findAll();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        List list  = new ArrayList();
+
+        for (WarningInfoEntity warningInfoEntity : all) {
+            Map map = new HashMap();
+
+            String lqid = warningInfoEntity.getLQID();
+            FarmSm byLqid = farmSmRepository.findByLqid(lqid);
+            Date uploadTime = warningInfoEntity.getUploadTime();
+            String name = byLqid.getName();
+            String type = warningInfoEntity.getType();
+            Double temperature = warningInfoEntity.getTemperature();
+            String str = type+"报警,当前温度为:"+temperature+" ℃";
+
+            map.put("farmName",name);
+            map.put("time",simpleDateFormat.format(uploadTime));
             map.put("msg",str);
-            endList.add(map);
-        }
+            list.add(map);
 
-        return new Result(ResultCode.SUCCESS,endList) ;
+        }
+        return new Result(ResultCode.SUCCESS,list);
     }
 
-
     @Override
     @DS("master")
     public Result findByZSID() {

+ 2 - 2
huimv-ql-farm/huimv-ql-environment/src/main/resources/application.properties

@@ -1,6 +1,6 @@
-#spring.profiles.active=ycg
+spring.profiles.active=ycg
 #spring.profiles.active=wuyi
-spring.profiles.active=haiyan
+#spring.profiles.active=haiyan
 #spring.profiles.active=wjj
 minTemp=10.0
 maxTemp=30.0

+ 26 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/controller/WarningInfoController.java

@@ -0,0 +1,26 @@
+package com.huimv.production.controller;
+
+import com.huimv.common.result.Result;
+import com.huimv.production.service.WarningInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.production.controller
+ * @Description : TODO
+ * @Author : yuxuexuan
+ * @Create : 2021/5/26 0026 14:01
+ **/
+@RestController
+@RequestMapping("/environmentControl")
+public class WarningInfoController {
+    @Autowired
+    private WarningInfoService warningInfoService;
+
+    @RequestMapping(value = "/warningInfor")
+    public Result warningInfor(){
+        return warningInfoService.warningInfor();
+    }
+}

+ 26 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/domain/FarmSmEntity.java

@@ -0,0 +1,26 @@
+package com.huimv.production.domain;
+
+import lombok.Data;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@Entity
+@Table(name = "farm_sm")
+@Data
+public class FarmSmEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id", nullable = false)
+    private Integer id;
+
+    @Column(name = "name")
+    private String name;
+
+    @Column(name = "LQID")
+    private String LQID;
+
+}

+ 51 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/domain/WarningInfoEntity.java

@@ -0,0 +1,51 @@
+package com.huimv.production.domain;
+
+import lombok.Data;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+@Entity
+@Table(name = "warning_info")
+@Data
+public class WarningInfoEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id", nullable = false)
+    private Integer id;
+
+    /**
+     * 温度
+     */
+    @Column(name = "temperature")
+    private Double temperature;
+
+    /**
+     * 湿度
+     */
+    @Column(name = "humidity")
+    private Integer humidity;
+
+    /**
+     * 上传时间
+     */
+    @Column(name = "upload_time")
+    private Date uploadTime;
+
+    /**
+     * 报警类型
+     */
+    @Column(name = "type")
+    private String type;
+
+    /**
+     * 机器编号
+     */
+    @Column(name = "LQID")
+    private String LQID;
+
+}

+ 10 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/FarmSmEntityRepo.java

@@ -0,0 +1,10 @@
+package com.huimv.production.repo;
+
+import com.huimv.production.domain.FarmSmEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+public interface FarmSmEntityRepo extends JpaRepository<FarmSmEntity, Integer>, JpaSpecificationExecutor<FarmSmEntity> {
+
+    FarmSmEntity findByLQID(String LQID);
+}

+ 9 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/WarningInfoEntityRepo.java

@@ -0,0 +1,9 @@
+package com.huimv.production.repo;
+
+import com.huimv.production.domain.WarningInfoEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+public interface WarningInfoEntityRepo extends JpaRepository<WarningInfoEntity, Integer>, JpaSpecificationExecutor<WarningInfoEntity> {
+
+}

+ 14 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/service/WarningInfoService.java

@@ -0,0 +1,14 @@
+package com.huimv.production.service;
+
+import com.huimv.common.result.Result;
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.production.service
+ * @Description : TODO
+ * @Author : yuxuexuan
+ * @Create : 2021/5/26 0026 14:03
+ **/
+public interface WarningInfoService {
+    Result warningInfor();
+}

+ 57 - 0
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/service/impl/WarningInfoServiceImpl.java

@@ -0,0 +1,57 @@
+package com.huimv.production.service.impl;
+
+import com.huimv.common.result.Result;
+import com.huimv.common.result.ResultCode;
+import com.huimv.production.domain.FarmSmEntity;
+import com.huimv.production.domain.WarningInfoEntity;
+import com.huimv.production.repo.FarmSmEntityRepo;
+import com.huimv.production.repo.WarningInfoEntityRepo;
+import com.huimv.production.service.WarningInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.production.service.impl
+ * @Description : TODO
+ * @Author : yuxuexuan
+ * @Create : 2021/5/26 0026 14:03
+ **/
+@Service
+public class WarningInfoServiceImpl implements WarningInfoService {
+
+    @Autowired
+    private WarningInfoEntityRepo warningInfoEntityRepo;
+
+    @Autowired
+    private FarmSmEntityRepo farmSmEntityRepo;
+
+    @Override
+    public Result warningInfor() {
+        List<WarningInfoEntity> all = warningInfoEntityRepo.findAll();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        List list  = new ArrayList();
+
+        for (WarningInfoEntity warningInfoEntity : all) {
+            Map map = new HashMap();
+
+            String lqid = warningInfoEntity.getLQID();
+            FarmSmEntity byLqid = farmSmEntityRepo.findByLQID(lqid);
+            Date uploadTime = warningInfoEntity.getUploadTime();
+            String name = byLqid.getName();
+            String type = warningInfoEntity.getType();
+            Double temperature = warningInfoEntity.getTemperature();
+            String str = type+"报警,当前温度为:"+temperature+" ℃";
+
+            map.put("farmName",name);
+            map.put("time",simpleDateFormat.format(uploadTime));
+            map.put("msg",str);
+            list.add(map);
+
+        }
+        return new Result(ResultCode.SUCCESS,list);
+    }
+}

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo1.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_haiyan_demo1?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo2.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_haiyan_demo2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo3.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_haiyan_demo3?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo4.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_haiyan_demo4?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo5.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_haiyan_demo5?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-haiyan-demo6.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_haiyan_demo6?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo1.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_demo1?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo2.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_demo2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo3.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_demo3?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo4.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_demo4?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo5.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_demo5?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 32 - 0
huimv-ql-farm/huimv-ql-production/src/main/resources/application-ycg-demo6.yml

@@ -0,0 +1,32 @@
+server:
+  port: 8090
+spring:
+  application:
+    name: production
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv_ql_farm_demo6?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&failOverReadOnly=false&validationQuery=select 1&testOnBorrow=true
+#    url: jdbc:mysql://127.0.0.1:3306/huimv_ql_farm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+    #  redis:
+#    database: 0
+#    host: 119.3.84.55
+#    port: 6379
+#    password: hm123456
+#    jedis:
+#      pool:
+#        max-active: 20
+#        max-wait: -1
+#        max-idle: 10
+#        min-idle: 0
+#    timeout: 5000

+ 15 - 2
huimv-ql-farm/huimv-ql-production/src/main/resources/application.properties

@@ -1,7 +1,20 @@
-spring.profiles.active=ycg
+#spring.profiles.active=ycg
 #spring.profiles.active=wuyi
-#spring.profiles.active=haiyan
+spring.profiles.active=haiyan
 #spring.profiles.active=wjj
+#spring.profiles.active=haiyan-demo1
+#spring.profiles.active=haiyan-demo2
+#spring.profiles.active=haiyan-demo3
+#spring.profiles.active=haiyan-demo4
+#spring.profiles.active=haiyan-demo5
+#spring.profiles.active=haiyan-demo6
+#spring.profiles.active=ycg-demo1
+#spring.profiles.active=ycg-demo2
+#spring.profiles.active=ycg-demo3
+#spring.profiles.active=ycg-demo4
+#spring.profiles.active=ycg-demo5
+#spring.profiles.active=ycg-demo6
+
 
 # 生产数据源配置(本地填报数据true/远程数据false)
 #production.datasource.type=true