增加配置批量审核不通过和删除操作

除高级功能菜单下配置
This commit is contained in:
zhangwenqing
2019-04-12 19:10:21 +08:00
parent 47029f0eaf
commit 84f5646f86
23 changed files with 832 additions and 232 deletions

View File

@@ -87,8 +87,26 @@ public class DdosCfgController extends BaseController {
@RequestMapping(value = { "/delete" })
@RequiresPermissions(value = { "ddos:ip:config" })
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) {
ddosCfgService.delete(isAudit, isValid, ids, functionId);
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")DdosIpCfg cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
ddosCfgService.delete(isAudit, isValid, ids, functionId);
addMessage(redirectAttributes, "success", "delete_success");
}else {
// 批量删除
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
deleteAll(searchPage, functionId, cfg);
}
} catch (Exception e) {
logger.error("配置删除失败:", e);
if (e instanceof MaatConvertException) {
addMessage(redirectAttributes, "error", "request_service_failed");
} else {
addMessage(redirectAttributes, "error", "delete_failed");
}
}
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + functionId;
}