Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev' into dev

hecheng před 3 roky
rodič
revize
404ff69d4e

+ 7 - 69
pom.xml

@@ -110,6 +110,13 @@
                 <version>${tobato.version}</version>
             </dependency>
 
+            <!-- 动态数据源 -->
+            <dependency>
+                <groupId>com.baomidou</groupId>
+                <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+                <version>${dynamic-ds.version}</version>
+            </dependency>
+
             <!-- Mybatis 依赖配置 -->
             <dependency>
                 <groupId>org.mybatis.spring.boot</groupId>
@@ -198,74 +205,6 @@
                 <version>${common-pool.version}</version>
             </dependency>
 
-            <!-- 核心模块 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-core</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 接口模块 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-swagger</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 安全模块 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-security</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 权限范围 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-datascope</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 项目整合之后这个包要处理掉 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-api-system</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 多数据源 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-datasource</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 日志记录 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-log</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!-- 缓存服务 -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-redis</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <!--      返回值包装      -->
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-resultdata</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>com.zd</groupId>
-                <artifactId>zd-common-mqtt</artifactId>
-                <version>${zd.version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-starter-test</artifactId>
@@ -316,7 +255,6 @@
                 <version>${zd.version}</version>
             </dependency>
 
-
             <dependency>
                 <groupId>com.zd.swagger</groupId>
                 <artifactId>common-swagger</artifactId>

+ 0 - 10
zd-common/common-core/pom.xml

@@ -37,18 +37,9 @@
             <artifactId>jedis</artifactId>
         </dependency>
 
-        <!-- Druid -->
-        <!--<dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid-spring-boot-starter</artifactId>
-            <version>${druid.version}</version>
-        </dependency>-->
-
         <dependency>
             <groupId>com.baomidou</groupId>
             <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
-            <version>3.5.2</version>
-            <scope>compile</scope>
         </dependency>
 
         <dependency>
@@ -59,7 +50,6 @@
         <dependency>
             <groupId>com.zd.system</groupId>
             <artifactId>zd-system-api</artifactId>
-            <version>3.1.0</version>
         </dependency>
 
         <!-- excel工具 -->

+ 4 - 0
zd-common/common-swagger/src/main/java/com/zd/common/swagger/config/AppListener.java

@@ -4,6 +4,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.context.event.ApplicationStartedEvent;
 import org.springframework.context.ApplicationListener;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
 import org.springframework.core.env.Environment;
 
 import java.net.InetAddress;
@@ -14,6 +16,8 @@ import java.net.UnknownHostException;
  * @Date: 2021/09/30/10:13
  * @Description:
  */
+@Configuration
+@Order(-108)
 public class AppListener implements ApplicationListener<ApplicationStartedEvent> {
     static Logger logger= LoggerFactory.getLogger(AppListener.class);
     @Override

+ 2 - 11
zd-gateway/pom.xml

@@ -86,11 +86,11 @@
         </dependency>
 
         <!-- Swagger -->
-        <dependency>
+        <!--<dependency>
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger-ui</artifactId>
             <version>${swagger.fox.version}</version>
-        </dependency>
+        </dependency>-->
 
         <dependency>
             <groupId>com.github.xiaoymin</groupId>
@@ -119,15 +119,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <!-- 打包时跳过test插件,不运行test测试用例 -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${maven-surefire-plugin.version}</version>
-                <configuration>
-                    <skipTests>true</skipTests>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>

+ 0 - 10
zd-gateway/src/main/resources/banner.txt

@@ -1,10 +0,0 @@
-Spring Boot Version: ${spring-boot.version}
-Spring Application Name: ${spring.application.name}
-                            _                        _                                 
-                           (_)                      | |                                
- _ __  _   _   ___   _   _  _  ______   __ _   __ _ | |_   ___ __      __  __ _  _   _ 
-| '__|| | | | / _ \ | | | || ||______| / _` | / _` || __| / _ \\ \ /\ / / / _` || | | |
-| |   | |_| || (_) || |_| || |        | (_| || (_| || |_ |  __/ \ V  V / | (_| || |_| |
-|_|    \__,_| \___/  \__, ||_|         \__, | \__,_| \__| \___|  \_/\_/   \__,_| \__, |
-                      __/ |             __/ |                                     __/ |
-                     |___/             |___/                                     |___/ 

+ 0 - 10
zd-modules/zd-airbottle/src/main/resources/banner.txt

@@ -1,10 +0,0 @@
-Spring Boot Version: ${spring-boot.version}
-Spring Application Name: ${spring.application.name}
-                            _                           _                    
-                           (_)                         | |                   
- _ __  _   _   ___   _   _  _  ______  ___  _   _  ___ | |_   ___  _ __ ___  
-| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ 
-| |   | |_| || (_) || |_| || |        \__ \| |_| |\__ \| |_ |  __/| | | | | |
-|_|    \__,_| \___/  \__, ||_|        |___/ \__, ||___/ \__| \___||_| |_| |_|
-                      __/ |                  __/ |                           
-                     |___/                  |___/                            

+ 4 - 1
zd-modules/zd-base/src/main/resources/bootstrap.yml

@@ -1,8 +1,11 @@
 server:
   port: ${service.port.base}
 
-
 spring:
+  servlet:
+    multipart:
+      max-file-size: 300MB
+      max-request-size: 3000MB
   freemarker:
     request-context-attribute: request
     #prefix: /templates/

+ 2 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSubMangerController.java

@@ -90,8 +90,8 @@ public class LabSubMangerController extends BaseController {
     @ApiOperation("查询实验室详情")
     @GetMapping("/query/{id}/{type}")
     @PreAuthorize(hasPermi = PerPrefix.LABORATORY_SUBJECT + PerFun.QUERY)
-    public LabSubjectControllerVO querySubById(@PathVariable("id") Long id, @PathVariable("type") Integer type) {
-        return subjectManagerService.querySubById(id, type);
+    public ResultData<LabSubjectControllerVO> querySubById(@PathVariable("id") Long id, @PathVariable("type") Integer type) {
+        return ResultData.success(subjectManagerService.querySubById(id, type));
     }
 
     /**

+ 0 - 65
zd-modules/zd-modules-laboratory/src/main/resources/templates/websocket.html

@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>websocket通讯</title>
-</head>
-<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
-<script>
-    var socket;
-    function openSocket() {
-        if(typeof(WebSocket) == "undefined") {
-            console.log("您的浏览器不支持WebSocket");
-        }else{
-            console.log("您的浏览器支持WebSocket");
-            //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
-            //等同于socket = new WebSocket("ws://localhost:8888/xxxx/im/25");
-            //var socketUrl="${request.contextPath}/im/"+$("#userId").val();
-            var socketUrl="http://localhost:9218/imserver/"+$("#userId").val();
-            socketUrl=socketUrl.replace("https","ws").replace("http","ws");
-            console.log(socketUrl);
-            if(socket!=null){
-                socket.close();
-                socket=null;
-            }
-            socket = new WebSocket(socketUrl);
-            //打开事件
-            socket.onopen = function() {
-                console.log("websocket已打开");
-                //socket.send("这是来自客户端的消息" + location.href + new Date());
-            };
-            //获得消息事件
-            socket.onmessage = function(msg) {
-                console.log(msg.data);
-                alert(msg);
-                alert(msg.data);
-                //发现消息进入    开始处理前端触发逻辑
-            };
-            //关闭事件
-            socket.onclose = function() {
-                console.log("websocket已关闭");
-            };
-            //发生了错误事件
-            socket.onerror = function() {
-                console.log("websocket发生了错误");
-            }
-        }
-    }
-    function sendMessage() {
-        if(typeof(WebSocket) == "undefined") {
-            console.log("您的浏览器不支持WebSocket");
-        }else {
-            console.log("您的浏览器支持WebSocket");
-            console.log('{"toUserId":"'+$("#toUserId").val()+'","contentText":"'+$("#contentText").val()+'"}');
-            socket.send('{"toUserId":"'+$("#toUserId").val()+'","contentText":"'+$("#contentText").val()+'"}');
-        }
-    }
-</script>
-<body>
-    <p>【userId】:<div><input id="userId" name="userId" type="text" value="10"></div>
-    <p>【toUserId】:<div><input id="toUserId" name="toUserId" type="text" value="20"></div>
-    <p>【toUserId】:<div><input id="contentText" name="contentText" type="text" value="hello websocket"></div>
-    <p>【操作】:<div><button onclick="openSocket()">开启socket</button></div>
-    <p>【操作】:<div><button onclick="sendMessage()">发送消息</button></div>
-</body>
-</html>