Browse Source

Merge branch 'server-165' into fu-dev

fuyuchuan 3 weeks ago
parent
commit
dbbebf5ad0
65 changed files with 1076 additions and 693 deletions
  1. 5 0
      pom.xml
  2. 16 15
      service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/job/patrolAgbox.java
  3. 6 1
      service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/mqtt/event/event.java
  4. 1 1
      service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/util/HttpClientUtils.java
  5. 2 3
      service-cockpit/pom.xml
  6. 3 75
      service-cockpit/service-cockpit-biz/pom.xml
  7. 2 28
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/RuoYiSystemApplication.java
  8. 2 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/ServletInitializer.java
  9. 2 4
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/base/BaseController.java
  10. 24 24
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/CorsConfig.java
  11. 15 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/DateStringConvert.java
  12. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/MybatisPlusConfig.java
  13. 15 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/StringDateConverter.java
  14. 3 3
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/V2Config.java
  15. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/domain/AjaxResult.java
  16. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/domain/ResultTable.java
  17. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/domain/Tablepar.java
  18. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/interceptor/Interceptor.java
  19. 22 82
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/interceptor/WebMvcConfig.java
  20. 2 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/MybatisGeneratorUtils.java
  21. 0 87
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/ApiController.java
  22. 22 27
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/FileController.java
  23. 38 41
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/GoviewProjectController.java
  24. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/Indexcontroller.java
  25. 1 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/SysUserController.java
  26. 4 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/GoviewProjectDataMapper.java
  27. 2 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/GoviewProjectMapper.java
  28. 4 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/SysFileMapper.java
  29. 2 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/SysUserMapper.java
  30. 5 5
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/GoviewProject.java
  31. 2 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/GoviewProjectData.java
  32. 2 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/SysFile.java
  33. 2 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/SysUser.java
  34. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/vo/GoviewProjectVo.java
  35. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/vo/SysFileVo.java
  36. 3 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/IGoviewProjectDataService.java
  37. 3 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/IGoviewProjectService.java
  38. 4 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/ISysFileService.java
  39. 3 2
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/ISysUserService.java
  40. 4 6
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/GoviewProjectDataServiceImpl.java
  41. 4 4
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/GoviewProjectServiceImpl.java
  42. 4 4
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/SysFileServiceImpl.java
  43. 4 4
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/SysUserServiceImpl.java
  44. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/ConvertUtil.java
  45. 0 39
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/MybatisPlusGenerator.java
  46. 73 74
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/SaTokenUtil.java
  47. 1 1
      service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/SnowflakeIdWorker.java
  48. 0 16
      service-cockpit/service-cockpit-biz/src/main/resources/application-dev.yml
  49. 0 110
      service-cockpit/service-cockpit-biz/src/main/resources/application.yml
  50. 20 0
      service-ids/pom.xml
  51. 27 0
      service-ids/service-ids-api/pom.xml
  52. 89 0
      service-ids/service-ids-biz/pom.xml
  53. 45 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/RuoYiSystemApplication.java
  54. 109 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/controller/MybatisGeneratorUtils.java
  55. 39 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/controller/web/IdsParkMapController.java
  56. 61 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/domain/IdsParkMap.java
  57. 16 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/mapper/IdsParkMapMapper.java
  58. 24 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/service/IdsParkMapService.java
  59. 44 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/service/impl/IdsParkMapServiceImpl.java
  60. 136 0
      service-ids/service-ids-biz/src/main/java/com/usky/ids/service/util/HttpClientUtils.java
  61. 25 0
      service-ids/service-ids-biz/src/main/resources/bootstrap.yml
  62. 94 0
      service-ids/service-ids-biz/src/main/resources/logback.xml
  63. 16 0
      service-ids/service-ids-biz/src/main/resources/mapper/ids/IdsParkMapMapper.xml
  64. 15 0
      service-ids/service-ids-biz/src/main/resources/smart-doc.json
  65. 0 1
      service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/DmpDeviceInfoServiceImpl.java

+ 5 - 0
pom.xml

@@ -90,6 +90,11 @@
 
     <module>service-oa</module>
 
+    <module>service-cockpit</module>
+
+
+    <module>service-ids</module>
+
   </modules>
           
   

+ 16 - 15
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/job/patrolAgbox.java

@@ -104,23 +104,24 @@ public class patrolAgbox {
         map.put("json", "{\"jsonrpc\":\"2.0\",\"method\":\"addEvent\",\"params\":{\"deviceId\":\""+eventVO.get("deviceId").toString()+"\"," +
                 "\"triggerTime\":\""+eventVO.get("triggerTime").toString()+"\",\"eventCode\":"+eventVO.get("eventCode")+",\"name" +
                 "\":\""+eventVO.get("name").toString()+"\",\"certifiedNo\":\""+eventVO.get("certifiedNo").toString()+"\"}}");
+        System.out.println("FEvent收到消息: " + map.toString());
         String resultString = HttpClientUtils.doPost(list.get(0).getAgboxUrl(),map);
         JSONObject resultVO = JSONObject.parseObject(resultString);
-        LocalDateTime now = LocalDateTime.now();
-//        String host = "127.0.0.1";
-        int port = 5901;
-        String xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>  \n" +
-                "<Agent ID=\"SGT100006088\" Type=\"SG\" Ver=\"1.2.0.0\">\n" +
-                "<DVRHeart State=\"0\" TotalSpace=\"1000\" FreeSpace=\"500\">\n" +
-                "System,smss.exe,csrss.exe\n" +
-                "</DVRHeart>\n" +
-                "<GetTicks/>\n" +
-                "<OperationCmd Type=\"18\" Channel=\"2\" TriggerTime=\""+now+"\" Note=\"5rWL6K+V\" " +
-                "GUID=\"7b726e15-4d45-53e7-f0e0-0abb91156fd7\">\n" +
-                "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABsSFBcUERsXFhceHBsgKEIrKCUlKFE6PTBCYFVlZF9V\n" +
-                "</OperationCmd>\n" +
-                "</Agent>";
-        sendMessage(URL, port, xmlData);
+//        LocalDateTime now = LocalDateTime.now();
+////        String host = "127.0.0.1";
+//        int port = 5901;
+//        String xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>  \n" +
+//                "<Agent ID=\"SGT100006088\" Type=\"SG\" Ver=\"1.2.0.0\">\n" +
+//                "<DVRHeart State=\"0\" TotalSpace=\"1000\" FreeSpace=\"500\">\n" +
+//                "System,smss.exe,csrss.exe\n" +
+//                "</DVRHeart>\n" +
+//                "<GetTicks/>\n" +
+//                "<OperationCmd Type=\"18\" Channel=\"2\" TriggerTime=\""+now+"\" Note=\"5rWL6K+V\" " +
+//                "GUID=\"7b726e15-4d45-53e7-f0e0-0abb91156fd7\">\n" +
+//                "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABsSFBcUERsXFhceHBsgKEIrKCUlKFE6PTBCYFVlZF9V\n" +
+//                "</OperationCmd>\n" +
+//                "</Agent>";
+//        sendMessage(URL, port, xmlData);
         return resultVO;
     }
 

+ 6 - 1
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/mqtt/event/event.java

