Jelajahi Sumber

chore(pom): 更新项目依赖配置和模块结构

- 修改多个服务的 groupId 从 org.example 到 com.zksy
- 交换 zk-api-service 和 zksy-system 的依赖版本配置
- 在 pom.xml 中新增 radar-service、audio-service、water-level-service 模块
- 更新 mybatis-plus 版本从 3.5.6 到 3.5.5
- 更新 pagehelper.boot 版本从 1.4.7 到 2.1.0
- 添加 knife4j-openapi2-spring-boot-starter 依赖
- 添加 commons-io 和 springfox-boot-starter 依赖
- 为多个服务添加 spring-boot-maven-plugin 配置
- 移除 swagger 依赖的排除配置
- 为监控控制器添加 Swagger 注解支持
- 配置 zk-api-service 的 executable classifier
林仔 1 bulan lalu
induk
melakukan
33cd92094c

+ 8 - 5
environment-service/pom.xml

@@ -7,7 +7,8 @@
         <artifactId>pipe-ner-server</artifactId>
         <version>1.0.0</version>
     </parent>
-    <groupId>org.example</groupId>
+
+    <groupId>com.zksy</groupId>
     <artifactId>environment-service</artifactId>
 
     <properties>
@@ -25,14 +26,15 @@
         </dependency>
         <dependency>
             <groupId>com.zksy</groupId>
-            <artifactId>zk-api-service</artifactId>
-            <version>1.0.0</version>
+            <artifactId>zksy-system</artifactId>
+            <version>3.9.0</version>
         </dependency>
         <dependency>
             <groupId>com.zksy</groupId>
-            <artifactId>zksy-system</artifactId>
-            <version>3.9.0</version>
+            <artifactId>zk-api-service</artifactId>
+            <version>1.0.0</version>
         </dependency>
+
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
@@ -57,6 +59,7 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-loadbalancer</artifactId>
         </dependency>
+
         <!--统一配置管理-->
         <dependency>
             <groupId>com.alibaba.cloud</groupId>

+ 1 - 1
firefighting-pressure-service/pom.xml

@@ -8,7 +8,7 @@
         <artifactId>pipe-ner-server</artifactId>
         <version>1.0.0</version>
     </parent>
-    <groupId>org.example</groupId>
+    <groupId>com.zksy</groupId>
     <artifactId>firefighting-pressure-service</artifactId>
     <version>1.0-SNAPSHOT</version>
 

+ 13 - 4
flammable-gas-service/pom.xml

@@ -26,13 +26,13 @@
         </dependency>
         <dependency>
             <groupId>com.zksy</groupId>
-            <artifactId>zk-api-service</artifactId>
-            <version>1.0.0</version>
+            <artifactId>zksy-system</artifactId>
+            <version>3.9.0</version>
         </dependency>
         <dependency>
             <groupId>com.zksy</groupId>
-            <artifactId>zksy-system</artifactId>
-            <version>3.9.0</version>
+            <artifactId>zk-api-service</artifactId>
+            <version>1.0.0</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -84,4 +84,13 @@
             <artifactId>spring-boot-starter-websocket</artifactId>
         </dependency>
     </dependencies>
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 8 - 4
manhole-service/pom.xml

@@ -16,17 +16,21 @@
     </properties>
 
     <dependencies>
-        <!--common-->
         <dependency>
             <groupId>com.zksy</groupId>
-            <artifactId>zk-common</artifactId>
-            <version>1.0.0</version>
+            <artifactId>zksy-common</artifactId>
+            <version>3.9.0</version>
         </dependency>
         <dependency>
             <groupId>com.zksy</groupId>
-            <artifactId>zksy-common</artifactId>
+            <artifactId>zksy-system</artifactId>
             <version>3.9.0</version>
         </dependency>
+        <dependency>
+            <groupId>com.zksy</groupId>
+            <artifactId>zk-api-service</artifactId>
+            <version>1.0.0</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>

+ 6 - 6
pipe-network-service/pom.xml

@@ -29,7 +29,7 @@
         <bitwalker.version>1.21</bitwalker.version>
         <swagger.version>3.0.0</swagger.version>
         <kaptcha.version>2.3.3</kaptcha.version>
-        <pagehelper.boot.version>1.4.7</pagehelper.boot.version>
+        <pagehelper.boot.version>2.1.0</pagehelper.boot.version>
         <fastjson.version>2.0.57</fastjson.version>
         <oshi.version>6.8.2</oshi.version>
         <commons.io.version>2.19.0</commons.io.version>
