目录默认节点被删除时,重置默认节点为根节点
parent
7d88827415
commit
3f5e885e82
|
@ -415,7 +415,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
|
||||
Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader);
|
||||
transmitRequest(parentPlatform, request);
|
||||
Thread.sleep(100);
|
||||
Thread.sleep(10);
|
||||
} catch (SipException | ParseException | InvalidArgumentException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
@ -459,7 +459,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
|
||||
Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader);
|
||||
transmitRequest(parentPlatform, request);
|
||||
Thread.sleep(100);
|
||||
Thread.sleep(200);
|
||||
} catch (SipException | ParseException | InvalidArgumentException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
|
|
@ -407,6 +407,17 @@ public class PlatformController {
|
|||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("删除目录,{}", id);
|
||||
}
|
||||
// 如果删除的是默认目录则根目录设置为默认目录
|
||||
PlatformCatalog catalog = storager.getCatalog(id);
|
||||
if (catalog != null) {
|
||||
ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(catalog.getPlatformId());
|
||||
if (parentPlatform != null) {
|
||||
if (id.equals(parentPlatform.getCatalogId())) {
|
||||
storager.setDefaultCatalog(parentPlatform.getServerGBId(), parentPlatform.getServerGBId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int delResult = storager.delCatalog(id);
|
||||
WVPResult<List<PlatformCatalog>> result = new WVPResult<>();
|
||||
result.setCode(0);
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
spring:
|
||||
# 上传文件大小限制
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 100MB
|
||||
# REDIS数据库配置
|
||||
redis:
|
||||
# [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
spring:
|
||||
# 上传文件大小限制
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 100MB
|
||||
# REDIS数据库配置
|
||||
redis:
|
||||
# [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1
|
||||
|
|
|
@ -161,6 +161,9 @@ export default {
|
|||
console.log("移除成功")
|
||||
node.parent.loaded = false
|
||||
node.parent.expand();
|
||||
if(this.defaultCatalogId === id) {
|
||||
this.defaultCatalogId = this.platformId;
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
|
|
Loading…
Reference in New Issue