@@ -35,8 +35,13 @@ public class event implements MqttStrategy {
                 eventVO2.put("deviceId",eventVO1.get("deviceId"));
                 PatrolAgbox.updateHeart(eventVO2.toJSONString());
             }else {
-                if (eventVO1.get("eventType").equals(33)||eventVO1.get("eventType").equals(34)){
+                if (eventVO1.get("eventType").equals(33)||eventVO1.get("eventType").equals(34)||eventVO1.get(
+                        "eventType").equals(9)){
                     eventVO.put("eventCode",5);
+                }else if (eventVO1.get("eventType").equals(8)){
+                    eventVO.put("eventCode",3);
+                }else if (eventVO1.get("eventType").equals(10)){
+                    eventVO.put("eventCode",4);
                 }else {
                     eventVO.put("eventCode",16);
                 }

+ 1 - 1
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/util/HttpClientUtils.java

@@ -77,7 +77,7 @@ public class HttpClientUtils {
         try {
             // 创建Http Post请求
             HttpPost httpPost = new HttpPost(url);
-            httpPost.setHeader("Content-Type", "charset=utf-8");
+            httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");
             // 创建参数列表
             if (param != null) {
                 List<NameValuePair> paramList = new ArrayList<>();

+ 2 - 3
service-cockpit/pom.xml

@@ -8,13 +8,12 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>service-iot</artifactId>
+    <artifactId>service-cockpit</artifactId>
 
     <packaging>pom</packaging>
     <version>0.0.1</version>
 
     <modules>
-        <module>service-iot-biz</module>
-        <module>service-iot-api</module>
+        <module>service-cockpit-biz</module>
     </modules>
 </project>

+ 3 - 75
service-cockpit/service-cockpit-biz/pom.xml

@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>service-iot</artifactId>
+        <artifactId>service-cockpit</artifactId>
         <groupId>com.usky</groupId>
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>service-iot-biz</artifactId>
+    <artifactId>service-cockpit-biz</artifactId>
     <dependencies>
         <dependency>
             <groupId>com.usky</groupId>
@@ -16,14 +16,7 @@
 
         <dependency>
             <groupId>com.usky</groupId>
-            <artifactId>service-backend-api</artifactId>
-            <version>0.0.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.usky</groupId>
-            <artifactId>service-iot-api</artifactId>
-            <version>0.0.1</version>
+            <artifactId>ruoyi-common-core</artifactId>
         </dependency>
 
         <dependency>
@@ -43,71 +36,6 @@
             <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
             <version>1.1.0</version>
         </dependency>
-
-        <!--MQTT依赖-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-integration</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.integration</groupId>
-            <artifactId>spring-integration-mqtt</artifactId>
-        </dependency>
-        <!--websocket依赖-->
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-websocket</artifactId>
-            <version>5.2.8.RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>com.usky</groupId>
-            <artifactId>service-agbox-api</artifactId>
-            <version>0.0.1</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.usky</groupId>
-            <artifactId>service-system-api</artifactId>
-            <version>0.0.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.github.binarywang</groupId>
-            <artifactId>weixin-java-mp</artifactId>
-            <version>4.3.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-amqp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.usky</groupId>
-            <artifactId>service-alarm-api</artifactId>
-            <version>0.0.1</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.usky</groupId>
-            <artifactId>ruoyi-common-core</artifactId>
-        </dependency>
-
-        <!--钉钉-->
-        <!--获取企业accessToken(企业内部应用) 新版SDK-->
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>dingtalk</artifactId>
-            <version>2.1.34</version>
-        </dependency>
-        <!--旧版SDK-->
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>alibaba-dingtalk-service-sdk</artifactId>
-            <version>2.0.0</version>
-        </dependency>
-
     </dependencies>
 
     <build>

+ 2 - 28
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/RuoYiSystemApplication.java

@@ -1,23 +1,11 @@
-package com.usky.iot;
+package com.usky.cockpit;
 
-
-
-import com.usky.iot.constant.constant;
-import io.swagger.annotations.SwaggerDefinition;
-import lombok.val;
-import me.chanjar.weixin.mp.api.WxMpService;
-import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
-import me.chanjar.weixin.mp.config.impl.WxMpMapConfigImpl;
 import org.mybatis.spring.annotation.MapperScan;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.amqp.rabbit.annotation.EnableRabbit;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
 import org.springframework.core.env.Environment;
 
 import java.net.InetAddress;
@@ -30,26 +18,12 @@ import java.net.UnknownHostException;
  */
 
 //@EnableSwagger2
-@EnableFeignClients(basePackages = "com.usky")
-@MapperScan(value = "com.usky.iot.mapper")
-@ComponentScan("com.usky")
+@MapperScan(value = "com.usky.cockpit.mapper")
 @SpringBootApplication
-@EnableRabbit
 public class RuoYiSystemApplication
 {
     private static final Logger LOGGER = LoggerFactory.getLogger(RuoYiSystemApplication.class);
 
-    @Bean
-    public WxMpService wxMpService(){
-        WxMpMapConfigImpl wxMpMapConfig = new WxMpMapConfigImpl();
-        wxMpMapConfig.setAppId(constant.WE_CHAT_APP_ID);
-        wxMpMapConfig.setSecret(constant.WE_CHAT_SECRET);
-        val wxMpService = new WxMpServiceImpl();
-        wxMpService.setWxMpConfigStorage(wxMpMapConfig);
-
-        return wxMpService;
-    }
-
     public static void main(String[] args) throws UnknownHostException {
         ConfigurableApplicationContext application = SpringApplication.run(RuoYiSystemApplication.class, args);
         Environment env = application.getEnvironment();

+ 2 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/ServletInitializer.java

@@ -1,4 +1,4 @@
-package cn.com;
+package com.usky.cockpit;
 
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@@ -7,7 +7,7 @@ public class ServletInitializer extends SpringBootServletInitializer {
 
 	@Override
 	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
-		return application.sources(GogoApplication.class);
+		return application.sources(RuoYiSystemApplication.class);
 	}
 
 }

+ 2 - 4
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/base/BaseController.java

@@ -1,10 +1,8 @@
-package cn.com.v2.common.base;
+package com.usky.cockpit.common.base;
 
+import com.usky.cockpit.common.domain.AjaxResult;
 import org.springframework.web.bind.WebDataBinder;
 import org.springframework.web.bind.annotation.InitBinder;
-
-import cn.com.v2.common.domain.AjaxResult;
-
 import java.beans.PropertyEditorSupport;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;

+ 24 - 24
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/CorsConfig.java

@@ -1,24 +1,24 @@
-package cn.com.v2.common.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-//重写WebMvcConfigurer实现全局跨域配置
-@Configuration
-public class CorsConfig implements WebMvcConfigurer{
-	@Override
-    public void addCorsMappings(CorsRegistry registry) {
-        	registry.addMapping("/**")
-            // 是否发送Cookie
-            .allowCredentials(true)
-            // 放行哪些原始域
-            .allowedOrigins("*")
-            // 放行哪些请求方式
-            .allowedMethods("GET", "POST", "PUT", "DELETE")
-            // 放行哪些原始请求头部信息
-            .allowedHeaders("*")
-            // 暴露哪些头部信息
-            .exposedHeaders("*");
-    }
-}
+//package com.usky.cockpit.common.config;
+//
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.web.servlet.config.annotation.CorsRegistry;
+//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+//
+////重写WebMvcConfigurer实现全局跨域配置
+//@Configuration
+//public class CorsConfig implements WebMvcConfigurer{
+//	@Override
+//    public void addCorsMappings(CorsRegistry registry) {
+//        	registry.addMapping("/**")
+//            // 是否发送Cookie
+//            .allowCredentials(true)
+//            // 放行哪些原始域
+//            .allowedOrigins("*")
+//            // 放行哪些请求方式
+//            .allowedMethods("GET", "POST", "PUT", "DELETE")
+//            // 放行哪些原始请求头部信息
+//            .allowedHeaders("*")
+//            // 暴露哪些头部信息
+//            .exposedHeaders("*");
+//    }
+//}

+ 15 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/DateStringConvert.java

@@ -1,2 +1,16 @@
-package com.usky.cockpit.common.config;public class DateStringConvert {
+package com.usky.cockpit.common.config;
+
+import com.usky.common.core.util.DateUtils;
+import org.springframework.core.convert.converter.Converter;
+
+import java.util.Date;
+
+/**
+ * @author han
+ */
+public class DateStringConvert implements Converter<Date, String> {
+    @Override
+    public String convert(Date source) {
+        return DateUtils.format(source);
+    }
 }

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/MybatisPlusConfig.java

@@ -1,4 +1,4 @@
-package cn.com.v2.common.config;
+package com.usky.cockpit.common.config;
 
 import com.baomidou.mybatisplus.annotation.DbType;
 import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;

+ 15 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/StringDateConverter.java

@@ -1,2 +1,16 @@
-package com.usky.cockpit.common.config;public class StringDateConverter {
+package com.usky.cockpit.common.config;
+
+import com.usky.common.core.util.DateUtils;
+import org.springframework.core.convert.converter.Converter;
+
+import java.util.Date;
+
+/**
+ * @author yq
+ */
+public class StringDateConverter implements Converter<String, Date> {
+    @Override
+    public Date convert(String source) {
+        return DateUtils.parseDate(source);
+    }
 }

+ 3 - 3
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/config/V2Config.java

@@ -1,7 +1,7 @@
-package cn.com.v2.common.config;
+package com.usky.cockpit.common.config;
 
 import java.util.Map;
-import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
 import org.springframework.stereotype.Component;
 
 /**
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
  * @author fuce
  */
 @Component
-@ConfigurationProperties(prefix = "v2")
+@Configuration
 public class V2Config {
 
 	/**

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/domain/AjaxResult.java

@@ -1,4 +1,4 @@
-package cn.com.v2.common.domain;
+package com.usky.cockpit.common.domain;
 
 import java.util.HashMap;
 

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/domain/ResultTable.java

@@ -1,4 +1,4 @@
-package cn.com.v2.common.domain;
+package com.usky.cockpit.common.domain;
 
 public class ResultTable {
      /**

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/domain/Tablepar.java

@@ -1,4 +1,4 @@
-package cn.com.v2.common.domain;
+package com.usky.cockpit.common.domain;
 
 /**
  * boostrap table post 参数

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/interceptor/Interceptor.java

@@ -1,4 +1,4 @@
-package cn.com.v2.common.interceptor;
+package com.usky.cockpit.common.interceptor;
 
 import org.springframework.web.servlet.HandlerInterceptor;
 import javax.servlet.http.HttpServletRequest;

+ 22 - 82
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/common/interceptor/WebMvcConfig.java

@@ -1,91 +1,31 @@
-package cn.com.v2.common.interceptor;
+package com.usky.cockpit.common.interceptor;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.usky.cockpit.common.config.DateStringConvert;
+import com.usky.cockpit.common.config.StringDateConverter;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
-
-import cn.com.v2.common.config.V2Config;
-import cn.hutool.core.util.ArrayUtil;
+import org.springframework.format.FormatterRegistry;
+import org.springframework.format.support.FormattingConversionService;
+import org.springframework.http.converter.ObjectToStringHttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
+/**
+ * @author han
+ */
 @Configuration
-public class WebMvcConfig extends WebMvcConfigurationSupport {
- 
-	@Autowired
-	private V2Config v2Config;
-    @Override
-    public void addResourceHandlers(ResourceHandlerRegistry registry) {
-        registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
-        registry.addResourceHandler("error.html").addResourceLocations("classpath:/META-INF/resources/static/error.html");
-        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
-        
-        List<String> list1=new ArrayList<String>();
-        List<String> list2=new ArrayList<String>();
-        
-        Map<String, String> map= v2Config.getXnljmap();
-        
-        Set<String> set = map.keySet();
-        for (String o : set) {
-            list1.add("/"+o+"/**");
-            list2.add(map.get(o));
-        }
-    	registry.addResourceHandler(ArrayUtil.toArray(list1, String.class)).addResourceLocations(ArrayUtil.toArray(list2, String.class));
-    }
-    
+public class WebMvcConfig implements WebMvcConfigurer {
 
-    /**
-     * 重写addCorsMappings()解决跨域问题
-     * 配置:允许http请求进行跨域访问
-     *
-     * @param registry
-     */
     @Override
-    public void addCorsMappings(CorsRegistry registry) {
-    	
-    	// 设置允许多个域名请求
-        //String[] allowDomains = {"http://www.toheart.xin","http://192.168.11.213:8080","http://localhost:8080"};
-    	
-        //指哪些接口URL需要增加跨域设置
-        registry.addMapping("/**")
-                //.allowedOrigins("*")//指的是前端哪些域名被允许跨域
-                .allowedOriginPatterns("*")
-                //需要带cookie等凭证时,设置为true,就会把cookie的相关信息带上
-                .allowCredentials(true)
-                //指的是允许哪些方法
-                .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS")
-                //cookie的失效时间,单位为秒(s),若设置为-1,则关闭浏览器就失效
-                .maxAge(3600);
+    public void addFormatters(FormatterRegistry registry) {
+        registry.addConverter(new StringDateConverter());
     }
-    
-    /**
-     * 重写addInterceptors()实现拦截器
-     * 配置:要拦截的路径以及不拦截的路径
-     *
-     * @param registry
-     */
-    @Override
-    public void addInterceptors(InterceptorRegistry registry) {
-        //注册Interceptor拦截器(Interceptor这个类是我们自己写的拦截器类)
-        InterceptorRegistration registration = registry.addInterceptor(new Interceptor());
-        //addPathPatterns()方法添加需要拦截的路径
-        //所有路径都被拦截
-        registration.addPathPatterns("/**");
-        //excludePathPatterns()方法添加不拦截的路径
-        
-        
-        String[] excludePatterns = new String[]{"/error","/error.html","/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**",
-                "/api", "/api-docs", "/api-docs/**", "/doc.html/**",
-                "/api/file/*"};
-        
-        //添加不拦截路径
-        registration.excludePathPatterns(excludePatterns);
+
+    @Bean
+    public ObjectToStringHttpMessageConverter objectToStringHttpMessageConverter() {
+        FormattingConversionService conversionService = new FormattingConversionService();
+        conversionService.addConverter(new StringDateConverter());
+        conversionService.addConverter(new DateStringConvert());
+        ObjectToStringHttpMessageConverter httpMessageconverter = new ObjectToStringHttpMessageConverter(conversionService);
+        return httpMessageconverter;
     }
- 
 }

+ 2 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/MybatisGeneratorUtils.java

@@ -1,4 +1,5 @@
-package com.usky.iot.controller;//package com.usky.iot.controller;//package com.usky.dm.controller.web.business;//package com.usky.dm.controller.web;
+package com.usky.cockpit.controller;//package com.usky.iot.controller;//package com.usky.dm.controller.web.business;
+// package com.usky.dm.controller.web;
 
 
 import com.baomidou.mybatisplus.core.toolkit.StringPool;

+ 0 - 87
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/ApiController.java

@@ -1,87 +0,0 @@
-package cn.com.v2.controller;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-
-import cn.com.v2.common.base.BaseController;
-import cn.com.v2.common.domain.AjaxResult;
-import cn.com.v2.model.SysUser;
-import cn.com.v2.service.ISysUserService;
-import cn.com.v2.util.SaTokenUtil;
-import cn.dev33.satoken.stp.StpUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.crypto.SecureUtil;
-import io.swagger.annotations.ApiOperation;
-
-@RestController
-@RequestMapping("/api/goview/sys")
-public class ApiController  extends BaseController {
-	@Autowired
-	private ISysUserService iSysUserService;
-
-	@ApiOperation(value = "登陆", notes = "登陆")
-	@PostMapping("/login")
-	@ResponseBody
-	public AjaxResult APIlogin(@RequestBody SysUser user, HttpServletRequest request) {
-
-		// 判断是否登陆
-		if (StpUtil.isLogin()) {
-
-			Map<String, Object> map = new HashMap<String, Object>();
-			map.put("userinfo", SaTokenUtil.getUser());
-			map.put("token", StpUtil.getTokenInfo());
-			return success().put("data", map);
-		} else {
-			if (StrUtil.isNotBlank(user.getUsername()) && StrUtil.isNotBlank(user.getPassword())) {
-				SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, user.getUsername()).eq(SysUser::getPassword, SecureUtil.md5(user.getPassword())).last("LIMIT 1"));
-				if (sysUser != null) {
-					StpUtil.login(sysUser.getId());
-					SaTokenUtil.setUser(sysUser);
-					Map<String, Object> map = new HashMap<String, Object>();
-					map.put("userinfo", sysUser);
-					map.put("token", StpUtil.getTokenInfo());
-
-					return success().put("data", map);
-				} else {
-					return error(500, "账户或者密码错误");
-				}
-			} else {
-				return error(500, "账户密码不能为空");
-			}
-		}
-
-	}
-	
-	
-	@ApiOperation(value = "登陆", notes = "登陆")
-	@GetMapping("/logout")
-	@ResponseBody
-	public AjaxResult logout() {
-
-		// 判断是否登陆
-		StpUtil.logout();
-
-		return success();
-
-	}
-	
-	
-	@ApiOperation(value = "获取oss地址", notes = "获取oss地址")
-	@GetMapping("/getOssInfo")
-	@ResponseBody
-	public AjaxResult getOssInfo() {
-
-		return success();
-
-	}
-
-}

+ 22 - 27
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/FileController.java

@@ -1,4 +1,4 @@
-package cn.com.v2.controller;
+package com.usky.cockpit.controller.web;
 
 import java.io.File;
 import java.io.IOException;
@@ -9,22 +9,22 @@ import java.util.Date;
 import java.util.Map;
 import java.util.Map.Entry;
 import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
+
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.usky.cockpit.model.SysFile;
+import com.usky.cockpit.model.vo.SysFileVo;
+import com.usky.cockpit.service.ISysFileService;
+import com.usky.cockpit.util.SnowflakeIdWorker;
+import com.usky.common.core.web.domain.AjaxResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-import cn.com.v2.common.base.BaseController;
-import cn.com.v2.common.config.V2Config;
-import cn.com.v2.common.domain.AjaxResult;
-import cn.com.v2.model.SysFile;
-import cn.com.v2.model.vo.SysFileVo;
-import cn.com.v2.service.ISysFileService;
-import cn.com.v2.util.SnowflakeIdWorker;
+import com.usky.cockpit.common.config.V2Config;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.codec.Base64;
 import cn.hutool.core.date.DateUtil;
@@ -41,7 +41,7 @@ import cn.hutool.core.util.StrUtil;
 @RestController
 @RequestMapping("/api/file")
 @Slf4j
-public class FileController extends BaseController{
+public class FileController{
 
 
 	@Autowired
@@ -59,9 +59,9 @@ public class FileController extends BaseController{
 	public AjaxResult remove(String ids){
 		Boolean b=iSysFileService.removeByIds(StrUtil.split(ids, ',',-1));
 		if(b){
-			return success();
+			return AjaxResult.success();
 		}else{
-			return error();
+			return AjaxResult.error();
 		}
 	}
 	
@@ -73,16 +73,15 @@ public class FileController extends BaseController{
 		if(sysFile!=null){
 			String fileurl=sysFile.getAbsolutePath()+sysFile.getRelativePath()+File.separator+sysFile.getFileName();
 			object.transferTo(new File(fileurl));
-			return success("修改成功");
+			return AjaxResult.success("修改成功");
 		}else{
-			return error();
+			return AjaxResult.error();
 		}
 	}
 
 	/**
 	 * 上传文件
 	 * @param object 文件流对象
-	 * @param bucketName 桶名
 	 * @return
 	 * @throws Exception
 	 */
@@ -98,7 +97,7 @@ public class FileController extends BaseController{
 		if(fileName.lastIndexOf(".")!=-1) {//有后缀
 			 suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
 			 //mediaKey=MD5.create().digestHex(fileName);
-			 mediaKey=SnowflakeIdWorker.getUUID();
+			 mediaKey= SnowflakeIdWorker.getUUID();
 			 fileSuffixName=mediaKey+suffixName;
 		}else {//无后缀
 			//取得唯一id
@@ -123,13 +122,12 @@ public class FileController extends BaseController{
 		object.transferTo(desc);
 		SysFileVo sysFileVo=BeanUtil.copyProperties(sysFile, SysFileVo.class);
 		sysFileVo.setFileurl(v2Config.getHttpurl()+sysFile.getVirtualKey()+"/"+sysFile.getRelativePath()+"/"+sysFile.getFileName());
-		return AjaxResult.successData(200, sysFileVo);
+		return AjaxResult.success(sysFileVo);
 	}
 	
 	
 	/**
 	 * Base64字符串转成图片
-	 * @param str
 	 * @throws IOException 
 	 */
 	@PostMapping("/uploadbase64")
@@ -161,7 +159,7 @@ public class FileController extends BaseController{
 			iSysFileService.saveOrUpdate(sysFile);
 			SysFileVo sysFileVo=BeanUtil.copyProperties(sysFile, SysFileVo.class);
 			sysFileVo.setFileurl(v2Config.getHttpurl()+sysFile.getVirtualKey()+"/"+sysFile.getRelativePath()+"/"+sysFile.getFileName());
-			return AjaxResult.successData(200, sysFileVo);
+			return AjaxResult.success(sysFileVo);
 		}
 		return AjaxResult.error();
 		
@@ -172,7 +170,6 @@ public class FileController extends BaseController{
 	 * 定制方法
 	 * 根据关键字与相对路径获取文件内容 
 	 * @param key 访问关键字
-	 * @param rpf 相对路径+文件名字
 	 * @return
 	 */
 	@PostMapping("/getFileText")
@@ -181,7 +178,7 @@ public class FileController extends BaseController{
 		String fileurl=absolutePath+relativePath;
 		try {
 			String text=FileUtil.readUtf8String(fileurl);
-			return AjaxResult.successData(200, text);
+			return AjaxResult.success(text);
 		}catch (IORuntimeException e) {
 			return AjaxResult.error("没有该文件");
 		}
@@ -195,7 +192,6 @@ public class FileController extends BaseController{
 	 * 定制方法
 	 * 根据关键字与相对路径获取文件内容 
 	 * @param key 访问关键字
-	 * @param rpf 相对路径+文件名字
 	 * @return
 	 * @throws IOException 
 	 */
@@ -212,7 +208,6 @@ public class FileController extends BaseController{
 	/**
 	 * 覆盖上传文件 key与指定路径
 	 * @param object 文件流对象
-	 * @param bucketName 桶名
 	 * @return
 	 * @throws Exception
 	 */
@@ -252,7 +247,7 @@ public class FileController extends BaseController{
 		object.transferTo(desc);
 		SysFileVo sysFileVo=BeanUtil.copyProperties(sysFile, SysFileVo.class);
 		sysFileVo.setFileurl(v2Config.getHttpurl()+sysFile.getVirtualKey()+"/"+sysFile.getRelativePath()+"/"+sysFile.getFileName());
-		return AjaxResult.successData(200, sysFileVo);
+		return AjaxResult.success(sysFileVo);
 	}
 	
 	
@@ -270,7 +265,7 @@ public class FileController extends BaseController{
 		if(sysFile!=null){
 			SysFileVo sysFileVo=BeanUtil.copyProperties(sysFile, SysFileVo.class);
 			sysFileVo.setFileurl(v2Config.getHttpurl()+sysFile.getVirtualKey()+"/"+sysFile.getRelativePath()+"/"+sysFile.getFileName());
-			return AjaxResult.successData(200, sysFileVo);
+			return AjaxResult.success(sysFileVo);
 		}
 		return AjaxResult.error("没有该文件");
 		

+ 38 - 41
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/GoviewProjectController.java

@@ -1,5 +1,20 @@
-package cn.com.v2.controller;
+package com.usky.cockpit.controller.web;
 
+import com.usky.cockpit.common.config.V2Config;
+import com.usky.cockpit.common.domain.ResultTable;
+import com.usky.cockpit.common.domain.Tablepar;
+import com.usky.cockpit.controller.web.FileController;
+import com.usky.cockpit.model.GoviewProject;
+import com.usky.cockpit.model.GoviewProjectData;
+import com.usky.cockpit.model.SysFile;
+import com.usky.cockpit.model.vo.GoviewProjectVo;
+import com.usky.cockpit.model.vo.SysFileVo;
+import com.usky.cockpit.service.IGoviewProjectDataService;
+import com.usky.cockpit.service.IGoviewProjectService;
+import com.usky.cockpit.service.ISysFileService;
+import com.usky.cockpit.util.ConvertUtil;
+import com.usky.cockpit.util.SnowflakeIdWorker;
+import com.usky.common.core.web.domain.AjaxResult;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -13,22 +28,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import cn.com.v2.common.base.BaseController;
-import cn.com.v2.common.config.V2Config;
-import cn.com.v2.common.domain.AjaxResult;
-import cn.com.v2.common.domain.ResultTable;
-import cn.com.v2.common.domain.Tablepar;
-import cn.com.v2.model.GoviewProject;
-import cn.com.v2.model.GoviewProjectData;
-import cn.com.v2.model.SysFile;
-import cn.com.v2.model.vo.GoviewProjectVo;
-import cn.com.v2.model.vo.SysFileVo;
-import cn.com.v2.service.IGoviewProjectDataService;
-import cn.com.v2.service.IGoviewProjectService;
-import cn.com.v2.service.ISysFileService;
-import cn.com.v2.util.ConvertUtil;
-import cn.com.v2.util.SnowflakeIdWorker;
-import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateUtil;
 import io.swagger.annotations.ApiOperation;
@@ -51,7 +50,7 @@ import org.springframework.ui.ModelMap;
  */
 @RestController
 @RequestMapping("/api/goview/project")
-public class GoviewProjectController  extends BaseController{
+public class GoviewProjectController{
 	@Autowired
 	private ISysFileService iSysFileService;
 	@Autowired
@@ -61,8 +60,7 @@ public class GoviewProjectController  extends BaseController{
 	@Autowired
 	private IGoviewProjectDataService iGoviewProjectDataService;
 	
-	
-	@ApiOperation(value = "分页跳转", notes = "分页跳转")
+
 	@GetMapping("/list")
 	@ResponseBody
 	public ResultTable list(Tablepar tablepar){
@@ -91,9 +89,9 @@ public class GoviewProjectController  extends BaseController{
 		goviewProject.setState(-1);
 		boolean b=iGoviewProjectService.save(goviewProject);
 		if(b){
-			return successData(200, goviewProject).put("msg", "创建成功");
+			return AjaxResult.success("创建成功");
 		}else{
-			return error();
+			return AjaxResult.error();
 		}
 	}
 	
@@ -108,12 +106,12 @@ public class GoviewProjectController  extends BaseController{
 	@DeleteMapping("/delete")
 	@ResponseBody
 	public AjaxResult remove(String ids){
-		List<String> lista=ConvertUtil.toListStrArray(ids);
+		List<String> lista= ConvertUtil.toListStrArray(ids);
 		Boolean b=iGoviewProjectService.removeByIds(lista);
 		if(b){
-			return success();
+			return AjaxResult.success();
 		}else{
-			return error();
+			return AjaxResult.error();
 		}
 	}
 	
@@ -124,9 +122,9 @@ public class GoviewProjectController  extends BaseController{
     {
 		Boolean b= iGoviewProjectService.updateById(goviewProject);
         if(b){
-        	return success();
+        	return AjaxResult.success();
         }
-        return error();
+        return AjaxResult.error();
     }
 	
 	
@@ -141,9 +139,9 @@ public class GoviewProjectController  extends BaseController{
 		updateWrapper.set(GoviewProject::getProjectName, goviewProject.getProjectName());
 		Boolean b=iGoviewProjectService.update(updateWrapper);
 		if(b){
-        	return success();
+        	return AjaxResult.success();
         }
-		return error();
+		return AjaxResult.error();
     }
 	
 	
@@ -158,11 +156,11 @@ public class GoviewProjectController  extends BaseController{
     		updateWrapper.set(GoviewProject::getState, goviewProject.getState());
     		Boolean b=iGoviewProjectService.update(updateWrapper);
     		if(b){
-            	return success();
+            	return AjaxResult.success();
             }
-    		return error();
+    		return AjaxResult.error();
     	}
-    	return error("警告非法字段");
+    	return AjaxResult.error("警告非法字段");
 	}
 	
     
@@ -178,9 +176,9 @@ public class GoviewProjectController  extends BaseController{
 			GoviewProjectVo goviewProjectVo=new GoviewProjectVo();
 			BeanUtils.copyProperties(goviewProject,goviewProjectVo);
 			goviewProjectVo.setContent(blogText.getContent());
-			return AjaxResult.successData(200,goviewProjectVo).put("msg","获取成功");
+			return AjaxResult.success("获取成功");
 		}
-		return AjaxResult.successData(200, null).put("msg","无数据");
+		return AjaxResult.success("无数据");
         
     }
 	
@@ -193,23 +191,22 @@ public class GoviewProjectController  extends BaseController{
 		
 		GoviewProject goviewProject= iGoviewProjectService.getById(data.getProjectId());
 		if(goviewProject==null) {
-			return error("没有该项目ID");
+			return AjaxResult.error("没有该项目ID");
 		}
 		GoviewProjectData goviewProjectData= iGoviewProjectDataService.getOne(new LambdaQueryWrapper<GoviewProjectData>().eq(GoviewProjectData::getProjectId, goviewProject.getId()));
 		if(goviewProjectData!=null) {
 			 data.setId(goviewProjectData.getId());
 			 iGoviewProjectDataService.updateById(data);
-			 return success("数据保存成功");
+			 return AjaxResult.success("数据保存成功");
 		}else {
 			iGoviewProjectDataService.save(data);
-			return success("数据保存成功");
+			return AjaxResult.success("数据保存成功");
 		}
 	}
 	
 	/**
 	 * 上传文件
 	 * @param object 文件流对象
-	 * @param bucketName 桶名
 	 * @return
 	 * @throws Exception
 	 */
@@ -225,7 +222,7 @@ public class GoviewProjectController  extends BaseController{
 		if(fileName.lastIndexOf(".")!=-1) {//有后缀
 			 suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
 			 //mediaKey=MD5.create().digestHex(fileName);
-			 mediaKey=SnowflakeIdWorker.getUUID();
+			 mediaKey= SnowflakeIdWorker.getUUID();
 			 fileSuffixName=mediaKey+suffixName;
 		}else {//无后缀
 			//取得唯一id
@@ -233,7 +230,7 @@ public class GoviewProjectController  extends BaseController{
 			mediaKey=SnowflakeIdWorker.getUUID();
 			//fileSuffixName=mediaKey+suffixName;
 		}
-		String virtualKey=FileController.getFirstNotNull(v2Config.getXnljmap());
+		String virtualKey= FileController.getFirstNotNull(v2Config.getXnljmap());
 		String absolutePath=v2Config.getXnljmap().get(FileController.getFirstNotNull(v2Config.getXnljmap()));
 		SysFile sysFile=new SysFile();
 		sysFile.setId(SnowflakeIdWorker.getUUID());
@@ -250,7 +247,7 @@ public class GoviewProjectController  extends BaseController{
 		object.transferTo(desc);
 		SysFileVo sysFileVo=BeanUtil.copyProperties(sysFile, SysFileVo.class);
 		sysFileVo.setFileurl(v2Config.getHttpurl()+sysFile.getVirtualKey()+"/"+sysFile.getRelativePath()+"/"+sysFile.getFileName());
-		return successData(200, sysFileVo);
+		return AjaxResult.success(sysFileVo);
 	}
 	
 

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/Indexcontroller.java

@@ -1,4 +1,4 @@
-package cn.com.v2.controller;
+package com.usky.cockpit.controller.web;
 
 import java.io.IOException;
 import java.io.PrintWriter;

+ 1 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/controller/web/SysUserController.java

@@ -1,9 +1,8 @@
-package cn.com.v2.controller;
+package com.usky.cockpit.controller.web;
 
 
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.stereotype.Controller;
 
 /**
  * <p>

+ 4 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/GoviewProjectDataMapper.java

@@ -1,7 +1,8 @@
-package cn.com.v2.mapper;
+package com.usky.cockpit.mapper;
 
-import cn.com.v2.model.GoviewProjectData;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.usky.cockpit.model.GoviewProjectData;
+import org.springframework.stereotype.Repository;
 
 /**
  * <p>
@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @author fc
  * @since 2023-04-30
  */
+@Repository
 public interface GoviewProjectDataMapper extends BaseMapper<GoviewProjectData> {
 
 }

+ 2 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/GoviewProjectMapper.java

@@ -1,7 +1,7 @@
-package cn.com.v2.mapper;
+package com.usky.cockpit.mapper;
 
-import cn.com.v2.model.GoviewProject;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.usky.cockpit.model.GoviewProject;
 
 /**
  * <p>

+ 4 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/SysFileMapper.java

@@ -1,8 +1,9 @@
-package cn.com.v2.mapper;
+package com.usky.cockpit.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.usky.cockpit.model.SysFile;
+import org.springframework.stereotype.Repository;
 
-import cn.com.v2.model.SysFile;
 
 /**
  * <p>
@@ -12,6 +13,7 @@ import cn.com.v2.model.SysFile;
  * @author fc
  * @since 2022-12-22
  */
+@Repository
 public interface SysFileMapper extends BaseMapper<SysFile> {
 
 }

+ 2 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/mapper/SysUserMapper.java

@@ -1,7 +1,7 @@
-package cn.com.v2.mapper;
+package com.usky.cockpit.mapper;
 
-import cn.com.v2.model.SysUser;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.usky.cockpit.model.SysUser;
 
 /**
  * <p>

+ 5 - 5
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/GoviewProject.java

@@ -1,4 +1,4 @@
-package cn.com.v2.model;
+package com.usky.cockpit.model;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -18,14 +18,14 @@ import java.io.Serializable;
  * @author fc
  * @since 2023-04-30
  */
-@TableName("t_goview_project")
+@TableName("ckpt_project")
 @Data
 public class GoviewProject implements Serializable {
 
     private static final long serialVersionUID = 1L;
-    
-    @TableId(type = IdType.ASSIGN_ID)
-    private String id;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
 
     private String projectName;
 

+ 2 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/GoviewProjectData.java

@@ -1,4 +1,4 @@
-package cn.com.v2.model;
+package com.usky.cockpit.model;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -18,7 +18,7 @@ import java.sql.SQLException;
  * @author fc
  * @since 2023-04-30
  */
-@TableName("t_goview_project_data")
+@TableName("ckpt_project_data")
 @Data
 public class GoviewProjectData implements Serializable {
 

+ 2 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/SysFile.java

@@ -1,4 +1,4 @@
-package cn.com.v2.model;
+package com.usky.cockpit.model;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -15,7 +15,7 @@ import java.io.Serializable;
  * @author fc
  * @since 2022-12-22
  */
-@TableName("t_sys_file")
+@TableName("sys_file")
 public class SysFile implements Serializable {
 
     private static final long serialVersionUID = 1L;

+ 2 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/SysUser.java

@@ -1,4 +1,4 @@
-package cn.com.v2.model;
+package com.usky.cockpit.model;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -16,7 +16,7 @@ import java.io.Serializable;
  * @author fc
  * @since 2023-04-30
  */
-@TableName("t_sys_user")
+@TableName("sys_user")
 @Data
 public class SysUser implements Serializable {
 

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/vo/GoviewProjectVo.java

@@ -1,4 +1,4 @@
-package cn.com.v2.model.vo;
+package com.usky.cockpit.model.vo;
 
 import java.io.Serializable;
 import java.util.Date;

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/model/vo/SysFileVo.java

@@ -1,4 +1,4 @@
-package cn.com.v2.model.vo;
+package com.usky.cockpit.model.vo;
 
 
 public class SysFileVo {

+ 3 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/IGoviewProjectDataService.java

@@ -1,7 +1,8 @@
-package cn.com.v2.service;
+package com.usky.cockpit.service;
 
-import cn.com.v2.model.GoviewProjectData;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.usky.cockpit.model.GoviewProjectData;
+import org.springframework.stereotype.Service;
 
 /**
  * <p>

+ 3 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/IGoviewProjectService.java

@@ -1,7 +1,8 @@
-package cn.com.v2.service;
+package com.usky.cockpit.service;
 
-import cn.com.v2.model.GoviewProject;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.usky.cockpit.model.GoviewProject;
+import org.springframework.stereotype.Service;
 
 /**
  * <p>

+ 4 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/ISysFileService.java

@@ -1,7 +1,9 @@
-package cn.com.v2.service;
+package com.usky.cockpit.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import cn.com.v2.model.SysFile;
+import com.usky.cockpit.model.SysFile;
+import org.springframework.stereotype.Service;
+
 
 /**
  * <p>

+ 3 - 2
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/ISysUserService.java

@@ -1,7 +1,8 @@
-package cn.com.v2.service;
+package com.usky.cockpit.service;
 
-import cn.com.v2.model.SysUser;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.usky.cockpit.model.SysUser;
+import org.springframework.stereotype.Service;
 
 /**
  * <p>

+ 4 - 6
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/GoviewProjectDataServiceImpl.java

@@ -1,12 +1,10 @@
-package cn.com.v2.service.impl;
-
-import cn.com.v2.model.GoviewProjectData;
-import cn.com.v2.mapper.GoviewProjectDataMapper;
-import cn.com.v2.service.IGoviewProjectDataService;
+package com.usky.cockpit.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
+import com.usky.cockpit.mapper.GoviewProjectDataMapper;
+import com.usky.cockpit.model.GoviewProjectData;
+import com.usky.cockpit.service.IGoviewProjectDataService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 4 - 4
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/GoviewProjectServiceImpl.java

@@ -1,9 +1,9 @@
-package cn.com.v2.service.impl;
+package com.usky.cockpit.service.impl;
 
-import cn.com.v2.model.GoviewProject;
-import cn.com.v2.mapper.GoviewProjectMapper;
-import cn.com.v2.service.IGoviewProjectService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.usky.cockpit.mapper.GoviewProjectMapper;
+import com.usky.cockpit.model.GoviewProject;
+import com.usky.cockpit.service.IGoviewProjectService;
 import org.springframework.stereotype.Service;
 
 /**

+ 4 - 4
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/SysFileServiceImpl.java

@@ -1,10 +1,10 @@
-package cn.com.v2.service.impl;
+package com.usky.cockpit.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import cn.com.v2.mapper.SysFileMapper;
-import cn.com.v2.model.SysFile;
-import cn.com.v2.service.ISysFileService;
+import com.usky.cockpit.mapper.SysFileMapper;
+import com.usky.cockpit.model.SysFile;
+import com.usky.cockpit.service.ISysFileService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 4 - 4
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/service/impl/SysUserServiceImpl.java

@@ -1,9 +1,9 @@
-package cn.com.v2.service.impl;
+package com.usky.cockpit.service.impl;
 
-import cn.com.v2.model.SysUser;
-import cn.com.v2.mapper.SysUserMapper;
-import cn.com.v2.service.ISysUserService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.usky.cockpit.mapper.SysUserMapper;
+import com.usky.cockpit.model.SysUser;
+import com.usky.cockpit.service.ISysUserService;
 import org.springframework.stereotype.Service;
 
 /**

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/ConvertUtil.java

@@ -1,4 +1,4 @@
-package cn.com.v2.util;
+package com.usky.cockpit.util;
 
 import cn.hutool.core.util.StrUtil;
 import java.math.BigDecimal;

+ 0 - 39
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/MybatisPlusGenerator.java

@@ -1,39 +0,0 @@
-package cn.com.v2.util;
-
-import java.util.Collections;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.generator.FastAutoGenerator;
-import com.baomidou.mybatisplus.generator.config.*;
-import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
-import com.baomidou.mybatisplus.generator.fill.Column;
-
-
-public class MybatisPlusGenerator {
-	public static void main(String[] args) {
-		FastAutoGenerator.create(
-				"jdbc:sqlite:D:\\eclipse-workspace\\v2-goview-bate\\sqllite\\goview.db",
-				"", "").globalConfig(builder -> {
-					builder.author("fc") // 设置作者
-							// .enableSwagger() // 开启 swagger 模式
-							.fileOverride() // 覆盖已生成文件
-							.disableOpenDir() //禁止打开输出目录
-							.outputDir(System.getProperty("user.dir") + "/src/main/java"); // 指定输出目录
-				}).packageConfig(builder -> {
-					builder.parent("cn.com") // 设置父包名
-							.moduleName("v2") // 设置父包模块名
-							.entity("model")
-							// .service() // 设置自定义service路径,不设置就是默认路径
-							.pathInfo(Collections.singletonMap(OutputFile.mapperXml,
-							System.getProperty("user.dir") + "/src/main/resources/mapper/")); // 设置mapperXml生成路径
-				}).strategyConfig(builder -> {
-					builder.addInclude("t_goview_project_data") // 设置需要生成的表名
-							.addTablePrefix("t_", "c_")
-							// 设置自动填充的时间字段
-							.entityBuilder().addTableFills(new Column("create_time", FieldFill.INSERT),
-							new Column("update_time", FieldFill.INSERT_UPDATE)); // 设置过滤表前缀
-
-				}).templateEngine(new FreemarkerTemplateEngine()) // 使用Freemarker引擎模板,默认的是Velocity引擎模板
-				.execute();
-	}
-}

+ 73 - 74
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/SaTokenUtil.java

@@ -1,74 +1,73 @@
-package cn.com.v2.util;
-
-
-import org.springframework.beans.BeanUtils;
-
-import cn.com.v2.model.SysUser;
-import cn.dev33.satoken.stp.StpUtil;
-
-/**
- * 封装 Sa-Token 常用操作 
- * @author kong
- *
- */
-public class SaTokenUtil {
-
-	/**
-     * 获取登录用户model
-     */
-    public static SysUser getUser() {
-    	Object object=StpUtil.getSession().get("user");
-    	if(object!=null){
-    		SysUser tsysUser=new SysUser();
-    		BeanUtils.copyProperties(tsysUser, object);
-    		return tsysUser;
-    	}
-    	return null;
-    }
-    
-    /**
-     * set用户
-     */
-    public static void setUser(SysUser user) {
-    	StpUtil.getSession().set("user", user);
-    }
-
-  /**
-   * 获取登录用户id
-   */
-	public static String getUserId() {
-		return StpUtil.getLoginIdAsString();
-	}
-    
-    /**
-     * 获取登录用户name
-     */
-    public static String getLoginName() {
-    	SysUser tsysUser = getUser();
-        if (tsysUser == null){
-            throw new RuntimeException("用户不存在!");
-        }
-        return tsysUser.getUsername();
-    }
-
-    /**
-     * 获取登录用户ip
-     * @return
-     * @author fuce
-     * @Date 2019年11月21日 上午9:58:26
-     */
-    public static String getIp() {
-    	
-        return StpUtil.getTokenSession().getString("login_ip");
-    }
-    /**
-     * 判断是否登录
-     * @return
-     * @author fuce
-     * @Date 2019年11月21日 上午9:58:26
-     */
-    public static boolean isLogin() {
-        return StpUtil.isLogin();
-    }
-    
-}
+//package com.usky.cockpit.util;
+//
+//
+//import com.usky.cockpit.model.SysUser;
+//import org.springframework.beans.BeanUtils;
+//import cn.dev33.satoken.stp.StpUtil;
+//
+///**
+// * 封装 Sa-Token 常用操作
+// * @author kong
+// *
+// */
+//public class SaTokenUtil {
+//
+//	/**
+//     * 获取登录用户model
+//     */
+//    public static SysUser getUser() {
+//    	Object object=StpUtil.getSession().get("user");
+//    	if(object!=null){
+//    		SysUser tsysUser=new SysUser();
+//    		BeanUtils.copyProperties(tsysUser, object);
+//    		return tsysUser;
+//    	}
+//    	return null;
+//    }
+//
+//    /**
+//     * set用户
+//     */
+//    public static void setUser(SysUser user) {
+//    	StpUtil.getSession().set("user", user);
+//    }
+//
+//  /**
+//   * 获取登录用户id
+//   */
+//	public static String getUserId() {
+//		return StpUtil.getLoginIdAsString();
+//	}
+//
+//    /**
+//     * 获取登录用户name
+//     */
+//    public static String getLoginName() {
+//    	SysUser tsysUser = getUser();
+//        if (tsysUser == null){
+//            throw new RuntimeException("用户不存在!");
+//        }
+//        return tsysUser.getUsername();
+//    }
+//
+//    /**
+//     * 获取登录用户ip
+//     * @return
+//     * @author fuce
+//     * @Date 2019年11月21日 上午9:58:26
+//     */
+//    public static String getIp() {
+//
+//        return StpUtil.getTokenSession().getString("login_ip");
+//    }
+//    /**
+//     * 判断是否登录
+//     * @return
+//     * @author fuce
+//     * @Date 2019年11月21日 上午9:58:26
+//     */
+//    public static boolean isLogin() {
+//        return StpUtil.isLogin();
+//    }
+//
+//}

+ 1 - 1
service-cockpit/service-cockpit-biz/src/main/java/com/usky/cockpit/util/SnowflakeIdWorker.java

@@ -1,4 +1,4 @@
-package cn.com.v2.util;
+package com.usky.cockpit.util;
 
 /**
  * Twitter_Snowflake<br>

+ 0 - 16
service-cockpit/service-cockpit-biz/src/main/resources/application-dev.yml

@@ -1,16 +0,0 @@
-#dev环境  mysql7.0
-spring:
-  datasource:
-    driver-class-name: org.sqlite.JDBC
-    url: jdbc:sqlite:D:\文档和图片\工作文档\git\go-view-serve-master\go-view-serve-master\sqllite\goview.db
-    #linux服务器
-    #url: jdbc:sqlite://home/cqfy/project/OSSDATABASE/oss.db
-    username: 
-    password: 
-    ### 连接池配置
-    druid:
-      initial-size: 10
-      max-active: 100
-      min-idle: 30
-      max-wait: 40
-      validation-query: SELECT 1

+ 0 - 110
service-cockpit/service-cockpit-biz/src/main/resources/application.yml

@@ -1,110 +0,0 @@
-v2:
-  #虚拟路径映射路径 2个文件路径一一对应 第一个为主存储,其他为配置相关
-  xnljmap:
-   #win服务器  本地 注意!! 记住这个结尾有一个/
-   oss: file:D:/upload/
-   #linux服务器
-   #oss: file:/home/webapps/oss/
-  #虚拟路径映射路径 end
-  #本地存放地址 注意!! 记住这个结尾没有/
-  fileurl: D:/upload
-  #http://127.0.0.1:8080/oss/{yy}/2022-12-22/c83a77ae134a540c30daa6a0666fa945.md
-  httpurl: http://127.0.0.1:8083/
-  defaultFormat: .png
-#tomcat config
-server :
-  port : 8083
-  ##项目名字配置
-  servlet :
-    context-path : /
-    #session过期
-    session:
-      timeout: PT4H
-      #cookie:
-      #  name: jxfgzs
-  tomcat :
-    uri-encoding : UTF-8
-    #xx 报错修改的地方
-    max-connections: 200000
-    max-http-form-post-size: 9000000
-    threads:
-      max: 128
-      min-spare: 5
-spring :
-  # 环境 dev|test|prod
-  profiles :
-    active : dev
-  servlet:
-    multipart:
-      #设置总上传的数据大小
-      max-request-size: 100MB
-      #单个文件大小
-      maxFileSize : 30MB
-        #xx 报错修改的地方
-    max-connections: 200000
-    max-http-post-size: 9000000
-  #热部署模块
-  devtools:
-    restart:
-      #热部署开关
-      enabled: true
-      #指定热部署的目录
-      additional-paths: src/main/java
-      #指定目录不更新
-      exclude: test/**
-  mvc:   #静态文件
-    static-path-pattern : /static/**
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  #模板引擎
-  thymeleaf:
-    model: HTML5
-    prefix: classpath:/templates/
-    suffix: .html
-    #指定编码
-    encoding: utf-8
-    #禁用缓存 默认false
-    cache: false
-#mybatis
-mybatis-plus:
-  mapper-locations: classpath:/mapper/*Mapper.xml
-  #实体扫描,多个package用逗号或者分号分隔
-  typeAliasesPackage: cn.com.v2.model
-  global-config:
-    # 数据库相关配置
-    db-config:
-      #主键类型  AUTO:"数据库ID自增", INPUT:"用户输入ID",ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
-      id-type: INPUT
-      #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
-      field-strategy: not_empty
-      #驼峰下划线转换
-      column-underline: true
-      #数据库大写下划线转换
-      #capital-mode: true
-      #逻辑删除配置
-      logic-delete-value: 0
-      logic-not-delete-value: 1
-      db-type: sqlite
-    #刷新mapper 调试神器
-    refresh: true
-  # 原生配置
-  configuration:
-    map-underscore-to-camel-case: true
-    cache-enabled: false
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
-sa-token: 
-    # token名称 (同时也是cookie名称)
-    token-name: satoken
-    # token有效期,单位s 默认30天, -1代表永不过期 
-    timeout: 2592000
-    # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
-    activity-timeout: -1
-    # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) 
-    is-concurrent: true
-    # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token) 
-    is-share: true
-    # token风格
-    token-style: uuid
-    # 是否输出操作日志 
-    is-log: false

+ 20 - 0
service-ids/pom.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>usky-modules</artifactId>
+        <groupId>com.usky</groupId>
+        <version>0.0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-ids</artifactId>
+
+    <packaging>pom</packaging>
+    <version>0.0.1</version>
+
+    <modules>
+        <module>service-ids-biz</module>
+        <module>service-ids-api</module>
+    </modules>
+</project>

+ 27 - 0
service-ids/service-ids-api/pom.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>service-ids</artifactId>
+        <groupId>com.usky</groupId>
+        <version>0.0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-ids-api</artifactId>
+    <!-- SpringCloud Openfeign -->
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usky</groupId>
+            <artifactId>usky-common-core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 89 - 0
service-ids/service-ids-biz/pom.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>service-ids</artifactId>
+        <groupId>com.usky</groupId>
+        <version>0.0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-ids-biz</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.usky</groupId>
+            <artifactId>common-cloud-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>4.1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>4.5.16</version>
+        </dependency>
+
+        <!--语音依赖-->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dyvmsapi</artifactId>
+            <version>1.2.2</version>
+        </dependency>
+
+        <!--短信依赖-->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+
+        <!--MQTT依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-integration</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.integration</groupId>
+            <artifactId>spring-integration-mqtt</artifactId>
+        </dependency>
+        <!--websocket依赖-->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-websocket</artifactId>
+            <version>5.2.8.RELEASE</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.github.shalousun</groupId>
+                <artifactId>smart-doc-maven-plugin</artifactId>
+                <version>2.1.1</version>
+                <configuration>
+                    <!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
+                    <configFile>./src/main/resources/smart-doc.json</configFile>
+                    <!--指定项目名称-->
+                    <projectName>test</projectName>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 45 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/RuoYiSystemApplication.java

@@ -0,0 +1,45 @@
+package com.usky.ids;
+
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.core.env.Environment;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+/**
+ * 系统模块
+ * 
+ * @author ruoyi
+ */
+
+
+@EnableFeignClients(basePackages = "com.usky")
+@MapperScan(value = "com.usky.ids.mapper")
+@ComponentScan("com.usky")
+@SpringBootApplication
+public class RuoYiSystemApplication
+{
+    private static final Logger LOGGER = LoggerFactory.getLogger(RuoYiSystemApplication.class);
+
+    public static void main(String[] args) throws UnknownHostException {
+        ConfigurableApplicationContext application = SpringApplication.run(RuoYiSystemApplication.class, args);
+        Environment env = application.getEnvironment();
+        String ip = InetAddress.getLocalHost().getHostAddress();
+        String port = env.getProperty("server.port");
+        String path = env.getProperty("server.servlet.context-path");
+        LOGGER.info("\n----------------------------------------------------------\n\t" +
+                "Application is running! Access URLs:\n\t" +
+                "Local: \t\thttp://localhost:" + port + (null==path?"":path) + "/\n\t" +
+                "External: \thttp://" + ip + ":" + port + (null==path?"":path) + "/\n\t" +
+                "Api: \t\thttp://" + ip + ":" + port + (null==path?"":path) + "/swagger-ui/index.html\n\t" +
+                "----------------------------------------------------------");
+    }
+}

+ 109 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/controller/MybatisGeneratorUtils.java

@@ -0,0 +1,109 @@
+package com.usky.ids.controller;//package com.usky.iot.controller;//package com.usky.dm.controller.web.business;
+// package com.usky.dm.controller.web;
+
+
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.InjectionConfig;
+import com.baomidou.mybatisplus.generator.config.*;
+import com.baomidou.mybatisplus.generator.config.po.TableInfo;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author han
+ * @date 2025/1/18 13:19
+ */
+public class MybatisGeneratorUtils {
+    public static void main(String[] args) {
+
+            shell("service-ids","service-ids-biz");
+    }
+
+    private static void shell(String parentName,String model) {
+
+        AutoGenerator mpg = new AutoGenerator();
+        //1、全局配置
+        GlobalConfig gc = new GlobalConfig();
+//        File file = new File(model);
+//        String path = file.getAbsolutePath();
+        String projectPath = System.getProperty("user.dir");
+        projectPath+="/"+parentName;
+        projectPath+="/"+model;
+        gc.setOutputDir(projectPath+ "/src/main/java");  //生成路径(一般都是生成在此项目的src/main/java下面)
+        //修改为自己的名字
+        gc.setAuthor("han"); //设置作者
+        gc.setOpen(false);
+        gc.setFileOverride(true); //第二次生成会把第一次生成的覆盖掉
+        gc.setServiceName("%sService"); //生成的service接口名字首字母是否为I,这样设置就没有
+        gc.setBaseResultMap(true); //生成resultMap
+        mpg.setGlobalConfig(gc);
+
+        //2、数据源配置
+        //修改数据源
+        DataSourceConfig dsc = new DataSourceConfig();
+        dsc.setUrl("jdbc:mysql://192.168.10.165:3306/usky-cloud?useUnicode=true&serverTimezone=GMT&useSSL=false&characterEncoding=utf8");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("root");
+        dsc.setPassword("yt123456");
+        mpg.setDataSource(dsc);
+
+        // 3、包配置
+        PackageConfig pc = new PackageConfig();
+        pc.setParent("com.usky.ids");
+        pc.setController("controller.web");
+        pc.setEntity("domain");
+        pc.setMapper("mapper");
+        pc.setService("service");
+        pc.setServiceImpl("service.impl");
+//        pc.setXml("mapper.demo");
+        //pc.setModuleName("test");
+        mpg.setPackageInfo(pc);
+
+        // 4、策略配置
+        StrategyConfig strategy = new StrategyConfig();
+        strategy.setNaming(NamingStrategy.underline_to_camel);
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+        strategy.setSuperMapperClass("com.usky.common.mybatis.core.CrudMapper");
+        strategy.setSuperServiceClass("com.usky.common.mybatis.core.CrudService");
+        strategy.setSuperServiceImplClass("com.usky.common.mybatis.core.AbstractCrudService");
+        // strategy.setTablePrefix("t_"); // 表名前缀
+        strategy.setEntityLombokModel(true); //使用lombok
+        //修改自己想要生成的表
+        strategy.setInclude("ids_park_map");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        mpg.setStrategy(strategy);
+
+        // 关闭默认 xml 生成,调整生成 至 根目录
+        //修改对应的模块名称
+        TemplateConfig tc = new TemplateConfig();
+        // 自定义配置
+        InjectionConfig cfg = new InjectionConfig() {
+            @Override
+            public void initMap() {
+                // to do nothing
+            }
+        };
+        //如果模板引擎是 velocity
+        String templatePath = "/templates/mapper.xml.vm";
+        // 自定义输出配置
+        List<FileOutConfig> focList = new ArrayList<>();
+        // 自定义配置会被优先输出
+        String finalProjectPath = projectPath;
+        focList.add(new FileOutConfig(templatePath) {
+            @Override
+            public String outputFile(TableInfo tableInfo) {
+                // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
+                return finalProjectPath + "/src/main/resources/mapper/ids" + "/"
+                        + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+            }
+        });
+        cfg.setFileOutConfigList(focList);
+        mpg.setCfg(cfg);
+        tc.setXml(null);
+        mpg.setTemplate(tc);
+        //5、执行
+        mpg.execute();
+    }
+}

+ 39 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/controller/web/IdsParkMapController.java

@@ -0,0 +1,39 @@
+package com.usky.ids.controller.web;
+
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.common.core.bean.CommonPage;
+import com.usky.ids.domain.IdsParkMap;
+import com.usky.ids.service.IdsParkMapService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author han
+ * @since 2025-01-18
+ */
+@RestController
+@RequestMapping("/idsParkMap")
+public class IdsParkMapController {
+    @Autowired
+    private IdsParkMapService idsParkMapService;
+    /**
+     * 获取车位信息
+     * @return
+     */
+    @GetMapping("mapList")
+    ApiResult<Object> mapList(){
+        return ApiResult.success(idsParkMapService.mapList());
+    }
+}
+

+ 61 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/domain/IdsParkMap.java

@@ -0,0 +1,61 @@
+package com.usky.ids.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author han
+ * @since 2025-01-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class IdsParkMap implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 楼层车位统计信息
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 楼层名称
+     */
+    private String mapName;
+
+    /**
+     * 使用中数量
+     */
+    private Integer usingCount;
+
+    /**
+     * 空闲数量
+     */
+    private Integer freeCount;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+
+    /**
+     * 部门id
+     */
+    private Long deptId;
+
+    /**
+     * 租户id
+     */
+    private Integer tenantId;
+
+
+}

+ 16 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/mapper/IdsParkMapMapper.java

@@ -0,0 +1,16 @@
+package com.usky.ids.mapper;
+
+import com.usky.ids.domain.IdsParkMap;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author han
+ * @since 2025-01-18
+ */
+public interface IdsParkMapMapper extends CrudMapper<IdsParkMap> {
+
+}

+ 24 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/service/IdsParkMapService.java

@@ -0,0 +1,24 @@
+package com.usky.ids.service;
+
+import com.usky.ids.domain.IdsParkMap;
+import com.usky.common.mybatis.core.CrudService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author han
+ * @since 2025-01-18
+ */
+public interface IdsParkMapService extends CrudService<IdsParkMap> {
+    Object mapList();
+//    /**
+//     * 定时同步智泊反寻系统停车场数据到巡检异常记录表中
+//     *
+//     * @return
+//     */
+//    void addPatrolInspectionAbnormalData();
+}

+ 44 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/service/impl/IdsParkMapServiceImpl.java

@@ -0,0 +1,44 @@
+package com.usky.ids.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.usky.common.security.utils.SecurityUtils;
+import com.usky.ids.domain.IdsParkMap;
+import com.usky.ids.mapper.IdsParkMapMapper;
+import com.usky.ids.service.IdsParkMapService;
+import com.usky.common.mybatis.core.AbstractCrudService;
+import com.usky.ids.service.util.HttpClientUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author han
+ * @since 2025-01-18
+ */
+@Service
+public class IdsParkMapServiceImpl extends AbstractCrudService<IdsParkMapMapper, IdsParkMap> implements IdsParkMapService {
+    @Override
+    public Object mapList(){
+        HashMap map = new HashMap();
+        map.put("key", "A10001");
+        map.put("timestamp", "20241231111111");
+        map.put("version", "v3.20.0.2");
+        map.put("sign", "f1c0a78dddb4f4591f04b32cc2151ea7");
+        String resultString = HttpClientUtils.doPost("http://172.18.0.25:8180/mpgs/api/v3/parkingLot/getParkingLotInfo",map);
+        JSONObject resultVO = JSONObject.parseObject(resultString);
+        String resultData = resultVO.get("data").toString();
+        JSONObject resultVO1 = JSONObject.parseObject(resultData);
+        Object mapList = resultVO1.get("mapList");
+        System.out.println(mapList);
+        return mapList;
+    }
+}

+ 136 - 0
service-ids/service-ids-biz/src/main/java/com/usky/ids/service/util/HttpClientUtils.java

@@ -0,0 +1,136 @@
+package com.usky.ids.service.util;
+
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ 1. 跨域请求工具类
+ */
+public class HttpClientUtils {
+
+    public static String doGet(String url, Map<String, String> param) {
+
+        // 创建Httpclient对象
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+
+        String resultString = "";
+        CloseableHttpResponse response = null;
+        try {
+            // 创建uri
+            URIBuilder builder = new URIBuilder(url);
+            if (param != null) {
+                for (String key : param.keySet()) {
+                    builder.addParameter(key, param.get(key));
+                }
+            }
+            URI uri = builder.build();
+
+            // 创建http GET请求
+            HttpGet httpGet = new HttpGet(uri);
+
+            // 执行请求
+            response = httpclient.execute(httpGet);
+            // 判断返回状态是否为200
+            if (response.getStatusLine().getStatusCode() == 200) {
+                resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return resultString;
+    }
+
+    public static String doGet(String url) {
+        return doGet(url, null);
+    }
+
+    public static String doPost(String url, Map<String, String> param) {
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = "";
+        try {
+            // 创建Http Post请求
+            HttpPost httpPost = new HttpPost(url);
+            // 创建参数列表
+            if (param != null) {
+                List<NameValuePair> paramList = new ArrayList<>();
+                for (String key : param.keySet()) {
+                    paramList.add(new BasicNameValuePair(key, param.get(key)));
+                }
+                // 模拟表单
+                UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);
+                httpPost.setEntity(entity);
+            }
+            // 执行http请求
+            response = httpClient.execute(httpPost);
+            resultString = EntityUtils.toString(response.getEntity(), "utf-8");
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
+        return resultString;
+    }
+
+    public static String doPost(String url) {
+        return doPost(url, null);
+    }
+
+    public static String doPostJson(String url, String json) {
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = "";
+        try {
+            // 创建Http Post请求
+            HttpPost httpPost = new HttpPost(url);
+            // 创建请求内容
+            StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);
+            httpPost.setEntity(entity);
+            // 执行http请求
+            response = httpClient.execute(httpPost);
+            resultString = EntityUtils.toString(response.getEntity(), "utf-8");
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
+        return resultString;
+    }
+}

+ 25 - 0
service-ids/service-ids-biz/src/main/resources/bootstrap.yml

@@ -0,0 +1,25 @@
+# Tomcat
+server:
+  port: 9892
+
+# Spring
+spring: 
+  application:
+    # 应用名称
+    name: service-ids
+  profiles:
+    # 环境配置
+    active: dev
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: usky-cloud-nacos:8848
+      config:
+        # 配置中心地址
+        server-addr: usky-cloud-nacos:8848
+        # 配置文件格式
+        file-extension: yml
+        # 共享配置
+        shared-configs:
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

+ 94 - 0
service-ids/service-ids-biz/src/main/resources/logback.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="60 seconds" debug="false">
+    <!-- 日志存放路径 -->
+    <property name="log.path" value="/var/log/uskycloud/service-ids" />
+    <!-- 日志输出格式 -->
+    <property name="log.pattern" value="%d{MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{26}:%line: %msg%n" />
+    <!--    	<property name="log.pattern" value="%gray(%d{MM-dd HH:mm:ss.SSS}) %highlight(%-5level) &#45;&#45; [%gray(%thread)] %cyan(%logger{26}:%line): %msg%n" />-->
+
+
+    <property name="SQL_PACKAGE" value="com.usky.ids.mapper"/>
+
+    <!-- 控制台输出 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="file_sql" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sql.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sql.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>3</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- 系统日志输出 -->
+    <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>3</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 系统模块日志级别控制  -->
+    <!--	<logger name="com.usky" level="info" />-->
+    <!-- Spring日志级别控制  -->
+    <!--	<logger name="org.springframework" level="warn" />-->
+
+    <logger name="${SQL_PACKAGE}" additivity="false" level="debug">
+        <appender-ref ref="console"/>
+        <appender-ref ref="file_sql"/>
+    </logger>
+
+    <!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_error" />
+        <appender-ref ref="console" />
+    </root>
+</configuration>

+ 16 - 0
service-ids/service-ids-biz/src/main/resources/mapper/ids/IdsParkMapMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.ids.mapper.IdsParkMapMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.ids.domain.IdsParkMap">
+        <id column="id" property="id" />
+        <result column="map_name" property="mapName" />
+        <result column="using_count" property="usingCount" />
+        <result column="free_count" property="freeCount" />
+        <result column="update_time" property="updateTime" />
+        <result column="dept_id" property="deptId" />
+        <result column="tenant_id" property="tenantId" />
+    </resultMap>
+
+</mapper>

+ 15 - 0
service-ids/service-ids-biz/src/main/resources/smart-doc.json

@@ -0,0 +1,15 @@
+{
+  "outPath":"./src/main/resources/doc",
+  "serverUrl": "http:10.23.39.1:9887/",
+  "isStrict": false,
+  "coverOld": true,
+  "allInOne": true,
+  "packageFilters": "com.usky.iot.controller.web",
+  "requestExample":"false",
+  "responseExample":"true",
+  "projectName": "iot项目",
+  "appKey": "20211216921084883495813120",
+  "appToken":"967031b0cc6f474aaf73616cbf2b25c2",
+  "secret": "N@Pd,KXAHki*BW3=zK.XPNykf!=CM79J",
+  "openUrl": "http://101.133.214.75:7700/api"
+}

+ 0 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/DmpDeviceInfoServiceImpl.java

@@ -99,7 +99,6 @@ public class DmpDeviceInfoServiceImpl extends AbstractCrudService<DmpDeviceInfoM
 
     private static final String ALARM_HTTP_URL = "/service-alarm/baseAlarm/alarmInfo";
 
-
     @Override
     public Map<String, Object> control(String productCode, String deviceUuid, String commandCode, String commandValue, String domain, Long userId, String userName) {
         Integer tenantId;