@@ -6,8 +6,8 @@ spring:
|
||||
name: data
|
||||
datasource:
|
||||
username: root
|
||||
password: ldy123456
|
||||
jdbc-url: jdbc:mysql://localhost:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.65.161: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。
|
||||
@@ -22,19 +22,19 @@ spring:
|
||||
connection-timeout: 30000 # 30s
|
||||
master:
|
||||
username: root
|
||||
password: ldy123456
|
||||
jdbc-url: jdbc:mysql://localhost:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.65.161: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: ldy123456
|
||||
jdbc-url: jdbc:mysql://localhost:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.65.161: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: localhost:8848
|
||||
server-addr: 192.168.65.161:8848
|
||||
group: LOCAL_GROUP
|
||||
enabled: true
|
||||
servlet:
|
||||
|
||||
@@ -2123,20 +2123,20 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
String[] workspaceNode1 = o1.getNodeCode().split("-");
|
||||
String[] workspaceNode2 = o2.getNodeCode().split("-");
|
||||
|
||||
if (!isInteger(o1.getNodeCode()) || !isInteger(o2.getNodeCode())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (workspaceNode1.length != 2 || workspaceNode2.length != 2) {
|
||||
return o1.getNodeCode().compareTo(o2.getNodeCode());
|
||||
}
|
||||
if (!isInteger(workspaceNode1[0]) || !isInteger(workspaceNode2[0])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int prefix1 = Integer.parseInt(workspaceNode1[0]);
|
||||
int prefix2 = Integer.parseInt(workspaceNode2[0]);
|
||||
if (prefix1 != prefix2) {
|
||||
return Integer.compare(prefix1, prefix2);
|
||||
}
|
||||
if (!isInteger(workspaceNode1[1]) || !isInteger(workspaceNode2[1])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int suffix1 = Integer.parseInt(workspaceNode1[1]);
|
||||
int suffix2 = Integer.parseInt(workspaceNode2[1]);
|
||||
return Integer.compare(suffix1, suffix2);
|
||||
@@ -2144,7 +2144,8 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
ProjectNodePo specialWorkspaceNode = workspaceNodeList.stream().filter(workspaceNode -> workspaceNode.getNodeCode().contains("-M")).findFirst().orElse(null);
|
||||
log.info("specialWorkspaceNode为:{}", specialWorkspaceNode);
|
||||
if (specialWorkspaceNode != null) {
|
||||
sortWorkspaceNodeList.add(0, specialWorkspaceNode);
|
||||
sortWorkspaceNodeList.add(specialWorkspaceNode);
|
||||
moveTargetToFirst(sortWorkspaceNodeList, specialWorkspaceNode.getUuid());
|
||||
}
|
||||
return sortWorkspaceNodeList;
|
||||
}
|
||||
|
||||
@@ -817,20 +817,20 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
||||
String[] workspaceNode1 = o1.getNodeCode().split("-");
|
||||
String[] workspaceNode2 = o2.getNodeCode().split("-");
|
||||
|
||||
if (!isInteger(o1.getNodeCode()) || !isInteger(o2.getNodeCode())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (workspaceNode1.length != 2 || workspaceNode2.length != 2) {
|
||||
return o1.getNodeCode().compareTo(o2.getNodeCode());
|
||||
}
|
||||
if (!isInteger(workspaceNode1[0]) || !isInteger(workspaceNode2[0])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int prefix1 = Integer.parseInt(workspaceNode1[0]);
|
||||
int prefix2 = Integer.parseInt(workspaceNode2[0]);
|
||||
if (prefix1 != prefix2) {
|
||||
return Integer.compare(prefix1, prefix2);
|
||||
}
|
||||
if (!isInteger(workspaceNode1[1]) || !isInteger(workspaceNode2[1])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int suffix1 = Integer.parseInt(workspaceNode1[1]);
|
||||
int suffix2 = Integer.parseInt(workspaceNode2[1]);
|
||||
return Integer.compare(suffix1, suffix2);
|
||||
|
||||
@@ -795,23 +795,23 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
|
||||
workspaceNodeList.sort((o1, o2) -> {
|
||||
|
||||
if (!isInteger(o1.getNodeCode()) || !isInteger(o2.getNodeCode())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
String[] workspaceNode1 = o1.getNodeCode().split("-");
|
||||
String[] workspaceNode2 = o2.getNodeCode().split("-");
|
||||
|
||||
if (workspaceNode1.length != 2 || workspaceNode2.length != 2) {
|
||||
return o1.getNodeCode().compareTo(o2.getNodeCode());
|
||||
}
|
||||
if (!isInteger(workspaceNode1[0]) || !isInteger(workspaceNode2[0])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int prefix1 = Integer.parseInt(workspaceNode1[0]);
|
||||
int prefix2 = Integer.parseInt(workspaceNode2[0]);
|
||||
if (prefix1 != prefix2) {
|
||||
return Integer.compare(prefix1, prefix2);
|
||||
}
|
||||
if (!isInteger(workspaceNode1[1]) || !isInteger(workspaceNode2[1])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int suffix1 = Integer.parseInt(workspaceNode1[1]);
|
||||
int suffix2 = Integer.parseInt(workspaceNode2[1]);
|
||||
return Integer.compare(suffix1, suffix2);
|
||||
@@ -819,7 +819,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
NodeAllBase specialWorkspaceNode = workspaceNodeList.stream().filter(workspaceNode -> workspaceNode.getNodeCode().contains("-M")).findFirst().orElse(null);
|
||||
log.info("specialWorkspaceNode为:{}",specialWorkspaceNode);
|
||||
if (specialWorkspaceNode != null) {
|
||||
workspaceNodeList.add(0, specialWorkspaceNode);
|
||||
moveTargetToFirst(workspaceNodeList,specialWorkspaceNode.getUuid());
|
||||
}
|
||||
projectNodePo.setChildren(workspaceNodeList);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ spring:
|
||||
name: project
|
||||
datasource:
|
||||
username: root
|
||||
password: ldy123456
|
||||
jdbc-url: jdbc:mysql://localhost:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.65.161: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。
|
||||
@@ -22,19 +22,19 @@ spring:
|
||||
connection-timeout: 30000 # 30s
|
||||
master:
|
||||
username: root
|
||||
password: ldy123456
|
||||
jdbc-url: jdbc:mysql://localhost:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.65.161: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: ldy123456
|
||||
jdbc-url: jdbc:mysql://localhost:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
password: mysql
|
||||
jdbc-url: jdbc:mysql://192.168.65.161: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: localhost:8848
|
||||
server-addr: 192.168.65.161:8848
|
||||
enabled: true
|
||||
group: LOCAL_GROUP
|
||||
# username: nacos
|
||||
|
||||
Reference in New Issue
Block a user