stream、DDOS和高级功能模块对某些用户的配置不经过审核直接生效及生效中的配置进行修改的功能
This commit is contained in:
@@ -71,15 +71,19 @@ public class DdosCfgController extends BaseController {
|
||||
@ModelAttribute("cfg") DdosIpCfg cfg, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
ddosCfgService.saveOrUpdate(cfg);
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("信息保存失败", e);
|
||||
e.printStackTrace();
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("DDOS配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("DDOS配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + cfg.getFunctionId();
|
||||
@@ -120,7 +124,7 @@ public class DdosCfgController extends BaseController {
|
||||
Date auditTime = new Date();
|
||||
for (String id : idArray) {
|
||||
try {
|
||||
ddosCfgService.audit(isAudit, isValid, functionId, id, auditTime);
|
||||
ddosCfgService.audit(isAudit, isValid, functionId, id, auditTime,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user