Selaa lähdekoodia

********labsl VS meiku***********************************
蜡笔森林 添加注释
美库 添加注释

zhangweixin 4 vuotta sitten
vanhempi
commit
d8a5e9f63c

+ 1 - 1
gradle.properties

@@ -20,7 +20,7 @@
 
 PERSAGY_URL = http://www.persagy.cn
 PERSAGY_KOTLIN_VERSION = 1.4.120
-PERSAGY_SERVICE_VERSION = 1.4.160
+PERSAGY_SERVICE_VERSION = 1.4.162
 
 MAVEN_REPO_PUBLIC_URL = http://dev.dp.sagacloud.cn:8082/repository/maven-public/
 MAVEN_REPO_RELEASE_URL = http://dev.dp.sagacloud.cn:8082/repository/maven-releases/

+ 1 - 13
labsl/src/main/kotlin/com/persagy/labsl/WebMvcConfg.kt

@@ -27,10 +27,8 @@ import org.slf4j.LoggerFactory
 import org.springframework.context.annotation.Configuration
 import org.springframework.http.converter.HttpMessageConverter
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
-import org.springframework.web.servlet.config.annotation.CorsRegistry
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 
 @Configuration
 open class WebMvcConfg: WebMvcConfigurer {
@@ -39,17 +37,6 @@ open class WebMvcConfg: WebMvcConfigurer {
         private val logger = LoggerFactory.getLogger(WebMvcConfg::class.java)
     } // Companion object
 
-    override fun addCorsMappings(registry: CorsRegistry) {
-//        super.addCorsMappings(registry)
-        registry.addMapping("/**")
-            .allowedOrigins("*")
-            .allowedMethods("GET","POST","PUT","OPTIONS","DELETE","PATCH")
-            .allowedHeaders("*")
-            .allowCredentials(true)
-            .maxAge(3600);
-        super.addCorsMappings(registry)
-    }
-
     /**
      * 配置拦截器
      *
@@ -77,4 +64,5 @@ open class WebMvcConfg: WebMvcConfigurer {
         converter.propertyNamingStrategy = PropertyNamingStrategy.CamelCase
         converterList.add(converter)
     }
+
 } // Class WebMvcConf()

+ 5 - 0
labsl/src/main/kotlin/com/persagy/labsl/models/entities/tpt/Graph.kt

@@ -59,6 +59,11 @@ open class Graph : SBaseEntity(), Serializable {
     @Column(name = "note")
     var note: String? = null
 
+    /** 背景色 */
+    @Schema(description = "背景色")
+    @Column(name = "view_background")
+    var viewBackground: String? = null
+
     /** 版本号 */
     @Schema(description = "版本号")
     @Column(name = "version")

+ 5 - 0
labsl/src/main/kotlin/com/persagy/labsl/models/entities/tpt/pub/GraphPub.kt

@@ -59,6 +59,11 @@ class GraphPub : SBaseEntity(), Serializable {
     @Column(name = "note")
     var note: String? = null
 
+    /** 背景色 */
+    @Schema(description = "背景色")
+    @Column(name = "view_background")
+    var viewBackground: String? = null
+
     /** 版本号 */
     @Schema(description = "版本号")
     @Column(name = "version")

+ 3 - 3
labsl/src/main/kotlin/com/persagy/labsl/services/planar/PlanarGraphService.kt

@@ -79,7 +79,7 @@ object PlanarGraphService : SObjectService<PlanarGraph>(SMybatisDao(PlanarGraph:
 
         /** 版本 */
         if (entity.version.isNullOrEmpty()) {
-            entity.version = "2.0.1"
+            entity.version = "1.0.1"
         }
 
         /** 项目 id */
@@ -168,7 +168,7 @@ object PlanarGraphService : SObjectService<PlanarGraph>(SMybatisDao(PlanarGraph:
         delOldData(graph)
         /** 版本号 */
         if (graph.version.isNullOrEmpty()) {
-            graph.version = "2.0.1"
+            graph.version = "1.0.1"
         } else {
             val listVersion = graph.version!!.split(".")
             val num = listVersion[2].toInt() + 1
@@ -869,12 +869,12 @@ object PlanarGraphService : SObjectService<PlanarGraph>(SMybatisDao(PlanarGraph:
                 SFilter.eq("graphId", graph.graphId!!)
             ).exec()
 
-
             /** 规则 */
             val planarQbsRuleList = planarQbsRuleService.select(
                 SFilter.eq("graphCoding", graph.id!!),
                 SFilter.eq("graphId", graph.graphId!!)
             ).exec()
+
             if (planarQbsRuleList.size>0) {
                 graph.ruleList = planarQbsRuleList
             }

+ 3 - 3
labsl/src/main/kotlin/com/persagy/labsl/services/planar/QbsFolderService.kt

@@ -70,12 +70,12 @@ object QbsFolderService : SObjectService<QbsFolder>(SMybatisDao(QbsFolder::class
                     val planarGraphList = PlanarGraphService.select(
                         SFilter.eq("folderId", qbsFolder.id!!),
                         SFilter.eq("projectId", Opts.projectId!!),
-                        SFilter.eq("state", 1)
+                        SFilter.eq("state", "Draft")
                     ).exec()
                     val planarGraphPubList = planarGraphPubService.select(
                         SFilter.eq("folderId", qbsFolder.id!!),
                         SFilter.eq("projectId", Opts.projectId!!),
-                        SFilter.eq("state", 0)
+                        SFilter.eq("state", "Publish")
                     ).exec()
                     if (planarGraphList.size>0||planarGraphPubList.size>0) {
                         sBaseResponse.message = "文件夹有内容,禁止删除"
@@ -90,7 +90,7 @@ object QbsFolderService : SObjectService<QbsFolder>(SMybatisDao(QbsFolder::class
                         PlanarGraphService.delete(
                             SFilter.eq("id", qbsFolder.id!!),
                             SFilter.eq("projectId", Opts.projectId!!),
-                            SFilter.eq("state", 4)
+                            SFilter.eq("state", "Recyle")
                         )
                     }
                 }

+ 2 - 2
labsl/src/main/resources/application-prod.yml

@@ -4,13 +4,13 @@ server:
 spring:
   datasource:
 #    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
-    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
 #    username:                           postgres
 ##    password:                           123qwe!@#
 #    password:                           cGVyc2FneV8yMDIwcXdlIUAj
 
 #  datasource:
-#    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
+    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
     username:                           postgres
 #    password:                           persagy_2020qwe!@#
     password:                           cGVyc2FneV8yMDIwcXdlIUAj

+ 10 - 0
labsl/src/main/resources/application-test.yml

@@ -0,0 +1,10 @@
+server:
+  port: 8080
+
+spring:
+  datasource:
+    url:                                jdbc:postgresql://datacenter:5432/datacenter
+    username:                           postgres
+    password:                           cGVyc2FneV8yMDIwcXdlIUAj
+
+

+ 8 - 0
meiku/src/main/resources/application-test.yml

@@ -0,0 +1,8 @@
+server:
+  port: 8080
+
+spring:
+  datasource:
+    url:                                jdbc:postgresql://datacenter:5432/datacenter
+    username:                           postgres
+    password:                           cGVyc2FneV8yMDIwcXdlIUAj