@@ -41,7 +41,7 @@
         <logback.version>1.2.13</logback.version>
         <spring-security.version>5.7.12</spring-security.version>
         <spring-framework.version>5.3.39</spring-framework.version>
-        <mybatis-plus.version>3.5.6</mybatis-plus.version>
+        <mybatis-plus.version>3.5.5</mybatis-plus.version>
     </properties>
 
     <!-- 依赖声明 -->
@@ -136,17 +136,17 @@
             </dependency>
 
             <!-- Swagger3依赖 -->
-            <dependency>
+            <!--<dependency>
                 <groupId>io.springfox</groupId>
                 <artifactId>springfox-boot-starter</artifactId>
                 <version>${swagger.version}</version>
-                <exclusions>
+                &lt;!&ndash;<exclusions>
                     <exclusion>
                         <groupId>io.swagger</groupId>
                         <artifactId>swagger-models</artifactId>
                     </exclusion>
-                </exclusions>
-            </dependency>
+                </exclusions>&ndash;&gt;
+            </dependency>-->
 
             <!-- io常用工具类 -->
             <dependency>

+ 1 - 0
pipe-network-service/zksy-admin/pom.xml

@@ -118,6 +118,7 @@
             <artifactId>simpleclient_common</artifactId>
             <version>0.12.0</version>
         </dependency>
+
     </dependencies>
 
     <build>

+ 9 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/monitor/SysLogininforController.java

@@ -2,6 +2,9 @@ package com.zksy.web.controller.monitor;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.DeleteMapping;
@@ -27,6 +30,7 @@ import com.zksy.system.service.ISysLogininforService;
  */
 @RestController
 @RequestMapping("/monitor/logininfor")
