WXF пре 3 година
родитељ
комит
cfda8a8c27

+ 1 - 0
pom.xml

@@ -20,6 +20,7 @@
         <module>api-common</module>
         <module>simulation-resource-common</module>
         <module>simulation-resource-monitor</module>
+        <module>simulation-resource-scene</module>
     </modules>
 
 

+ 2 - 2
simulation-resource-monitor/src/main/resources/bootstrap-dev.yaml

@@ -2,9 +2,9 @@ spring:
   cloud:
     nacos:
       discovery:
-        server-addr: 47.94.105.148:8848
+        server-addr: 10.12.10.70:8848
         namespace: 3698bfc2-a612-487a-b2a2-aaad16cd9d9d
       config:
-        server-addr: 47.94.105.148:8848
+        server-addr: 10.12.10.70:8848
         namespace: 3698bfc2-a612-487a-b2a2-aaad16cd9d9d
         file-extension: yaml

+ 118 - 0
simulation-resource-scene/pom.xml

@@ -0,0 +1,118 @@
+<?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>simulation-cloud</artifactId>
+        <groupId>com.css</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>simulation-resource-scene</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+    <dependencies>
+
+        <!-- 数据库 - 开始 -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <!-- 数据库 - 结束 -->
+
+
+        <!-- nacos - 开始 -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+        <!-- nacos - 结束 -->
+
+        <!-- api-common -->
+        <dependency>
+            <groupId>com.css</groupId>
+            <artifactId>api-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- 基础 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-loadbalancer</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <fork>true</fork>
+                    <addResources>true</addResources>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 15 - 0
simulation-resource-scene/src/main/java/com/css/simulation/resource/scene/SimulationResourceSceneApplication.java

@@ -0,0 +1,15 @@
+package com.css.simulation.resource.scene;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+@SpringBootApplication
+@EnableFeignClients
+public class SimulationResourceSceneApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(SimulationResourceSceneApplication.class, args);
+        System.out.println("-------------启动成功----------------");
+    }
+}

+ 11 - 0
simulation-resource-scene/src/main/resources/bootstrap-dev.yaml

@@ -0,0 +1,11 @@
+#nacos配置
+spring:
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.12.10.70:8848
+        namespace: 3698bfc2-a612-487a-b2a2-aaad16cd9d9d
+      config:
+        server-addr: 10.12.10.70:8848
+        namespace: 3698bfc2-a612-487a-b2a2-aaad16cd9d9d
+        file-extension: yaml

+ 10 - 0
simulation-resource-scene/src/main/resources/bootstrap.yaml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: simulation-resource-scene
+  profiles:
+    active: dev
+
+mybatis:
+  mapper-locations: classpath:/mapper/*/*.xml
+  configuration:
+    map-underscore-to-camel-case: true

+ 3 - 1
simulation-resource-server/src/main/java/com/css/simulation/resource/log/service/LogService.java

@@ -1,5 +1,6 @@
 package com.css.simulation.resource.log.service;
 
+import api.common.pojo.constants.DictConstants;
 import api.common.pojo.constants.LogConstants;
 import api.common.pojo.param.log.LogPageParam;
 import api.common.pojo.po.log.LogLoginPO;
@@ -75,10 +76,11 @@ public class LogService {
         PageUtil.setPageInfo(pageParam);
         List<LogSystemPO> list = logMapper.getSystemLogPageList(pageParam);
         //字典翻译
-        Map<String, Map<String, String>> dictMaps = dictService.getDictMapsByTypes(LogConstants.SYS_LOG_TYPE);
+        Map<String, Map<String, String>> dictMaps = dictService.getDictMapsByTypes(LogConstants.SYS_LOG_TYPE + "," + DictConstants.ROLE_CODE);
         list.forEach(po ->{
             po.setModule(dictMaps.get(LogConstants.SYS_LOG_TYPE).get(po.getModule()));
             po.setOperationType(dictMaps.get(LogConstants.SYS_LOG_TYPE).get(po.getOperationType()));
+            po.setRoleCode(dictMaps.get(DictConstants.ROLE_CODE).get(po.getRoleCode()));
         });
         return new PageInfo<>(list);
     }

+ 1 - 9
simulation-resource-server/src/main/resources/bootstrap.yaml

@@ -1,17 +1,9 @@
-server:
-  port: 7003
-  servlet:
-    context-path: /simulation/resource/server
-
 spring:
   application:
     name: simulation-resource-server
   profiles:
     active: dev
-  servlet:
-    multipart:
-      max-file-size: 1024MB
-      max-request-size: 1024MB
+
 # 分页插件配置
 pagehelper:
   helperDialect: mysql