IP白名单配置新增直接生效(需要分配权限,此功能才可开启).
ip白名单配置生效状态下可修改(修改delRow的判断才可开启此功能).
This commit is contained in:
@@ -194,7 +194,7 @@ public class IpController extends BaseController{
|
||||
/*if(StringUtils.isNoneBlank(entity.getUserRegion4())) {
|
||||
ipCfgService.auditAsnCfg(entity, isAudit);
|
||||
}else {*/
|
||||
ipCfgService.auditIpCfg(entity,isAudit);
|
||||
ipCfgService.auditIpCfg(entity,isAudit,Constants.INSERT_ACTION);
|
||||
/*}*/
|
||||
addMessage(redirectAttributes,"success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -97,9 +97,24 @@ public class WhiteListController extends CommonController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "ip/save" })
|
||||
public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||
public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes,
|
||||
String ids, CfgIndexInfo entity) {
|
||||
ipCfgService.saveIpCfg(entity);
|
||||
try {
|
||||
ipCfgService.saveIpCfg(entity);
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("ip白名单配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("ip白名单配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + entity.getFunctionId();
|
||||
}
|
||||
|
||||
@@ -115,11 +130,9 @@ public class WhiteListController extends CommonController {
|
||||
entity = ipCfgService.getIpPortCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
ipCfgService.auditIpCfg(entity, isAudit);
|
||||
ipCfgService.auditIpCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.info("ip配置下发失败:" + e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user