Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
<!-- 单个文件 100MB -->
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<!-- 保存 15 天 -->
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<maxHistory>15</maxHistory>
|
||||
<!-- 总大小 3GB -->
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
@@ -46,9 +46,10 @@
|
||||
<!-- 自动压缩 -->
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<maxHistory>15</maxHistory>
|
||||
<!-- 总大小 2GB -->
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
|
||||
@@ -7,7 +7,7 @@ spring:
|
||||
datasource:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
# 设置连接池能够容纳的最大连接数。建议值:CPU核心数 * 2 + 有效磁盘I/O数。一个常见的经验值是 10-20。
|
||||
@@ -23,18 +23,18 @@ spring:
|
||||
master:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
slave:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
enable: true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.0.88:8848
|
||||
server-addr: 192.168.0.89:8848
|
||||
group: DEV_GROUP
|
||||
# server-addr: 127.0.0.1:8848
|
||||
enabled: true
|
||||
@@ -108,7 +108,7 @@ fileSystem:
|
||||
|
||||
# spdmadmin/spdmadmin 作为普通用户只能看到spdm桶的数据
|
||||
minio:
|
||||
endpoint: 192.168.0.88
|
||||
endpoint: 192.168.0.89
|
||||
port: 9000
|
||||
access-key: minioadmin
|
||||
secret-key: minioadmin
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -43,8 +44,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running_debug.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -62,8 +64,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>1GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -43,8 +44,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running_debug.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
|
||||
@@ -50,6 +50,15 @@ spring:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
group: DEV_GROUP # 指定目标服务的分组
|
||||
- id: pbs-service-queryHpcResource
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
- Path=/simulation/pbs/pbs/queryHpcResource
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
response-timeout: 50000
|
||||
connect-timeout: 10000
|
||||
- id: pbs-service
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
@@ -125,7 +134,7 @@ logging:
|
||||
# 0单机处理,1负载均衡轮询
|
||||
serverType: 0
|
||||
serverIp: 192.168.190.100
|
||||
#serverIp: 192.168.65.73
|
||||
#serverIp: 192.168.65.76
|
||||
|
||||
security:
|
||||
whitelist:
|
||||
|
||||
@@ -50,6 +50,15 @@ spring:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
group: DEV_GROUP # 指定目标服务的分组
|
||||
- id: pbs-service-queryHpcResource
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
- Path=/simulation/pbs/pbs/queryHpcResource
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
response-timeout: 50000
|
||||
connect-timeout: 10000
|
||||
- id: pbs-service
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
|
||||
@@ -50,6 +50,15 @@ spring:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
group: DEV_GROUP # 指定目标服务的分组
|
||||
- id: pbs-service-queryHpcResource
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
- Path=/simulation/pbs/pbs/queryHpcResource
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
response-timeout: 50000
|
||||
connect-timeout: 10000
|
||||
- id: pbs-service
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
|
||||
@@ -50,6 +50,15 @@ spring:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
group: LYRIC_GROUP # 指定目标服务的分组
|
||||
- id: pbs-service-queryHpcResource
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
- Path=/simulation/pbs/pbs/queryHpcResource
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
response-timeout: 50000
|
||||
connect-timeout: 10000
|
||||
- id: pbs-service
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
|
||||
@@ -7,13 +7,13 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: 192.168.0.88:8848
|
||||
server-addr: 192.168.0.89:8848
|
||||
file-extension: yaml
|
||||
import-check:
|
||||
enabled: false
|
||||
enabled: false
|
||||
discovery:
|
||||
server-addr: 192.168.0.88:8848
|
||||
server-addr: 192.168.0.89:8848
|
||||
group: DEV_GROUP
|
||||
enabled: true
|
||||
gateway:
|
||||
@@ -50,6 +50,15 @@ spring:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
group: DEV_GROUP # 指定目标服务的分组
|
||||
- id: pbs-service-queryHpcResource
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
- Path=/simulation/pbs/pbs/queryHpcResource
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
metadata:
|
||||
response-timeout: 50000
|
||||
connect-timeout: 10000
|
||||
- id: pbs-service
|
||||
uri: lb://pbs
|
||||
predicates:
|
||||
@@ -124,7 +133,7 @@ logging:
|
||||
|
||||
# 0单机处理,1负载均衡轮询
|
||||
serverType: 0
|
||||
serverIp: 192.168.0.88
|
||||
serverIp: 192.168.0.89
|
||||
#serverIp: 192.168.65.73
|
||||
|
||||
security:
|
||||
|
||||
@@ -31,9 +31,10 @@
|
||||
<!-- 单个文件最大 100MB -->
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<!-- 保留 15 天 -->
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<maxHistory>15</maxHistory>
|
||||
<!-- 总大小上限 3GB -->
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
@@ -49,8 +50,9 @@
|
||||
<!-- 自动压缩 -->
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
@@ -40,8 +40,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
|
||||
@@ -1,107 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 彩色日志 -->
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
|
||||
<!-- ================= 基础属性与格式定义 ================= -->
|
||||
|
||||
<!-- Spring Boot 彩色日志支持 (兼容 logback.xml 加载) -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
|
||||
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr([%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
|
||||
<property name="FILE_LOG_PATTERN" value="[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %logger : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}" />
|
||||
|
||||
<!-- 日志文件存储地址 -->
|
||||
<!-- 路径配置 -->
|
||||
<property name="LOG_HOME" value="/home/app/pbs/logs" />
|
||||
<!-- 这里的 PID 变量如果未定义默认为空,Spring Boot 启动时会自动注入 -->
|
||||
<property name="PID" value="${PID:-}" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<!--
|
||||
控制台格式:包含 TraceId
|
||||
注意:使用 %X{traceId:-} 可以在 MDC 为空时不显示 null,保持整洁
|
||||
-->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%clr([%d{yyyy-MM-dd HH:mm:ss.SSS}]){faint} %clr(%-5p){highlight} %clr(${PID:- }){magenta} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} [%X{traceId:-}] %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
<!-- 文件格式:去掉了颜色代码,增加换行符确保堆栈独立成行 -->
|
||||
<property name="FILE_LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] %-5p ${PID:- } [%15.15t] %logger : [%X{traceId:-}] %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
|
||||
<!-- ================= 控制台输出 ================= -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- ===================== running.log 输出(3GB上限) ===================== -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- ================= 异步包装器 (高性能关键) ================= -->
|
||||
<!-- 将实际的写文件操作变为异步,防止阻塞业务线程 -->
|
||||
<appender name="ASYNC_FILE" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<queueSize>2048</queueSize>
|
||||
<discardingThreshold>200</discardingThreshold>
|
||||
<neverBlock>true</neverBlock>
|
||||
<appender-ref ref="ROLLING_FILE"/>
|
||||
</appender>
|
||||
|
||||
<!-- 具体的 running.log 滚动策略 -->
|
||||
<appender name="ROLLING_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_HOME}/running.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<!-- 修正为标准小驼峰 fileNamePattern -->
|
||||
<fileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- ===================== core.log 专用输出(2GB上限) ===================== -->
|
||||
<!-- ================= core.log 专用输出 ================= -->
|
||||
<!-- 同样建议给 core.log 加上异步包装,这里直接写在 Appender 内部 -->
|
||||
<appender name="CORE_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_HOME}/core.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
|
||||
<!-- 过滤器:只记录 INFO 及以上 -->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder>
|
||||
<!-- 单独定义了 pattern,加入了 callerInfo -->
|
||||
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] %-5p [%15.15t] %X{callerInfo} : [%X{traceId:-}] %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<!-- ================= 根日志配置 ================= -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
<!-- 引用异步 Appender,而不是直接引用 ROLLING_FILE -->
|
||||
<appender-ref ref="ASYNC_FILE" />
|
||||
</root>
|
||||
|
||||
<!-- 绑定 FeignClient -->
|
||||
<!-- ================= 特定包/Logger 配置 ================= -->
|
||||
|
||||
<!-- FeignClient: 关闭继承(additivity=false),避免重复打印到 root 的 running.log 中 -->
|
||||
<logger name="FeignClient" level="INFO" additivity="false">
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="FILE" /> <!-- 注意:这里引用的是原始的 FILE (即 ROLLING_FILE),不是 ASYNC_FILE -->
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
|
||||
<!-- 绑定 coreLogger -->
|
||||
<!-- coreLogger: 指向 core.log -->
|
||||
<logger name="coreLogger" level="INFO" additivity="false">
|
||||
<appender-ref ref="CORE_FILE" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
|
||||
<!-- ===================== 你原来的所有 SQL/MyBatis/包日志 全部保留 ===================== -->
|
||||
<!-- MyBatis SQL语句输出配置 -->
|
||||
<logger name="org.apache.ibatis" level="DEBUG"/>
|
||||
<logger name="org.apache.ibatis.session.AutoMappingUnknownColumnBehavior" level="ERROR"/>
|
||||
<logger name="org.apache.ibatis.logging" level="DEBUG"/>
|
||||
<logger name="org.apache.ibatis.logging.jdbc" level="DEBUG"/>
|
||||
<logger name="org.apache.ibatis.logging.jdbc.BaseJdbcLogger" level="DEBUG"/>
|
||||
<logger name="org.apache.ibatis.datasource" level="DEBUG"/>
|
||||
<logger name="org.apache.ibatis.transaction" level="DEBUG"/>
|
||||
<logger name="org.apache.ibatis.cache" level="DEBUG"/>
|
||||
|
||||
<logger name="org.mybatis" level="DEBUG"/>
|
||||
<logger name="org.mybatis.spring" level="DEBUG"/>
|
||||
<logger name="org.mybatis.spring.SqlSessionUtils" level="DEBUG"/>
|
||||
<logger name="org.mybatis.spring.transaction" level="DEBUG"/>
|
||||
|
||||
<!-- MyBatis-Plus 相关日志配置 -->
|
||||
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.core" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.core.MybatisConfiguration" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.core.MybatisMapperRegistry" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.core.override.MybatisMapperProxy" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.extension" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.extension.spring" level="DEBUG"/>
|
||||
<logger name="com.baomidou.mybatisplus.extension.MybatisPlusProperties" level="DEBUG"/>
|
||||
|
||||
<logger name="java.sql" level="DEBUG"/>
|
||||
<logger name="java.sql.Connection" level="DEBUG"/>
|
||||
<logger name="java.sql.Statement" level="DEBUG"/>
|
||||
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
|
||||
<logger name="java.sql.ResultSet" level="DEBUG"/>
|
||||
<!-- 生产环境安全级别:屏蔽 MyBatis/MP 的调试信息 -->
|
||||
<logger name="org.apache.ibatis" level="WARN"/>
|
||||
<logger name="com.baomidou.mybatisplus" level="WARN"/>
|
||||
<logger name="java.sql" level="WARN"/>
|
||||
|
||||
<!-- 业务包配置 -->
|
||||
<logger name="com.sdm.pbs" level="INFO"/>
|
||||
<logger name="com.sdm.pbs.dao" level="DEBUG"/>
|
||||
|
||||
</configuration>
|
||||
@@ -466,5 +466,31 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
|
||||
return nodeService.togglePinProject(req.getNodeId(), req.getPinned());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增团队成员
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@SysLog("新增团队成员")
|
||||
@PostMapping("/addNodeMember")
|
||||
@Operation(summary = "新增团队成员", description = "新增团队成员")
|
||||
public SdmResponse addNodeMember(@RequestBody SpdmAddNodeMemberReq req) {
|
||||
return nodeService.addNodeMember(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除团队成员
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@SysLog("删除团队成员")
|
||||
@PostMapping("/deleteNodeMember")
|
||||
@Operation(summary = "删除团队成员", description = "删除团队成员")
|
||||
public SdmResponse deleteNodeMember(@RequestBody SpdmDeleteNodeMemberReq req) {
|
||||
return nodeService.deleteNodeMember(req);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.sdm.project.model.req;
|
||||
|
||||
import com.sdm.project.model.bo.TaskNodeTag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SpdmAddNodeMemberReq {
|
||||
|
||||
String projectId;
|
||||
|
||||
List<Long> addNodeMemberIdList;
|
||||
|
||||
}
|
||||
@@ -12,6 +12,9 @@ public class SpdmAddTaskRunReq {
|
||||
@Schema(description = "算例名称")
|
||||
private String runName;
|
||||
|
||||
@Schema(description = "复制的算例ID")
|
||||
private String copyRunId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String description;
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.sdm.project.model.req;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SpdmDeleteNodeMemberReq {
|
||||
|
||||
String projectId;
|
||||
|
||||
List<Long> deleteNodeMemberIdList;
|
||||
|
||||
}
|
||||
@@ -117,4 +117,18 @@ public interface INodeService extends IService<SimulationNode> {
|
||||
|
||||
SdmResponse exportProjectByScript(HttpServletResponse httpservletResponse, ProjectExportExcelFormat projectExportExcelFormat);
|
||||
|
||||
/**
|
||||
* 新增团队成员
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
SdmResponse addNodeMember(SpdmAddNodeMemberReq req);
|
||||
|
||||
/**
|
||||
* 删除团队成员
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
SdmResponse deleteNodeMember(SpdmDeleteNodeMemberReq req);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,10 +30,7 @@ import com.sdm.common.feign.impl.system.SysDeptFeignClientImpl;
|
||||
import com.sdm.common.feign.impl.system.SysUserFeignClientImpl;
|
||||
import com.sdm.common.log.CoreLogger;
|
||||
import com.sdm.common.service.UserNameCacheService;
|
||||
import com.sdm.common.utils.FilesUtil;
|
||||
import com.sdm.common.utils.MdcUtil;
|
||||
import com.sdm.common.utils.PageUtils;
|
||||
import com.sdm.common.utils.RandomUtil;
|
||||
import com.sdm.common.utils.*;
|
||||
import com.sdm.outbridge.entity.*;
|
||||
import com.sdm.outbridge.mode.GetProcessDataReq;
|
||||
import com.sdm.outbridge.mode.HkUploadFileReq;
|
||||
@@ -245,6 +242,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
|
||||
// 用于判断查询事业部用户信息的一些常量
|
||||
private static final String DESIGN_PHASE = "设计";
|
||||
private static final String UN_DESIGN_PHASE = "非设计";
|
||||
private static final String STRUCTURE = "结构仿真";
|
||||
private static final String TECHNOLOGY_CENTER = "技术中心";
|
||||
|
||||
@@ -656,6 +654,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
log.error("待办的创建时间为空,待办id为:{}", todo.getTodoId());
|
||||
}
|
||||
req.setCreateTime(createTime.replace("T", " "));
|
||||
req.setUpdateTime(DateUtils.getCurrentDateTime());
|
||||
req.setDemandSource(SYNC_PROJECT_SOURCE);
|
||||
// if (isConvertibleToInt(todo.getIntroduceBy())) {
|
||||
// req.setCreator(Long.valueOf(todo.getIntroduceBy()));
|
||||
@@ -3122,6 +3121,8 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
spdmProjectNodeEditReq.setPid("");
|
||||
spdmProjectNodeEditReq.setCreateTime(curDateStr);
|
||||
spdmProjectNodeEditReq.setCreator(jobNumber);
|
||||
spdmProjectNodeEditReq.setUpdateTime(DateUtils.getCurrentDateTime());
|
||||
spdmProjectNodeEditReq.setUpdater(jobNumber);
|
||||
spdmProjectNodeEditReq.setTenantId(tenantId);
|
||||
spdmProjectNodeEditReq.setProjectSource(SYNC_PROJECT_SOURCE);
|
||||
spdmProjectNodeEditReq.setProjectId(Math.toIntExact(lyricVProjectToDM.getId()));
|
||||
@@ -4720,25 +4721,17 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
* @param projectUndertaker
|
||||
* @return
|
||||
*/
|
||||
private SysDeptUserResp queryMemberByGroup(String projectUndertaker, String currenPhase) {
|
||||
String deptName;
|
||||
if (DESIGN_PHASE.equals(currenPhase)) {
|
||||
deptName = projectUndertaker + "-" + STRUCTURE;
|
||||
} else {
|
||||
deptName = projectUndertaker + "-" + STRUCTURE + "-" + TECHNOLOGY_CENTER;
|
||||
}
|
||||
// 待调用system的查询部门用户feign接口
|
||||
private SysDeptUserResp queryMemberByGroup(String projectUndertaker, String currentPhase) {
|
||||
DeptQueryReq req = new DeptQueryReq();
|
||||
req.setDeptName(deptName);
|
||||
req.setCurrent(1);
|
||||
req.setSize(1);
|
||||
log.info("listDept params:{}", req);
|
||||
SdmResponse<PageDataResp<List<SysDeptUserResp>>> pageDataRespSdmResponse = sysDeptFeignClient.listDept(req);
|
||||
SysDeptUserResp sysDeptUserResp = null;
|
||||
if (pageDataRespSdmResponse.isSuccess()) {
|
||||
sysDeptUserResp = pageDataRespSdmResponse.getData().getData().get(0);
|
||||
req.setDeptName(projectUndertaker);
|
||||
req.setDiscipline(STRUCTURE);
|
||||
SdmResponse<List<SysDeptUserResp>> resp = sysDeptFeignClient.queryByDeptAndDiscipline(req);
|
||||
List<SysDeptUserResp> userRespList = resp.getData();
|
||||
if (!resp.isSuccess() || CollectionUtils.isEmpty(userRespList)) {
|
||||
return null;
|
||||
}
|
||||
return sysDeptUserResp;
|
||||
String stage = DESIGN_PHASE.equals(currentPhase) ? DESIGN_PHASE : UN_DESIGN_PHASE;
|
||||
return userRespList.stream().filter(userResp -> stage.equals(userResp.getStage())).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
private List<SpdmProjectNodeEditReq> syncProjectInfo(LyricVProjectToDM lyricVProjectToDM, Long tenantId, Long userId, String jobNumber, String userName) {
|
||||
|
||||
@@ -5223,4 +5223,68 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
return SdmResponse.success(resultResponse);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SdmResponse addNodeMember(SpdmAddNodeMemberReq req) {
|
||||
log.info("addNodeMember params:{}",req);
|
||||
String projectId = req.getProjectId();
|
||||
List<Long> addNodeMemberIdList = req.getAddNodeMemberIdList();
|
||||
if (StringUtils.isBlank(projectId) || CollectionUtils.isEmpty(addNodeMemberIdList)) {
|
||||
return SdmResponse.failed("参数不能为空");
|
||||
}
|
||||
Long userId = ThreadLocalContext.getUserId();
|
||||
String currentDateTime = DateUtils.getCurrentDateTime();
|
||||
List<SimulationNodeMember> nodeMemberList = new ArrayList<>();
|
||||
for (Long addNodeMemberId : addNodeMemberIdList) {
|
||||
SimulationNodeMember simulationNodeMember = new SimulationNodeMember();
|
||||
simulationNodeMember.setNodeId(projectId);
|
||||
simulationNodeMember.setUserId(addNodeMemberId);
|
||||
simulationNodeMember.setCreator(userId);
|
||||
simulationNodeMember.setCreateTime(currentDateTime);
|
||||
simulationNodeMember.setType(NodeMemberTypeEnum.PARTICIPANT.getCode());
|
||||
nodeMemberList.add(simulationNodeMember);
|
||||
}
|
||||
simulationNodeMemberService.saveBatch(nodeMemberList);
|
||||
// 批量设置权限
|
||||
List<BatchUpdatePermissionReq.FilePermissionItem> filePermissions = new ArrayList<>();
|
||||
BatchUpdatePermissionReq.FilePermissionItem memberItem = new BatchUpdatePermissionReq.FilePermissionItem();
|
||||
memberItem.setUuid(projectId);
|
||||
Map<Long, Byte> memberPermissions = new HashMap<>();
|
||||
for (Long addNodeMemberId : addNodeMemberIdList) {
|
||||
memberPermissions.put(addNodeMemberId, FilePermissionEnum. BASE.getValue());
|
||||
memberItem.setUserPermissions(memberPermissions);
|
||||
filePermissions.add(memberItem);
|
||||
}
|
||||
// 批量更新权限
|
||||
BatchUpdatePermissionReq batchReq = new BatchUpdatePermissionReq();
|
||||
batchReq.setFilePermissions(filePermissions);
|
||||
CompletableFuture.runAsync(() -> {
|
||||
log.info("新增团队成员,批量更新权限,参数为:{}", batchReq);
|
||||
SdmResponse response = dataFeignClient.batchUpdatePermission(batchReq);
|
||||
log.info("新增团队成员,批量更新权限结果:{}", response);
|
||||
if (!response.isSuccess()) {
|
||||
log.error("新增团队成员,批量更新权限失败:{}", response.getMessage());
|
||||
}
|
||||
});
|
||||
return SdmResponse.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse deleteNodeMember(SpdmDeleteNodeMemberReq req) {
|
||||
String projectId = req.getProjectId();
|
||||
List<Long> deleteNodeMemberIdList = req.getDeleteNodeMemberIdList();
|
||||
if (StringUtils.isBlank(projectId) || CollectionUtils.isEmpty(deleteNodeMemberIdList)) {
|
||||
return SdmResponse.failed("参数不能为空");
|
||||
}
|
||||
simulationNodeMemberService.remove(
|
||||
new LambdaQueryWrapper<SimulationNodeMember>().eq(SimulationNodeMember::getNodeId, projectId)
|
||||
.in(SimulationNodeMember::getUserId,deleteNodeMemberIdList)
|
||||
.eq(SimulationNodeMember::getType,NodeMemberTypeEnum.PARTICIPANT.getCode()));
|
||||
|
||||
for (Long deleteNodeMemberId : deleteNodeMemberIdList) {
|
||||
deletePermission(deleteNodeMemberId, projectId);
|
||||
}
|
||||
return SdmResponse.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -874,11 +874,24 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
if (!this.save(simulationRun)) {
|
||||
return SdmResponse.failed("新建算例失败");
|
||||
} else {
|
||||
// taskId不为null,runId为null,查询所有工况设定的标准指标
|
||||
List<SimulationPerformance> simulationTaskPerformances = simulationPerformanceService.lambdaQuery()
|
||||
.eq(SimulationPerformance::getTaskId, simulationTask.getUuid())
|
||||
.isNull(SimulationPerformance::getRunId)
|
||||
.list();
|
||||
List<SimulationPerformance> simulationTaskPerformances = new ArrayList<>();
|
||||
// 若传了runId,为复制的算例,则复制算例下的指标;
|
||||
if (StringUtils.isNotBlank(req.getCopyRunId())) {
|
||||
simulationTaskPerformances = simulationPerformanceService.lambdaQuery()
|
||||
.eq(SimulationPerformance::getRunId, req.getCopyRunId())
|
||||
.list();
|
||||
} else if (StringUtils.isNotBlank(req.getParentId())) {
|
||||
// 若传了parentId,为子算例,也复制算例下的指标
|
||||
simulationTaskPerformances = simulationPerformanceService.lambdaQuery()
|
||||
.eq(SimulationPerformance::getRunId, req.getParentId())
|
||||
.list();
|
||||
} else {
|
||||
// taskId不为null,runId为null,查询所有工况设定的标准指标
|
||||
simulationTaskPerformances = simulationPerformanceService.lambdaQuery()
|
||||
.eq(SimulationPerformance::getTaskId, simulationTask.getUuid())
|
||||
.isNull(SimulationPerformance::getRunId)
|
||||
.list();
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(simulationTaskPerformances)) {
|
||||
List<SimulationPerformance> runPerformanceList = new ArrayList<>();
|
||||
for (SimulationPerformance performanceBean : simulationTaskPerformances) {
|
||||
@@ -1498,6 +1511,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
|
||||
@Override
|
||||
public SdmResponse deliverableApproveCallback(LaunchApproveReq req) {
|
||||
log.info("[deliverableApproveCallback] req:{}", JSON.toJSONString(req));
|
||||
SdmResponse response = SdmResponse.success();
|
||||
int approveStatus = req.approveStatus;
|
||||
String approveContent = req.approveContents;
|
||||
@@ -1862,9 +1876,10 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
String reportName = "report_" +
|
||||
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) +
|
||||
".docx";
|
||||
// 4. 生成报告名称(使用任务名称作为前缀) 最新确认:跟编辑报告的名称一样 可以覆盖
|
||||
SimulationRun simulationRun = this.lambdaQuery().eq(SimulationRun::getUuid, req.getRunId()).one();
|
||||
SimulationTask task = simulationTaskService.lambdaQuery().eq(SimulationTask::getUuid, simulationRun.getTaskId()).one();
|
||||
String reportName = generateReportName(task.getTaskName());
|
||||
|
||||
// 构建python命令
|
||||
List<String> command = new ArrayList<>();
|
||||
|
||||
@@ -47,10 +47,7 @@ import com.sdm.project.bo.ExportOperate;
|
||||
import com.sdm.project.common.MemberTypeEnum;
|
||||
import com.sdm.project.common.TaskExeStatusEnum;
|
||||
import com.sdm.project.common.TaskQryTypeEnum;
|
||||
import com.sdm.project.dao.SimulationDemandMapper;
|
||||
import com.sdm.project.dao.SimulationNodeMapper;
|
||||
import com.sdm.project.dao.SimulationProjectMapper;
|
||||
import com.sdm.project.dao.SimulationTaskMapper;
|
||||
import com.sdm.project.dao.*;
|
||||
import com.sdm.project.model.bo.*;
|
||||
import com.sdm.project.model.entity.*;
|
||||
import com.sdm.project.model.po.PerformanceNodePo;
|
||||
@@ -2009,6 +2006,7 @@ public class TaskServiceImpl implements ITaskService {
|
||||
|
||||
@Override
|
||||
public SdmResponse analysisPerformanceList(SpdmAnalysisPerformanceListReq req) {
|
||||
Long tenantId = ThreadLocalContext.getTenantId();
|
||||
SpdmAnalysisTaskListReq taskReq = new SpdmAnalysisTaskListReq();
|
||||
BeanUtils.copyProperties(req, taskReq);
|
||||
taskReq.setCurrent(1);
|
||||
@@ -2023,6 +2021,11 @@ public class TaskServiceImpl implements ITaskService {
|
||||
if (performanceTagReq != null) {
|
||||
performanceTagReq.setTaskId(req.getTaskNodeId());
|
||||
}
|
||||
TagReq tagReq = req.getTagReq();
|
||||
String runName = "";
|
||||
if (tagReq != null && StringUtils.isNotBlank(tagReq.getRunName())) {
|
||||
runName = tagReq.getRunName();
|
||||
}
|
||||
SdmResponse response = analysisTaskList(taskReq);
|
||||
if (ObjectUtils.isEmpty(response)) {
|
||||
log.info("指标查询中,未查询到任务1");
|
||||
@@ -2055,6 +2058,19 @@ public class TaskServiceImpl implements ITaskService {
|
||||
log.info("指标查询中,未查询到指标3");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
}else if (StringUtils.isNotBlank(runName)) {
|
||||
List<SimulationRun> runList = simulationRunService.lambdaQuery().like(SimulationRun::getRunName, runName).eq(SimulationRun::getTenantId, tenantId)
|
||||
.list();
|
||||
if (CollectionUtils.isEmpty(runList)) {
|
||||
log.info("runList is empty");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
List<String> runIdList = runList.stream().map(SimulationRun::getUuid).toList();
|
||||
performanceNodePoList = performanceNodePoList.stream().filter(performanceNodePo -> runIdList.contains(performanceNodePo.getRunId())).toList();
|
||||
if (CollectionUtils.isEmpty(performanceNodePoList)) {
|
||||
log.info("指标查询中,未查询到指标3");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
} else {
|
||||
// 不传runId 为导出任务下的指标 筛除掉算例下的指标
|
||||
if (req.getIsExportFlag()) {
|
||||
@@ -2181,10 +2197,10 @@ public class TaskServiceImpl implements ITaskService {
|
||||
continue;
|
||||
}
|
||||
performanceNodePo.setRunName(simulationRun.getRunName());
|
||||
TagReq tagReq = performanceNodePo.getTagReq();
|
||||
if (tagReq != null) {
|
||||
tagReq.setRunId(simulationRun.getUuid());
|
||||
tagReq.setRunName(simulationRun.getRunName());
|
||||
TagReq returnTagReq = performanceNodePo.getTagReq();
|
||||
if (returnTagReq != null) {
|
||||
returnTagReq.setRunId(simulationRun.getUuid());
|
||||
returnTagReq.setRunName(simulationRun.getRunName());
|
||||
}
|
||||
}
|
||||
jsonObject.put("data", performanceList);
|
||||
@@ -2261,6 +2277,10 @@ public class TaskServiceImpl implements ITaskService {
|
||||
req.setToDoMarkerList(Arrays.stream(req.getToDoMarker().split(",")).toList());
|
||||
}
|
||||
|
||||
// 20260416 数据查询中的任务、算例名称需要支持模糊搜索
|
||||
String taskName = tagReq.getTaskName();
|
||||
req.setTaskName(taskName);
|
||||
|
||||
|
||||
String taskNodeId = tagReq.getTaskId();
|
||||
List<SpdmAnalysisTaskVo> taskVoList;
|
||||
@@ -2649,6 +2669,10 @@ public class TaskServiceImpl implements ITaskService {
|
||||
log.info("指标查询中,未查询到任务2");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
TagReq tagReq = req.getTagReq();
|
||||
if (tagReq != null && StringUtils.isNotBlank(tagReq.getRunName())) {
|
||||
req.setRunName(tagReq.getRunName());
|
||||
}
|
||||
List<String> taskIdList = taskVoList.stream().map(SpdmAnalysisTaskVo::getUuid).toList();
|
||||
List<TaskRunPo> runPoList = projectMapper.queryRunListByNodeIdList(taskIdList, req);
|
||||
if (CollectionUtils.isEmpty(runPoList)) {
|
||||
@@ -2660,7 +2684,6 @@ public class TaskServiceImpl implements ITaskService {
|
||||
List<TaskRunPo> filterRunList = new ArrayList<>();
|
||||
|
||||
// 根据runId过滤
|
||||
TagReq tagReq = req.getTagReq();
|
||||
if (tagReq != null && StringUtils.isNotBlank(tagReq.getRunId())) {
|
||||
runPoList = runPoList.stream().filter(run -> tagReq.getRunId().equals(run.getUuid())).collect(Collectors.toList());
|
||||
}
|
||||
@@ -5252,7 +5275,7 @@ public class TaskServiceImpl implements ITaskService {
|
||||
DirNodeInfo taskDirNodeInfo = new DirNodeInfo();
|
||||
taskDirNodeInfo.setUuId(taskId);
|
||||
taskDirNodeInfo.setUuIdOwnType(NodeTypeEnum.TASK.getValue());
|
||||
taskDirNodeInfo.setDirName(taskName);
|
||||
taskDirNodeInfo.setDirName(StringUtils.isNotBlank(taskName) ? taskName : spdmTaskVo.getTaskName());
|
||||
TagReq taskTagReq = new TagReq();
|
||||
BeanUtils.copyProperties(spdmTaskVo,taskTagReq);
|
||||
taskDirNodeInfo.setTagReq(taskTagReq);
|
||||
|
||||
@@ -7,7 +7,7 @@ spring:
|
||||
datasource:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
# 设置连接池能够容纳的最大连接数。建议值:CPU核心数 * 2 + 有效磁盘I/O数。一个常见的经验值是 10-20。
|
||||
@@ -23,18 +23,18 @@ spring:
|
||||
master:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
slave:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
enable: true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.0.88:8848
|
||||
server-addr: 192.168.0.89:8848
|
||||
enabled: true
|
||||
group: DEV_GROUP
|
||||
# username: nacos
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -43,8 +44,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running_debug.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -62,8 +64,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>1GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
|
||||
@@ -976,12 +976,34 @@
|
||||
and sn.nodeName like #{searchKey3}
|
||||
</if>
|
||||
<if test="projectIdList != null and projectIdList.size > 0">
|
||||
or sn.uuid in
|
||||
or (sn.uuid in
|
||||
(
|
||||
<foreach collection='projectIdList' item='projectId' index='index' separator=','>
|
||||
#{projectId}
|
||||
</foreach>
|
||||
)
|
||||
<if test="nodeType != null and nodeType != ''">
|
||||
and sn.nodeType = #{nodeType}
|
||||
</if>
|
||||
<if test="nodeSubType != null and nodeSubType != ''">
|
||||
and sn.nodeSubType = #{nodeSubType}
|
||||
</if>
|
||||
<if test="exeStatus != null and exeStatus != ''">
|
||||
and sn.exe_status = #{exeStatus}
|
||||
</if>
|
||||
<if test="nodeCode != null and nodeCode != ''">
|
||||
<bind name="searchKey4" value="'%' + nodeCode + '%'"/>
|
||||
and sn.nodeCode like #{searchKey4}
|
||||
</if>
|
||||
<if test="manager != null and manager != ''">
|
||||
<bind name="searchKey5" value="'%' + manager + '%'"/>
|
||||
and snm.name like #{searchKey5}
|
||||
</if>
|
||||
<if test="nodeName != null and nodeName != ''">
|
||||
<bind name="searchKey6" value="'%' + nodeName + '%'"/>
|
||||
and sn.nodeName like #{searchKey6}
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
order by IFNULL(pin.pinnedType, 0) desc, pin.pinnedTime desc, sn.create_time desc
|
||||
limit #{pos},#{limit}
|
||||
@@ -1026,12 +1048,34 @@
|
||||
and sn.nodeName like #{searchKey3}
|
||||
</if>
|
||||
<if test="projectIdList != null and projectIdList.size > 0">
|
||||
or sn.uuid in
|
||||
or (sn.uuid in
|
||||
(
|
||||
<foreach collection='projectIdList' item='projectId' index='index' separator=','>
|
||||
#{projectId}
|
||||
</foreach>
|
||||
)
|
||||
<if test="nodeType != null and nodeType != ''">
|
||||
and sn.nodeType = #{nodeType}
|
||||
</if>
|
||||
<if test="nodeSubType != null and nodeSubType != ''">
|
||||
and sn.nodeSubType = #{nodeSubType}
|
||||
</if>
|
||||
<if test="exeStatus != null and exeStatus != ''">
|
||||
and sn.exe_status = #{exeStatus}
|
||||
</if>
|
||||
<if test="nodeCode != null and nodeCode != ''">
|
||||
<bind name="searchKey4" value="'%' + nodeCode + '%'"/>
|
||||
and sn.nodeCode like #{searchKey4}
|
||||
</if>
|
||||
<if test="manager != null and manager != ''">
|
||||
<bind name="searchKey5" value="'%' + manager + '%'"/>
|
||||
and snm.name like #{searchKey5}
|
||||
</if>
|
||||
<if test="nodeName != null and nodeName != ''">
|
||||
<bind name="searchKey6" value="'%' + nodeName + '%'"/>
|
||||
and sn.nodeName like #{searchKey6}
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -690,8 +690,8 @@
|
||||
and STR_TO_DATE(createTime,'%Y-%m-%d %H:%i:%s') <= #{req.endTime}
|
||||
]]>
|
||||
</if>
|
||||
<if test="req.name != null and req.name != ''">
|
||||
<bind name="searchKey1" value="'%' + req.name + '%'"/>
|
||||
<if test="req.runName != null and req.runName != ''">
|
||||
<bind name="searchKey1" value="'%' + req.runName + '%'"/>
|
||||
and runName like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.type != null and req.type != ''">
|
||||
|
||||
@@ -125,10 +125,12 @@ public class SimulationSystemConfigController implements ISysConfigFeignClient {
|
||||
SdmResponse getDictionaryDefineClass(@RequestParam(required = false) String titleName,
|
||||
@RequestParam(required = false) String className,
|
||||
@RequestParam(required = false) String dictName,
|
||||
@RequestParam(required = false) String dictValue
|
||||
@RequestParam(required = false) String dictValue,
|
||||
@RequestParam(required = false) String classType,
|
||||
@RequestParam(required = false) String comment
|
||||
,int current,int size)
|
||||
{
|
||||
return service.queryDictionaryDefineClass(titleName,className,dictName,dictValue,current,size);
|
||||
return service.queryDictionaryDefineClass(titleName,className,dictName,dictValue,classType,comment,current,size);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getDictionaryClassDetail")
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface ISimulationSystemConfigService {
|
||||
|
||||
SdmResponse deleteDictionaryDefineClass(String uuid);
|
||||
|
||||
SdmResponse queryDictionaryDefineClass(String titleName, String className, String dictName, String dictValue, int current, int size);
|
||||
SdmResponse queryDictionaryDefineClass(String titleName, String className, String dictName, String dictValue, String classType, String comment, int current, int size);
|
||||
|
||||
SdmResponse queryDictinaryClassDetail(String uuid);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.sdm.system.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -163,12 +164,15 @@ public class ISysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implem
|
||||
|
||||
// 2. 获取所有在目标日期之前登录的用户及其最后登录时间
|
||||
List<UserLastLoginDto> UserLastLoginDtos = baseMapper.findLastLoginBeforeDate(targetDayEnd, tenantId);
|
||||
log.info("[getHourlyOnlineUsers] UserLastLoginDtos:{}", JSON.toJSONString(UserLastLoginDtos));
|
||||
|
||||
// 3. 获取这些用户在目标日期及之后的退出时间
|
||||
Map<String, LocalDateTime> userLogoutTimes = getUserNextLogoutTimes(
|
||||
UserLastLoginDtos,
|
||||
tenantId
|
||||
);
|
||||
log.info("[getHourlyOnlineUsers] userLogoutTimes:{}", JSON.toJSONString(userLogoutTimes));
|
||||
|
||||
|
||||
// 4. 构建用户会话
|
||||
List<UserSessionDto> activeSessions = buildActiveSessions(UserLastLoginDtos, userLogoutTimes, targetDayStart, targetDayEnd);
|
||||
|
||||
@@ -229,7 +229,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
|
||||
* 查询所有定义的字典分类
|
||||
* @return
|
||||
*/
|
||||
public SdmResponse queryDictionaryDefineClass(String titleName,String className,String dictName,String dictValue,int pageNo,int size)
|
||||
public SdmResponse queryDictionaryDefineClass(String titleName,String className,String dictName,String dictValue,String classType, String comment,int pageNo,int size)
|
||||
{
|
||||
long tenantId = ThreadLocalContext.getTenantId();
|
||||
SdmResponse response = SdmResponse.success();
|
||||
@@ -242,6 +242,14 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
|
||||
{
|
||||
condition += " AND className LIKE '%"+className+"%'";
|
||||
}
|
||||
if(bStringNotBlank(classType))
|
||||
{
|
||||
condition += " AND classType LIKE '%"+classType+"%'";
|
||||
}
|
||||
if(bStringNotBlank(comment))
|
||||
{
|
||||
condition += " AND comment LIKE '%"+comment+"%'";
|
||||
}
|
||||
if(bStringNotBlank(dictName) || bStringNotBlank(dictValue))
|
||||
{
|
||||
List<DataDictionary> allDictionaryData = mapper.getAllDictionaryData(tenantId);
|
||||
@@ -437,8 +445,8 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
|
||||
updateWrapper.set(SysFormConfigure::getComment, configure.getComment());
|
||||
}
|
||||
formConfigureService.update(updateWrapper);
|
||||
// 调用抽取后的管理员批量更新用户配置方法
|
||||
batchUpdateUserConfigure(configure);
|
||||
// 调用抽取后的管理员覆盖用户的配置
|
||||
batchUpdateUserConfigureNew(configure);
|
||||
} else {
|
||||
response = SdmResponse.failed("该表单配置不存在");
|
||||
}
|
||||
@@ -753,8 +761,27 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
|
||||
return SdmResponse.success();
|
||||
}
|
||||
|
||||
// 管理员操作某个表,直接删除用户的自定义配置的数据,这样相当于管理员覆盖了用户的自定义配置
|
||||
private void batchUpdateUserConfigureNew(FormConfigure configure) {
|
||||
// 查询当前租户下关联该主配置的所有用户自定义配置
|
||||
List<SysFormUserConfigure> dbUserConfigs = formUserConfigureService.lambdaQuery()
|
||||
.eq(SysFormUserConfigure::getFormConfigureId, configure.getId())
|
||||
.eq(SysFormUserConfigure::getTenantId, ThreadLocalContext.getTenantId())
|
||||
.list();
|
||||
|
||||
if (CollectionUtils.isNotEmpty(dbUserConfigs)) {
|
||||
// 提取所有 id → 得到 List<Long>
|
||||
List<Long> idList = dbUserConfigs.stream()
|
||||
.map(SysFormUserConfigure::getId) // 取每个对象的 id
|
||||
.collect(Collectors.toList());
|
||||
boolean b = formUserConfigureService.removeBatchByIds(idList);
|
||||
log.info("batchUpdateUserConfigureNew user config delete table name {},result:{}", configure.getFormName(),b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员批量更新关联的用户自定义表单配置
|
||||
* 管理员批量更新关联的用户自定义表单配置 V1 版本,管理员修改后,管理员有权限覆盖规定的3个字段之外的字段,用户自定义的三个字段还保留,字段删除,名称修改除外
|
||||
* 2026-04-15 该方法暂时废弃
|
||||
* @param configure 表单配置参数
|
||||
*/
|
||||
private void batchUpdateUserConfigure(FormConfigure configure) {
|
||||
|
||||
@@ -7,7 +7,7 @@ spring:
|
||||
datasource:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
# 设置连接池能够容纳的最大连接数。建议值:CPU核心数 * 2 + 有效磁盘I/O数。一个常见的经验值是 10-20。
|
||||
@@ -23,18 +23,18 @@ spring:
|
||||
master:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
slave:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
enable: true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.0.88:8848
|
||||
server-addr: 192.168.0.89:8848
|
||||
group: DEV_GROUP
|
||||
# server-addr: localhost:8848
|
||||
enabled: true
|
||||
@@ -140,7 +140,7 @@ tenantSystem:
|
||||
|
||||
|
||||
cid:
|
||||
url: http://192.168.0.88:7101 # 请根据实际CID服务地址修改
|
||||
url: http://192.168.0.89:7101 # 请根据实际CID服务地址修改
|
||||
## url: http://192.168.65.75:8989/honeycom-spdm # 朱欣茹地址
|
||||
user:
|
||||
listUser: /spdm-user/listUser
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -40,8 +41,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
|
||||
@@ -8,7 +8,7 @@ spring:
|
||||
datasource:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
# 设置连接池能够容纳的最大连接数。建议值:CPU核心数 * 2 + 有效磁盘I/O数。一个常见的经验值是 10-20。
|
||||
@@ -24,18 +24,18 @@ spring:
|
||||
master:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
slave:
|
||||
username: root
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.0.88:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
jdbc-url: jdbc:mysql://192.168.0.89:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
enable: true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.0.88:8848
|
||||
server-addr: 192.168.0.89:8848
|
||||
group: DEV_GROUP
|
||||
# server-addr: 127.0.0.1:8848
|
||||
enabled: true
|
||||
@@ -46,7 +46,7 @@ spring:
|
||||
# Redis默认情况下有16个分片(库),这里配置具体使用的分片,默认是0
|
||||
database: 0
|
||||
# redis服务器地址(填写自己的服务器地址)
|
||||
host: 192.168.0.88
|
||||
host: 192.168.0.89
|
||||
# redis端口(默认6379)
|
||||
port: 6379
|
||||
#redis连接超时等待,10秒
|
||||
@@ -119,7 +119,7 @@ file:
|
||||
rootPath: /data/home/sdm
|
||||
scriptPath : /opt/script
|
||||
approve:
|
||||
replyUrl: http:192.168.0.88:7102/simulation/task/taskpool/approveHandleNotice
|
||||
replyUrl: http:192.168.0.89:7102/simulation/task/taskpool/approveHandleNotice
|
||||
#logging:
|
||||
# config: ./config/logback.xml
|
||||
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/running.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>3GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
@@ -40,8 +41,8 @@
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/core.log.%d{yyyy-MM-dd}.%i.log.gz</FileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<TotalSizeCap>2GB</TotalSizeCap>
|
||||
<maxHistory>15</maxHistory>
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>[%X{traceId}] %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%15.15t] %X{callerInfo} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
|
||||
Reference in New Issue
Block a user