未验证 提交 1384d8f4 编写于 作者: Y Yann Ann 提交者: GitHub

set @Transactional rollbackFor (#12445)

上级 b5193ee4
...@@ -142,7 +142,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService ...@@ -142,7 +142,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService
* @throws Exception exception * @throws Exception exception
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public Map<String, Object> createTenant(User loginUser, public Map<String, Object> createTenant(User loginUser,
String tenantCode, String tenantCode,
int queueId, int queueId,
...@@ -233,9 +233,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService ...@@ -233,9 +233,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService
updateTenantValid(existsTenant, updateTenant); updateTenantValid(existsTenant, updateTenant);
// updateProcessInstance tenant // updateProcessInstance tenant
/** // if the tenant code is modified, the original resource needs to be copied to the new tenant.
* if the tenant code is modified, the original resource needs to be copied to the new tenant.
*/
if (!Objects.equals(existsTenant.getTenantCode(), updateTenant.getTenantCode()) if (!Objects.equals(existsTenant.getTenantCode(), updateTenant.getTenantCode())
&& PropertyUtils.getResUploadStartupState()) { && PropertyUtils.getResUploadStartupState()) {
storageOperate.createTenantDirIfNotExists(tenantCode); storageOperate.createTenantDirIfNotExists(tenantCode);
...@@ -260,7 +258,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService ...@@ -260,7 +258,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService
* @throws Exception exception * @throws Exception exception
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public Map<String, Object> deleteTenantById(User loginUser, int id) throws Exception { public Map<String, Object> deleteTenantById(User loginUser, int id) throws Exception {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
...@@ -387,7 +385,6 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService ...@@ -387,7 +385,6 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService
/** /**
* Make sure tenant with given name exists, and create the tenant if not exists * Make sure tenant with given name exists, and create the tenant if not exists
*
* ONLY for python gateway server, and should not use this in web ui function * ONLY for python gateway server, and should not use this in web ui function
* *
* @param tenantCode tenant code * @param tenantCode tenant code
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册