From 8087741d0527188a5ffe003c34d58f2eddb33f02 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Wed, 22 Aug 2018 15:20:14 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=9F=BA=E7=A1=80=E5=8D=8F=E8=AE=AE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=B3=E9=94=AE=E5=AD=97=E5=9F=9F=EF=BC=8Cdolog?= =?UTF-8?q?=EF=BC=8C=E9=85=8D=E7=BD=AEid=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/AppCfgController.java | 10 ++ .../BasicProtocolController.java | 54 ++++++- .../nis/web/dao/configuration/AppCfgDao.xml | 76 +++------- .../service/configuration/AppCfgService.java | 59 +++++++- .../WEB-INF/views/cfg/app/appPolicyIpList.jsp | 55 +++++++ .../WEB-INF/views/cfg/basicprotocol/form.jsp | 141 ++++++++++++++---- .../views/cfg/basicprotocol/ipList.jsp | 54 +++++++ .../WEB-INF/views/cfg/basicprotocol/list.jsp | 16 ++ 8 files changed, 376 insertions(+), 89 deletions(-) diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index 3bea15d32..b619ddb04 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -25,6 +25,7 @@ import com.nis.domain.configuration.AppIpCfg; import com.nis.domain.configuration.AppPolicyCfg; import com.nis.domain.configuration.AppSslCertCfg; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.specific.SpecificServiceCfg; import com.nis.exceptions.MaatConvertException; import com.nis.util.Constants; @@ -102,6 +103,15 @@ public class AppCfgController extends BaseController { } } } + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){ + if(!ntc.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",ntc.getCfgType()}); + cfgType = ntc.getCfgType(); + } + } + } model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); diff --git a/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java b/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java index df9e59606..5e829a49b 100644 --- a/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java +++ b/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java @@ -18,7 +18,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.nis.domain.Page; import com.nis.domain.configuration.AppPolicyCfg; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.specific.SpecificServiceCfg; +import com.nis.exceptions.CallExternalProceduresException; import com.nis.exceptions.MaatConvertException; import com.nis.util.Constants; import com.nis.web.controller.BaseController; @@ -72,7 +74,16 @@ public class BasicProtocolController extends BaseController { } } } - model.addAttribute("_cfg", cfg); + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){ + if(!ntc.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",ntc.getCfgType()}); + cfgType = ntc.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); return "/cfg/basicprotocol/ipList"; @@ -115,9 +126,16 @@ public class BasicProtocolController extends BaseController { entity.setAppCode(specificService.getSpecServiceCode()); } appCfgService.saveOrUpdateAppPolicyCfg(entity); + addMessage(redirectAttributes,"save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, e.getMessage()); + logger.error("基础协议信息保存失败",e); + if(e instanceof MaatConvertException||e instanceof CallExternalProceduresException) { +// addMessage(redirectAttributes,e.getMessage()); + throw new MaatConvertException(""); + }else { + addMessage(redirectAttributes,"save_failed"); + } } return "redirect:" + adminPath +"/basicprotocol/list?functionId="+entity.getFunctionId(); @@ -146,10 +164,18 @@ public class BasicProtocolController extends BaseController { entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL); try { appCfgService.auditAppPolicyCfg(entity,isAudit); - } catch (MaatConvertException e) { - e.printStackTrace(); - logger.info("app策略配置下发失败:"+e.getMessage()); - addMessage(redirectAttributes, e.getMessage()); + addMessage(redirectAttributes,"audit_success"); + } catch (Exception e) { + if(e instanceof MaatConvertException) { + e.printStackTrace(); + logger.info("app策略配置下发失败:"+e.getMessage());; + throw new MaatConvertException(""); + }else { + e.printStackTrace(); + logger.error("auditAvAudioSignSample failed",e); + addMessage(redirectAttributes,"audit_failed"); + } + } } return "redirect:" + adminPath +"/basicprotocol/list?functionId="+functionId; @@ -163,8 +189,20 @@ public class BasicProtocolController extends BaseController { */ @RequestMapping(value = {"updateValid"}) @RequiresPermissions(value={"basicprotocol:config"}) - public String updateAppPolicyCfgValid(Integer isValid,String ids,Integer functionId) { - appCfgService.updateAppPolicyCfgValid(isValid,ids,functionId); + public String updateAppPolicyCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { + try { + appCfgService.updateAppPolicyCfgValid(isValid,ids,functionId); + addMessage(redirectAttributes,"delete_success"); + } catch (Exception e) { + logger.error("基础协议信息保存失败",e); + if(e instanceof MaatConvertException||e instanceof CallExternalProceduresException) { + e.printStackTrace(); + throw new MaatConvertException(""); + }else { + e.printStackTrace(); + addMessage(redirectAttributes,"delete_failed"); + } + } return "redirect:" + adminPath +"/basicprotocol/list?functionId="+functionId; } } diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index 46627a937..145b590cd 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -28,13 +28,13 @@ - + @@ -71,7 +71,6 @@ - @@ -104,7 +103,6 @@ - @@ -135,7 +133,6 @@ - @@ -166,7 +163,6 @@ - @@ -304,7 +300,7 @@ r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID, r.CFG_TYPE,r.CFG_REGION_CODE,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.USER_REGION1,r.USER_REGION2, - r.USER_REGION3,r.USER_REGION4,r.USER_REGION5 + r.USER_REGION3,r.USER_REGION4,r.USER_REGION5,r.do_log @@ -313,7 +309,7 @@ r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, r.IP_TYPE, r.IP_PATTERN, r.SRC_IP_ADDRESS,r.DEST_IP_ADDRESS, r.PORT_PATTERN,r.SRC_PORT,DEST_PORT, - r.DIRECTION,r.PROTOCOL,r.DO_LOG + r.DIRECTION,r.PROTOCOL @@ -321,7 +317,7 @@ r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, - r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG + r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN @@ -329,7 +325,7 @@ r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, - r.DOMAIN,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG + r.DOMAIN,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN @@ -337,7 +333,7 @@ r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, - r.BYTES,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG + r.BYTES,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN @@ -481,6 +477,9 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} + + + AND r.COMPILE_ID=#{compileId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -619,9 +618,6 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - - AND r.compile_id=#{compileId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -744,9 +740,6 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - - AND r.compile_id=#{compileId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -847,9 +840,6 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - - AND r.compile_id=#{compileId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -947,9 +937,6 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - - AND r.compile_id=#{compileId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -1140,9 +1127,6 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - - AND r.compile_id=#{compileId,jdbcType=INTEGER} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -1244,9 +1228,6 @@ AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - - AND r.compile_id=#{compileId,jdbcType=BIGINT} AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') @@ -1340,12 +1321,12 @@ SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID, CFG_TYPE,CFG_REGION_CODE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,USER_REGION1 - ,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5 + ,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5,DO_LOG )values ( , #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} ,#{userRegion1,jdbcType=VARCHAR} ,#{userRegion2,jdbcType=VARCHAR} ,#{userRegion3,jdbcType=VARCHAR} - ,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR} + ,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR} ,#{doLog,jdbcType=INTEGER} ) @@ -1358,12 +1339,12 @@ SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT, - DIRECTION,PROTOCOL,DO_LOG + DIRECTION,PROTOCOL )values ( , #{ipType,jdbcType=INTEGER}, #{ipPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR}, #{portPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER}, - #{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} + #{protocol,jdbcType=INTEGER} ) @@ -1375,11 +1356,11 @@ CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, - DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG + DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN )values ( , - #{district,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER}, - #{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} + #{district,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR}, + #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} ) @@ -1391,11 +1372,11 @@ CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, - DOMAIN,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG + DOMAIN,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN )values ( , - #{domain,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER}, - #{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} + #{domain,jdbcType=VARCHAR}, + #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} ) @@ -1407,11 +1388,11 @@ CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, - BYTES,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG + BYTES,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN )values ( , - #{bytes,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER}, - #{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} + #{bytes,jdbcType=VARCHAR}, + #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} ) @@ -1629,6 +1610,7 @@ --> USER_REGION1 =#{userRegion5,jdbcType=VARCHAR}, + DO_LOG=#{doLog,jdbcType=INTEGER} where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -1740,9 +1722,6 @@ protocol = #{protocol,jdbcType=INTEGER}, - - do_log = #{doLog,jdbcType=INTEGER}, - where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -1841,9 +1820,6 @@ is_hexbin=#{isHexbin,jdbcType=INTEGER}, - - do_log=#{doLog,jdbcType=INTEGER}, - where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -1939,9 +1915,6 @@ is_hexbin=#{isHexbin,jdbcType=INTEGER}, - - do_log=#{doLog,jdbcType=INTEGER}, - where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -2037,9 +2010,6 @@ is_hexbin=#{isHexbin,jdbcType=INTEGER}, - - do_log=#{doLog,jdbcType=INTEGER}, - where cfg_id = #{cfgId,jdbcType=BIGINT} diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index 4a0ba1e0c..704f6682c 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -34,6 +34,7 @@ import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; import com.nis.util.DictUtils; import com.nis.util.StringUtil; +import com.nis.util.StringUtils; import com.nis.web.dao.configuration.AppCfgDao; import com.nis.web.dao.configuration.AreaIpCfgDao; import com.nis.web.dao.configuration.StringCfgDao; @@ -146,12 +147,22 @@ public class AppCfgService extends BaseService { entity.setIsAudit(0); appCfgDao.insertAppPolicyCfg(entity); //保存策略IP配置 - if(entity.getIpPortList()!=null){ + if(entity!=null&&entity.getIpPortList()!=null){ for(IpPortCfg cfg:entity.getIpPortList()){ BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); appCfgDao.insertAppPolicyIpCfg(cfg); } } + //保存关键字配置 + if(entity!=null&&entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + entity.setCfgKeywords(cfg.getCfgKeywords()); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringcfgDao.saveSubscribeIdCfg(cfg); + } + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -173,6 +184,12 @@ public class AppCfgService extends BaseService { appCfgDao.updateAppPolicyCfg(entity); appCfgDao.deleteAppPolicyIpCfg(entity); + if(entity!=null&&entity.getNtcSubscribeIdCfgList()!=null&&entity.getNtcSubscribeIdCfgList().size()>0){ + for (NtcSubscribeIdCfg ntcSubscribeIdCfg : entity.getNtcSubscribeIdCfgList()) { + ntcSubscribeIdCfg.setCompileId(entity.getCompileId()); + stringcfgDao.deleteSubscribeIdCfg(ntcSubscribeIdCfg); + } + } //删除旧的区域IP,新增新的区域IP AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); @@ -188,6 +205,15 @@ public class AppCfgService extends BaseService { appCfgDao.insertAppPolicyIpCfg(cfg); } } + if(entity!=null&&entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + entity.setCfgKeywords(cfg.getCfgKeywords()); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringcfgDao.saveSubscribeIdCfg(cfg); + } + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ @@ -494,7 +520,19 @@ public class AppCfgService extends BaseService { List digestRegionList = new ArrayList(); List areaIpRegionList = new ArrayList(); entity.setTableName(AppPolicyCfg.getTablename()); + List ntcList = new ArrayList(); appCfgDao.auditCfg(entity); + //更新关键字表状态 + if(entity.getCompileId()!=null){ + NtcSubscribeIdCfg ntc = new NtcSubscribeIdCfg(); + ntc.setCompileId(entity.getCompileId()); + ntc.setIsAudit(entity.getIsAudit()); + ntc.setIsValid(entity.getIsValid()); + ntc.setAuditorId(UserUtils.getUser().getId()); + ntc.setAuditTime(entity.getAuditTime()); + stringcfgDao.updateSubscribeIdCfg(ntc); + } + if(isAudit==1){ StringBuffer cfgKeywords=new StringBuffer(); if(entity.getBehavCode()!=null){ @@ -538,6 +576,19 @@ public class AppCfgService extends BaseService { } } } + if(entity.getCompileId()!=null){ + + NtcSubscribeIdCfg ntcSubscribeIdCfg = new NtcSubscribeIdCfg(); + ntcSubscribeIdCfg.setCompileId(entity.getCompileId()); + ntcList = stringcfgDao.findSubscribeIdCfgList(ntcSubscribeIdCfg); + } + if(isAudit==1){ + if(!StringUtil.isEmpty(ntcList)){ + Map ntcMap = cfgConvert(strRegionList,ntcList,2,entity,groupRelationList); + groupRelationList=ntcMap.get("groupList"); + strRegionList=ntcMap.get("dstList"); + } + } //保存区域IP信息 List areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); @@ -1048,6 +1099,12 @@ public class AppCfgService extends BaseService { cfg.setTableName(IpPortCfg.getTablename()); appCfgDao.updateCfgValid(cfg); } + //删除关键字 + if(entity.getNtcSubscribeIdCfgList()!=null&&entity.getNtcSubscribeIdCfgList().size()>0){ + NtcSubscribeIdCfg ntcSubscribeIdCfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, ntcSubscribeIdCfg, new String[]{"cfgId"}); + stringcfgDao.deleteSubscribeIdCfg(ntcSubscribeIdCfg); + } //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyIpList.jsp index 8bb0252d2..33357e642 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyIpList.jsp @@ -126,5 +126,60 @@ + + + + + +
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp index dd93fa071..067736bdc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp @@ -3,11 +3,17 @@ <spring:message code="basic_protocol"></spring:message> +