Browse Source

更新摄像头等功能

523096025 3 năm trước cách đây
mục cha
commit
155af34b07

+ 7 - 3
huimv-farm-v2/huimv-admin/src/main/resources/application-dev.yml

@@ -5,10 +5,14 @@ spring:
   application:
     name: location
   datasource:
-    url: jdbc:mysql://rm-bp1sz356vk48i43x64o.mysql.rds.aliyuncs.com/huimv_farm_v2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
-    username: yxx_test
-    password: yxx123456
+    url: jdbc:mysql://192.168.1.7/huimv_farm_v2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
     driver-class-name: com.mysql.cj.jdbc.Driver
+#    url: jdbc:mysql://rm-bp1sz356vk48i43x64o.mysql.rds.aliyuncs.com/huimv_farm_v2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+#    username: yxx_test
+#    password: yxx123456
+#    driver-class-name: com.mysql.cj.jdbc.Driver
   jpa:
     hibernate:
       ddl-auto: update

+ 20 - 1
huimv-farm-v2/huimv-common/pom.xml

@@ -20,8 +20,28 @@
                     <source>8</source>
                     <target>8</target>
                 </configuration>
+
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <!--
+                1. 这里要指定你的springboot项目的主启动类的全类名
+                2. 大家不要把这个插件放到父项目的依赖中,哪个项目需要打包,就放到哪个项目的依赖下
+                    -->
+                  <mainClass>com.huimv.common</mainClass>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
+
     </build>
 
     <dependencies>
@@ -52,5 +72,4 @@
 
 
 
-
 </project>

+ 5 - 5
huimv-farm-v2/huimv-common/src/main/java/com/huimv/common/utils/GeneratorCodeConfig.java

@@ -35,7 +35,7 @@ public class GeneratorCodeConfig {
         // 全局配置
         GlobalConfig gc = new GlobalConfig();
         String projectPath = System.getProperty("user.dir");
-        gc.setOutputDir(projectPath + "/src/main/java");
+        gc.setOutputDir(projectPath + "/huimv-common/src/main/java");
         gc.setAuthor("astupidcoder");
         gc.setOpen(false);
         //实体属性 Swagger2 注解
@@ -44,16 +44,16 @@ public class GeneratorCodeConfig {
 
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
-        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/admin?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
+        dsc.setUrl("jdbc:mysql://192.168.1.7:3306/huimv_farm_v2?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("root");
+        dsc.setPassword("hm123456");
         mpg.setDataSource(dsc);
 
         // 包配置
         PackageConfig pc = new PackageConfig();
 //        pc.setModuleName(scanner("模块名"));
-        pc.setParent("com.huimv.admin");
+        pc.setParent("com.huimv.common.template");
         pc.setEntity("entity");
         pc.setMapper("mapper");
         pc.setService("service");
@@ -125,7 +125,7 @@ public class GeneratorCodeConfig {
         strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
         strategy.setControllerMappingHyphenStyle(true);
         strategy.setTablePrefix(pc.getModuleName() + "_");
-        strategy.setTablePrefix("sys_");
+//        strategy.setTablePrefix("sys_");
         mpg.setStrategy(strategy);
         mpg.setTemplateEngine(new FreemarkerTemplateEngine());
         mpg.execute();

+ 7 - 0
huimv-farm-v2/huimv-env/pom.xml

@@ -10,6 +10,13 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>huimv-env</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.huimv</groupId>
+            <artifactId>huimv-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
 
+    </dependencies>
 
 </project>

+ 1 - 1
huimv-farm-v2/huimv-env/src/main/java/com/huimv/env/HuimvEnvApplication.java

@@ -10,7 +10,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 public class HuimvEnvApplication {
 
     public static void main(String[] args) {
-        ApplicationContext applicationContext = SpringApplication.run(HuimvEnvApplication.class, args);
+        SpringApplication.run(HuimvEnvApplication.class, args);
 //        applicationContext.getBean(SocketServer.class).startSocketServer();
     }
 

+ 8 - 0
huimv-farm-v2/huimv-env/src/main/java/com/huimv/env/entity/ProdStock.java

@@ -0,0 +1,8 @@
+package com.huimv.env.entity;
+
+
+import lombok.Data;
+
+@Data
+public class ProdStock {
+}

+ 7 - 3
huimv-farm-v2/huimv-video/src/main/resources/application-dev.yml

@@ -5,10 +5,14 @@ spring:
   application:
     name: video
   datasource:
-    url: jdbc:mysql://rm-bp1sz356vk48i43x64o.mysql.rds.aliyuncs.com/huimv_farm_v2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
-    username: yxx_test
-    password: yxx123456
+    url: jdbc:mysql://192.168.1.7/huimv_farm_v2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
     driver-class-name: com.mysql.cj.jdbc.Driver
+#    url: jdbc:mysql://rm-bp1sz356vk48i43x64o.mysql.rds.aliyuncs.com/huimv_farm_v2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+#    username: yxx_test
+#    password: yxx123456
+#    driver-class-name: com.mysql.cj.jdbc.Driver
   jpa:
     hibernate:
       ddl-auto: update

+ 5 - 5
huimv-farm-v2/pom.xml

@@ -64,11 +64,11 @@
             <artifactId>lombok</artifactId>
             <optional>true</optional>
         </dependency>
-        <!-- JPA -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-jpa</artifactId>
-        </dependency>
+<!--        &lt;!&ndash; JPA &ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-data-jpa</artifactId>-->
+<!--        </dependency>-->
         <!-- MySQL -->
         <dependency>
             <groupId>mysql</groupId>