stream、DDOS和高级功能模块对某些用户的配置不经过审核直接生效及生效中的配置进行修改的功能
This commit is contained in:
@@ -219,15 +219,19 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("saveAppPolicyCfg failed", e);
|
||||
e.printStackTrace();
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("app 协议配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("app 协议配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/app/policyCfgList?functionId=" + entity.getFunctionId();
|
||||
@@ -255,12 +259,10 @@ public class AppCfgController extends BaseController {
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||
try {
|
||||
appCfgService.auditAppPolicyCfg(entity, isAudit);
|
||||
appCfgService.auditAppPolicyCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -394,15 +396,19 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppIpCfg(entity);
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("saveAppIpCfg failed", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
}catch (MaatConvertException e) {
|
||||
logger.error("APP IP配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("APP IP配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/app/ipCfgList?functionId=" + entity.getFunctionId();
|
||||
@@ -432,10 +438,7 @@ public class AppCfgController extends BaseController {
|
||||
entity = appCfgService.getAppIpCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setTableName(AppIpCfg.getTablename());
|
||||
if (dataMap.containsKey(entity.getCompileId())) {
|
||||
dataMap.get(entity.getCompileId()).add(entity);
|
||||
} else {
|
||||
@@ -737,14 +740,19 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppDomainCfg(entity);
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("APP域名配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("APP域名配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/app/domainCfgList?functionId=" + entity.getFunctionId();
|
||||
@@ -772,11 +780,9 @@ public class AppCfgController extends BaseController {
|
||||
entity = appCfgService.getAppDomainCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppDomainCfg(entity, isAudit);
|
||||
appCfgService.auditAppDomainCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -1507,18 +1513,19 @@ public class AppCfgController extends BaseController {
|
||||
entity.setCfgKeywords(entity.getCfgKeywords());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppTopicDomainCfg(entity);
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.info("app主题网站配置下发失败:" + e.getMessage());
|
||||
;
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
logger.error("app主题网站配置下发失败", e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("APP主题网站配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("APP主题网站配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/app/topicDomainCfgList?functionId=" + entity.getFunctionId();
|
||||
@@ -1546,11 +1553,9 @@ public class AppCfgController extends BaseController {
|
||||
entity = appCfgService.getAppTopicDomainCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppTopicDomainCfg(entity, isAudit);
|
||||
appCfgService.auditAppTopicDomainCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("app主题网站配置下发失败", e);
|
||||
|
||||
Reference in New Issue
Block a user