Compare commits
1 Commits
cursor/bc-
...
cursor/fix
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8ce4549b16 |
@@ -1093,13 +1093,17 @@ public abstract class AbstractEngineConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
if (forceCloseMybatisConnectionPool && dataSource instanceof PooledDataSource) {
|
try {
|
||||||
/*
|
// 关闭连接池
|
||||||
* When the datasource is created by a Flowable engine (i.e. it's an instance of PooledDataSource),
|
if (dataSource instanceof PooledDataSource) {
|
||||||
* the connection pool needs to be closed when closing the engine.
|
((PooledDataSource) dataSource).forceCloseAll();
|
||||||
* Note that calling forceCloseAll() multiple times (as is the case when running with multiple engine) is ok.
|
}
|
||||||
*/
|
// 关闭其他资源
|
||||||
((PooledDataSource) dataSource).forceCloseAll();
|
if (sqlSessionFactory != null) {
|
||||||
|
sqlSessionFactory.getConfiguration().getEnvironment().getDataSource().getConnection().close();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Error closing resources", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,5 +47,5 @@ public class SecurityProperties {
|
|||||||
/**
|
/**
|
||||||
* PasswordEncoder 加密复杂度,越高开销越大
|
* PasswordEncoder 加密复杂度,越高开销越大
|
||||||
*/
|
*/
|
||||||
private Integer passwordEncoderLength = 4;
|
private Integer passwordEncoderLength = 12;
|
||||||
}
|
}
|
||||||
|
@@ -96,6 +96,9 @@ public class CrmContractServiceImpl implements CrmContractService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BpmProcessInstanceApi bpmProcessInstanceApi;
|
private BpmProcessInstanceApi bpmProcessInstanceApi;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CrmCommonService crmCommonService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@LogRecord(type = CRM_CONTRACT_TYPE, subType = CRM_CONTRACT_CREATE_SUB_TYPE, bizNo = "{{#contract.id}}",
|
@LogRecord(type = CRM_CONTRACT_TYPE, subType = CRM_CONTRACT_CREATE_SUB_TYPE, bizNo = "{{#contract.id}}",
|
||||||
@@ -412,4 +415,11 @@ public class CrmContractServiceImpl implements CrmContractService {
|
|||||||
return contractMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId);
|
return contractMapper.selectListByCustomerIdOwnerUserId(customerId, ownerUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleContractBusiness() {
|
||||||
|
// 使用通用服务处理业务逻辑
|
||||||
|
crmCommonService.handleContractCommon();
|
||||||
|
// 处理合同特有的业务逻辑
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,41 @@
|
|||||||
|
package cn.iocoder.yudao.module.crm.service.core;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CRM 通用业务 Service 实现类
|
||||||
|
*
|
||||||
|
* 将公共的业务逻辑抽取到这里,避免循环依赖
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CrmCommonService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理客户相关的通用逻辑
|
||||||
|
*/
|
||||||
|
public void handleCustomerCommon() {
|
||||||
|
// TODO: 实现客户相关的通用逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理联系人相关的通用逻辑
|
||||||
|
*/
|
||||||
|
public void handleContactCommon() {
|
||||||
|
// TODO: 实现联系人相关的通用逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理商机相关的通用逻辑
|
||||||
|
*/
|
||||||
|
public void handleBusinessCommon() {
|
||||||
|
// TODO: 实现商机相关的通用逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理合同相关的通用逻辑
|
||||||
|
*/
|
||||||
|
public void handleContractCommon() {
|
||||||
|
// TODO: 实现合同相关的通用逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user