故障修复
This commit is contained in:
@@ -57,6 +57,10 @@ public class FlowServiceImpl extends BaseService implements IFlowService {
|
||||
{
|
||||
response = SdmResponse.failed("添加流程模版草稿失败");
|
||||
}
|
||||
else
|
||||
{
|
||||
response.setData(flowTemplate);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
@@ -97,6 +101,27 @@ public class FlowServiceImpl extends BaseService implements IFlowService {
|
||||
@Override
|
||||
public SdmResponse updateFlowTemplateDraft(SimulationFlowTemplate flowTemplate) {
|
||||
SdmResponse response = SdmResponse.success();
|
||||
String queryConditon = "uuid='"+flowTemplate.uuid+"'";
|
||||
List<SimulationFlowTemplate> oldTemplates = flowMapper.queryFlowTemplateByCondition(queryConditon);
|
||||
if(!oldTemplates.isEmpty())
|
||||
{
|
||||
SimulationFlowTemplate oldTemplate = oldTemplates.get(0);
|
||||
//模版名称进行修改
|
||||
if(!oldTemplate.getTemplateName().equals(flowTemplate.getTemplateName()))
|
||||
{
|
||||
String condition = "templateName='"+flowTemplate.templateName+"'";
|
||||
List<SimulationFlowTemplate> templates = flowMapper.queryFlowTemplateByCondition(condition);
|
||||
if(!templates.isEmpty())
|
||||
{
|
||||
response = SdmResponse.failed("仿真流程模版名称已存在");
|
||||
return response;
|
||||
}
|
||||
else
|
||||
{
|
||||
flowMapper.updateFlowTemplateName(oldTemplate.templateName,flowTemplate.templateName);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flowMapper.updateFlowTemplate(flowTemplate) <= 0)
|
||||
{
|
||||
response = SdmResponse.failed("更新路程模版草稿失败");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 7103
|
||||
port: 7107
|
||||
|
||||
spring:
|
||||
application:
|
||||
@@ -10,16 +10,11 @@ spring:
|
||||
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。
|
||||
maximum-pool-size: 20
|
||||
# 连接池在空闲时保持的最小连接数。
|
||||
minimum-idle: 5
|
||||
# 一个连接在被标记为空闲之前可以保持空闲状态的最长时间(毫秒)。当连接的空闲时间超过此值后,它可能会被连接池 evict(驱逐)。
|
||||
idle-timeout: 60000 # 1 min
|
||||
# 一个连接从被创建开始,其生命周期的最大时长(毫秒)。HikariCP的默认值就是30分钟,这是一个非常合理的设置。
|
||||
max-lifetime: 1800000 # 30 min(Hikari 默认)
|
||||
# 应用程序尝试从连接池获取一个连接时,等待的最长时间(毫秒)。建议值:30-60秒。
|
||||
connection-timeout: 30000 # 30s
|
||||
maximum-pool-size: 450 # 连接池最大连接数(关键!)
|
||||
minimum-idle: 50 # 最小空闲连接数(与最大一致,避免频繁创建销毁)
|
||||
idle-timeout: 300000 # 空闲连接超时时间(5分钟)
|
||||
max-lifetime: 600000 # 连接最大存活时间(10分钟)
|
||||
connection-timeout: 30000 # 获取连接超时时间(30秒,避免线程阻塞)
|
||||
master:
|
||||
username: root
|
||||
password: mysql
|
||||
@@ -38,7 +33,6 @@ spring:
|
||||
group: DEV_GROUP
|
||||
# server-addr: 127.0.0.1:8848
|
||||
enabled: true
|
||||
namespace: 3
|
||||
# username: nacos
|
||||
# password: ENC(+QKYnI6gAYu1SbLaZQTkZA==)
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user