+@Api("登录日志")
 public class SysLogininforController extends BaseController
 {
     @Autowired
@@ -37,6 +41,7 @@ public class SysLogininforController extends BaseController
 
     @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
     @GetMapping("/list")
+    @ApiOperation("登录日志列表")
     public TableDataInfo list(SysLogininfor logininfor)
     {
         startPage();
@@ -47,6 +52,7 @@ public class SysLogininforController extends BaseController
     @Log(title = "登录日志", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
     @PostMapping("/export")
+    @ApiOperation("登录日志导出")
     public void export(HttpServletResponse response, SysLogininfor logininfor)
     {
         List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
@@ -57,6 +63,7 @@ public class SysLogininforController extends BaseController
     @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
     @Log(title = "登录日志", businessType = BusinessType.DELETE)
     @DeleteMapping("/{infoIds}")
+    @ApiOperation("登录日志删除")
     public AjaxResult remove(@PathVariable Long[] infoIds)
     {
         return toAjax(logininforService.deleteLogininforByIds(infoIds));
@@ -65,6 +72,7 @@ public class SysLogininforController extends BaseController
     @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
     @Log(title = "登录日志", businessType = BusinessType.CLEAN)
     @DeleteMapping("/clean")
+    @ApiOperation("登录日志删除")
     public AjaxResult clean()
     {
         logininforService.cleanLogininfor();
@@ -74,6 +82,7 @@ public class SysLogininforController extends BaseController
     @PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')")
     @Log(title = "账户解锁", businessType = BusinessType.OTHER)
     @GetMapping("/unlock/{userName}")
+    @ApiOperation("账户解锁")
     public AjaxResult unlock(@PathVariable("userName") String userName)
     {
         passwordService.clearLoginRecordCache(userName);

+ 8 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/monitor/SysOperlogController.java

@@ -2,6 +2,9 @@ package com.zksy.web.controller.monitor;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.DeleteMapping;
@@ -26,6 +29,7 @@ import com.zksy.system.service.ISysOperLogService;
  */
 @RestController
 @RequestMapping("/monitor/operlog")
+@Api(description = "操作日志")
 public class SysOperlogController extends BaseController
 {
     @Autowired
@@ -33,6 +37,7 @@ public class SysOperlogController extends BaseController
 
     @PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
     @GetMapping("/list")
+    @ApiOperation(value = "操作日志列表")
     public TableDataInfo list(SysOperLog operLog)
     {
         startPage();
@@ -43,6 +48,7 @@ public class SysOperlogController extends BaseController
     @Log(title = "操作日志", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
     @PostMapping("/export")
+    @ApiOperation(value = "操作日志导出")
     public void export(HttpServletResponse response, SysOperLog operLog)
     {
         List<SysOperLog> list = operLogService.selectOperLogList(operLog);
@@ -53,6 +59,7 @@ public class SysOperlogController extends BaseController
     @Log(title = "操作日志", businessType = BusinessType.DELETE)
     @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
     @DeleteMapping("/{operIds}")
+    @ApiOperation(value = "操作日志删除")
     public AjaxResult remove(@PathVariable Long[] operIds)
     {
         return toAjax(operLogService.deleteOperLogByIds(operIds));
@@ -61,6 +68,7 @@ public class SysOperlogController extends BaseController
     @Log(title = "操作日志", businessType = BusinessType.CLEAN)
     @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
     @DeleteMapping("/clean")
+    @ApiOperation(value = "操作日志清空")
     public AjaxResult clean()
     {
         operLogService.cleanOperLog();

+ 6 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/monitor/SysUserOnlineController.java

@@ -4,6 +4,9 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.DeleteMapping;
@@ -30,6 +33,7 @@ import com.zksy.system.service.ISysUserOnlineService;
  */
 @RestController
 @RequestMapping("/monitor/online")
+@Api("在线用户监控")
 public class SysUserOnlineController extends BaseController
 {
     @Autowired
@@ -40,6 +44,7 @@ public class SysUserOnlineController extends BaseController
 
     @PreAuthorize("@ss.hasPermi('monitor:online:list')")
     @GetMapping("/list")
+    @ApiOperation(value = "在线用户列表")
     public TableDataInfo list(String ipaddr, String userName)
     {
         Collection<String> keys = redisCache.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
@@ -75,6 +80,7 @@ public class SysUserOnlineController extends BaseController
     @PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
     @Log(title = "在线用户", businessType = BusinessType.FORCE)
     @DeleteMapping("/{tokenId}")
+    @ApiOperation(value = "强退用户")
     public AjaxResult forceLogout(@PathVariable String tokenId)
     {
         redisCache.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId);

+ 6 - 0
pipe-network-service/zksy-common/pom.xml

@@ -119,6 +119,12 @@
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
+            <version>4.1.0</version>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 4 - 0
pipe-network-service/zksy-system/pom.xml

@@ -31,6 +31,10 @@
             <groupId>com.baomidou</groupId>
             <artifactId>mybatis-plus-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 16 - 1
pom.xml

@@ -18,6 +18,9 @@
         <module>firefighting-pressure-service</module>
         <module>flammable-gas-service</module>
         <module>telemetry-service</module>
+        <module>radar-service</module>
+        <module>audio-service</module>
+        <module>water-level-service</module>
     </modules>
     <parent>
         <groupId>org.springframework.boot</groupId>
@@ -44,6 +47,8 @@
         <netty.version>4.1.75.Final</netty.version>
         <redisson.version>3.13.6</redisson.version>
         <knife4j.version>4.1.0</knife4j.version>
+        <commons.io.version>2.19.0</commons.io.version>
+        <swagger.version>3.0.0</swagger.version>
     </properties>
 
     <dependencyManagement>
@@ -74,7 +79,7 @@
             <dependency>
                 <groupId>com.baomidou</groupId>
                 <artifactId>mybatis-plus-boot-starter</artifactId>
-                <version>3.4.3</version>
+                <version>3.5.5</version>
             </dependency>
             <!--hutool工具包-->
             <dependency>
@@ -125,6 +130,16 @@
                 <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
                 <version>${knife4j.version}</version>
             </dependency>
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>${commons.io.version}</version>
+            </dependency>
+            <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+            <version>${swagger.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

+ 19 - 0
telemetry-service/pom.xml

@@ -24,6 +24,16 @@
             <artifactId>zk-common</artifactId>
             <version>1.0.0</version>
         </dependency>
+        <dependency>
+            <groupId>com.zksy</groupId>
+            <artifactId>zk-api-service</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.zksy</groupId>
+            <artifactId>zksy-system</artifactId>
+            <version>3.9.0</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
@@ -69,4 +79,13 @@
             <artifactId>netty-all</artifactId>
         </dependency>
     </dependencies>
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 3 - 1
zk-api-service/pom.xml

@@ -91,11 +91,13 @@
     </dependencies>
 
     <build>
-        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <classifier>exec</classifier>
+                </configuration>
             </plugin>
         </plugins>
     </build>