diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 356931a1e..4c2ff5e96 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -447,6 +447,7 @@ public final class Constants { public static final String HTTP_REQ_HEAD_REGION = Configurations.getStringProperty("http_req_hdr_region","http_req_hdr"); public static final String HTTP_REQ_BODY_REGION = Configurations.getStringProperty("http_req_body_region","http_req_body"); public static final String HTTP_RES_HEAD_REGION = Configurations.getStringProperty("http_res_hdr_region","http_res_hdr"); + public static final String NTC_SUBSCRIBE_ID = Configurations.getStringProperty("ntc_subscribe_id","NTC_SUBSCRIBE_ID"); public static final String HTTP_RES_BODY_REGION = Configurations.getStringProperty("http_res_body_region","http_res_body"); public static final String HTTP_URL_REGION = Configurations.getStringProperty("http_url_region","http_url"); public static final String VOIP_IP_REGION = Configurations.getStringProperty("voip_ip","av_voip_ip"); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java index 09480a13f..491dff836 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java @@ -248,6 +248,8 @@ public class FileTransferCfgController extends BaseController{ logger.info("获取文件摘要响应信息:"+result); } fileTransferCfgService.saveOrUpdateFileDigestCfg(entity,result,areaCfgIds); + } catch (MaatConvertException e) { + addMessage(redirectAttributes, e.getMessage()); } catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java index c08b5d2e3..bffad6486 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java @@ -28,6 +28,7 @@ import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.ComplexkeywordCfg; import com.nis.domain.configuration.FileDigestCfg; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.maat.ToMaatResult; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; @@ -131,6 +132,15 @@ public class MailCfgController extends BaseController{ } } } + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java index c8f2561f9..95d747420 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java @@ -32,6 +32,7 @@ import com.nis.domain.configuration.HttpReqHeadCfg; import com.nis.domain.configuration.HttpResHeadCfg; import com.nis.domain.configuration.HttpUrlCfg; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.exceptions.MaatConvertException; import com.nis.util.Constants; import com.nis.util.excel.ImportExcel; @@ -91,6 +92,9 @@ public class WebsiteController extends BaseController{ HttpBodyCfg resBodyCfg = new HttpBodyCfg(); resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION); entity.setHttpResBody(resBodyCfg); + NtcSubscribeIdCfg subscribeId = new NtcSubscribeIdCfg(); + subscribeId.setCfgType(Constants.NTC_SUBSCRIBE_ID); + entity.setNtcSubscribeIdCfg(subscribeId); int httpReqCfgNum = entity.getIpPortList().size()+ entity.getHttpUrlList().size()+ @@ -118,6 +122,9 @@ public class WebsiteController extends BaseController{ if(entity.getHttpResBodyList().size()==0){ entity.getHttpResBodyList().add(resBodyCfg); } + if(entity.getNtcSubscribeIdCfgList().size()==0){ + entity.getNtcSubscribeIdCfgList().add(subscribeId); + } initUpdateFormCondition(model,entity); }else{ //设置http各类配置的配置域类型 @@ -139,6 +146,9 @@ public class WebsiteController extends BaseController{ HttpBodyCfg resBodyCfg = new HttpBodyCfg(); resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION); entity.setHttpResBody(resBodyCfg); + NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg(); + subscribeIdCfg.setCfgType(Constants.NTC_SUBSCRIBE_ID); + entity.setNtcSubscribeIdCfg(subscribeIdCfg); List ipList=new ArrayList(); ipList.add(ipCfg); @@ -158,6 +168,9 @@ public class WebsiteController extends BaseController{ List resBodyList=new ArrayList(); resBodyList.add(resBodyCfg); entity.setHttpResBodyList(resBodyList); + List subscribeIdList=new ArrayList(); + subscribeIdList.add(subscribeIdCfg); + entity.setNtcSubscribeIdCfgList(subscribeIdList); initFormCondition(model,entity); } @@ -257,6 +270,15 @@ public class WebsiteController extends BaseController{ } } } + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); @@ -334,6 +356,15 @@ public class WebsiteController extends BaseController{ } } } + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java index 7cb65e3e7..561d247c0 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java @@ -40,29 +40,19 @@ import com.nis.web.security.UserUtils; @Controller @RequestMapping("${adminPath}/proxy/intercept") public class InterceptController extends CommonController{ - @RequestMapping(value = {"/ip/list"}) -// @RequiresPermissions(value={"website:dns:config"}) + @RequestMapping(value = {"/ip/list","domain/list"}) public String ipList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { Page searchPage=new Page(request,response,"a"); Page page = websiteCfgService.getWebsiteList(searchPage, cfg); model.addAttribute("page", page); initPageCondition(model,cfg); - return "/cfg/intercept/interceptIpList"; + return "/cfg/intercept/interceptList"; } - @RequestMapping(value = {"/domain/list"}) -// @RequiresPermissions(value={"intercept:domain:config","intercept:domain:confirm"},logical=Logical.OR) - public String domainList(String cfgName,Model model,@ModelAttribute("cfg")HttpUrlCfg cfg,HttpServletRequest request,HttpServletResponse response) { - this._domainList(cfgName,model, cfg, request, response); - model.addAttribute("urlPrefix","/proxy/intercept/domain"); - model.addAttribute("requiresPermissionPrefix","intercept:domain"); - return "/cfg/common/domainList"; - } - - @RequestMapping(value = {"/interceptIpForm"}) - @RequiresPermissions(value={"intercept:ip:config"}) + @RequestMapping(value = {"/interceptIpForm","interceptDomainForm"}) + @RequiresPermissions(value={"intercept:ip:config","intercept:domain:config"}) public String interceptIpForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = interceptCfgService.getInterceptIpCfg(Long.parseLong(ids)); + entity = interceptCfgService.getInterceptCfg(Long.parseLong(ids)); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -72,20 +62,12 @@ public class InterceptController extends CommonController{ //model.addAttribute("dnsResStrategys", resStrategys); model.addAttribute("_cfg", entity); - return "/cfg/intercept/interceptIpForm"; + return "/cfg/intercept/interceptForm"; } - @RequestMapping(value = {"/domain/form"}) - @RequiresPermissions(value={"intercept:domain:config"}) - public String domainForm(String cfgName,Model model,String ids,Integer functionId,HttpUrlCfg entity) { - this._domainForm(cfgName, model, ids, functionId, entity); - model.addAttribute("urlPrefix","/proxy/intercept/domain"); - model.addAttribute("requiresPermissionPrefix","intercept:domain"); - return "/cfg/common/domainForm"; - } - @RequestMapping(value = {"/ip/saveOrUpdate"}) + @RequestMapping(value = {"/ip/saveOrUpdate","/domain/saveOrUpdate"}) public String saveInterceptIpCfg(RedirectAttributes redirectAttributes,Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { try { - interceptCfgService.saveInterceptIpCfg(entity); + interceptCfgService.saveInterceptCfg(entity); addMessage(redirectAttributes,"save_success"); } catch (Exception e) { addMessage(redirectAttributes,"save_failed"); @@ -93,9 +75,9 @@ public class InterceptController extends CommonController{ return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+entity.getFunctionId(); } - @RequestMapping(value = {"/ajaxInterceptIpSubList"}) + @RequestMapping(value = {"/ajaxInterceptIpSubList","/ajaxInterceptDomainSubList"}) public String ajaxInterceptIpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = interceptCfgService.getInterceptIpCfg(cfgId); + CfgIndexInfo cfg = interceptCfgService.getInterceptCfg(cfgId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -115,19 +97,28 @@ public class InterceptController extends CommonController{ } } } + if(cfg.getHttpUrlList()!=null){ + String cfgType = null; + for(BaseStringCfg keyword:cfg.getHttpUrlList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); - return "/cfg/intercept/interceptIpSubList"; + return "/cfg/intercept/interceptSubList"; } - @RequestMapping(value = {"auditInterceptIpCfg"}) - @RequiresPermissions(value={"intercept:ip:confirm"}) + @RequestMapping(value = {"auditInterceptIpCfg","auditInterceptDomainCfg"}) + @RequiresPermissions(value={"intercept:ip:confirm","intercept:domain:confirm"}) public String auditInterceptIpCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = interceptCfgService.getInterceptIpCfg(Long.parseLong(id)); + entity = interceptCfgService.getInterceptCfg(Long.parseLong(id)); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); @@ -144,8 +135,8 @@ public class InterceptController extends CommonController{ return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+functionId; } - @RequestMapping(value = {"updateInterceptIpValid"}) - @RequiresPermissions(value={"intercept:ip:config"}) + @RequestMapping(value = {"updateInterceptIpValid","updateInterceptDomainValid"}) + @RequiresPermissions(value={"intercept:ip:config","intercept:domain:config"}) public String updateInterceptIpValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { try { interceptCfgService.updatInterceptValid(isValid,ids,functionId); @@ -157,28 +148,7 @@ public class InterceptController extends CommonController{ return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+functionId; } - @RequestMapping(value = {"/domain/saveOrUpdate"}) - public String saveOrUpdateDomain(String cfgName,RedirectAttributes model, HttpUrlCfg cfg) { - this._saveOrUpdateDomain(cfgName, model, cfg); - return "redirect:" + adminPath +"/proxy/intercept/domain/list?functionId="+cfg.getFunctionId(); - } - - @RequestMapping(value = {"/domain/delete"}) - @RequiresPermissions("intercept:domain:config") - public String deleteDomain(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) { - this._deleteDomain(cfgName, ids, compileIds, functionId, model); - model.addAttribute("urlPrefix","/proxy/intercept/domain"); - model.addAttribute("requiresPermissionPrefix","intercept:domain"); - return "redirect:" + adminPath +"/proxy/intercept/domain/list?functionId="+functionId; - } - @RequestMapping(value = {"/domain/audit"}) - @RequiresPermissions("intercept:domain:confirm") - public String auditDomain(String ids,HttpUrlCfg cfg,RedirectAttributes redirectAttributes) { - this._auditDomain(ids, cfg, redirectAttributes); - redirectAttributes.addAttribute("urlPrefix","/proxy/intercept/domain"); - redirectAttributes.addAttribute("requiresPermissionPrefix","intercept:domain"); - return "redirect:" + adminPath +"/proxy/intercept/domain/list?functionId="+cfg.getFunctionId(); - } + /* //ip配置导入 @RequestMapping(value = "/ip/import", method=RequestMethod.POST) public String importIp(String cfgName,RedirectAttributes redirectAttributes, @@ -198,5 +168,5 @@ public class InterceptController extends CommonController{ public void exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response, @ModelAttribute("cfg")IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){ this._exportIp(columns,model, request, response, entity, ids, redirectAttributes); - } + }*/ } diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java index 4ed712975..7d1d980a3 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java @@ -195,7 +195,7 @@ public class SpecificServiceCfgController extends BaseController { */ @ResponseBody @RequestMapping(value = "treeData") - public List> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, + public List> treeData(@RequestParam(required=false)Boolean specific,@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, @RequestParam(required=false)boolean isLeafShow,@RequestParam(required=true)Integer cfgType,HttpServletResponse response){ List> mapList = Lists.newArrayList(); Map map2 = Maps.newHashMap(); @@ -206,84 +206,76 @@ public class SpecificServiceCfgController extends BaseController { map2.put("name","root_node"); //map2.put("placeholder","0"); mapList.add(map2); - Properties props=this.getMsgProp(); - List businessTypeList=Lists.newArrayList(); - if(cfgType==1) { - businessTypeList=DictUtils.getDictList("APP_BUSINESS_TYPE"); - }else if(cfgType==3) { - businessTypeList=DictUtils.getDictList("BASIC_PROTOCOL_BUSINESS_TYPE"); - } - List> businessList = Lists.newArrayList(); - for(SysDataDictionaryItem dict:businessTypeList) { - Map map = Maps.newHashMap(); - map.put("id", "businessType"+dict.getItemCode()); - map.put("pId", 0); - map.put("name",props.getProperty(dict.getItemValue(), dict.getItemValue())); - map.put("serviceType",cfgType); - map.put("businessType","-1"); - map.put("nodes", new ArrayList>()); - businessList.add(map); - } - mapList.addAll(businessList); - List list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(),""); - for (int i=0; i0) { - for(SysDataDictionaryItem business:businessTypeList) { - if(String.valueOf(business.getItemCode()).equals(specificServiceCfg.getBusinessType())) { - Map map = Maps.newHashMap(); - map.put("id", specificServiceCfg.getSpecServiceId()); - map.put("pId", "businessType"+business.getItemCode()); - map.put("name",specificServiceCfg.getSpecServiceName()); - map.put("serviceType",specificServiceCfg.getCfgType()); - map.put("businessType",specificServiceCfg.getBusinessType()); - mapList.add(map); - break; - } + if(specific==null||!specific) { + Properties props=this.getMsgProp(); + List businessTypeList=Lists.newArrayList(); + if(cfgType==1) { + businessTypeList=DictUtils.getDictList("APP_BUSINESS_TYPE"); + }else if(cfgType==3) { + businessTypeList=DictUtils.getDictList("BASIC_PROTOCOL_BUSINESS_TYPE"); + } + List> businessList = Lists.newArrayList(); + for(SysDataDictionaryItem dict:businessTypeList) { + Map map = Maps.newHashMap(); + map.put("id", "businessType"+dict.getItemCode()); + map.put("pId", 0); + map.put("name",props.getProperty(dict.getItemValue(), dict.getItemValue())); + map.put("serviceType",cfgType); + map.put("businessType","-1"); + businessList.add(map); + } + mapList.addAll(businessList); + List list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(),""); + for (int i=0; i0) { + for(SysDataDictionaryItem business:businessTypeList) { + if(String.valueOf(business.getItemCode()).equals(specificServiceCfg.getBusinessType())) { + Map map = Maps.newHashMap(); + map.put("id", specificServiceCfg.getSpecServiceId()); + map.put("pId", "businessType"+business.getItemCode()); + map.put("name",specificServiceCfg.getSpecServiceName()); + map.put("serviceType",specificServiceCfg.getCfgType()); + map.put("businessType",specificServiceCfg.getBusinessType()); + mapList.add(map); + break; + } + } + }else { + Map map = Maps.newHashMap(); + map.put("id", specificServiceCfg.getSpecServiceId()); + map.put("pId", specificServiceCfg.getParent().getSpecServiceId()); + map.put("name",specificServiceCfg.getSpecServiceName()); + map.put("serviceType",specificServiceCfg.getCfgType()); + mapList.add(map); + } + } + } + }else { + List list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(),""); + for (int i=0; i map = Maps.newHashMap(); map.put("id", specificServiceCfg.getSpecServiceId()); map.put("pId", specificServiceCfg.getParent().getSpecServiceId()); map.put("name",specificServiceCfg.getSpecServiceName()); - map.put("serviceType",specificServiceCfg.getCfgType()); + map.put("type",specificServiceCfg.getCfgType()); mapList.add(map); } } } - -// List list = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(),""); -// -// for (int i=0; i business:businessList) { -// if(String.valueOf(business.get("id")).equals(specificServiceCfg.getBusinessType())) { -// Map map = Maps.newHashMap(); -// map.put("id", specificServiceCfg.getSpecServiceId()); -// map.put("pId", specificServiceCfg.getParent().getSpecServiceId()); -// map.put("name",specificServiceCfg.getSpecServiceName()); -// map.put("type",specificServiceCfg.getCfgType()); -// map.put("business",specificServiceCfg.getBusinessType()); -// ((List>)business.get("nodes")).add(map); -// break; -// } -// } -// -// -// } -// } // map2.put("nodes", businessList); return mapList; } 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 145b590cd..94696fa3d 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -71,6 +71,7 @@ + @@ -103,6 +104,7 @@ + @@ -133,6 +135,7 @@ + @@ -163,6 +166,7 @@ + @@ -300,7 +304,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.do_log + r.USER_REGION3,r.USER_REGION4,r.USER_REGION5,r.DO_LOG @@ -309,7 +313,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.DIRECTION,r.PROTOCOL,r.DO_LOG @@ -317,7 +321,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.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG @@ -325,7 +329,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.DOMAIN,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG @@ -333,7 +337,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.BYTES,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG @@ -1326,7 +1330,7 @@ , #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} ,#{userRegion1,jdbcType=VARCHAR} ,#{userRegion2,jdbcType=VARCHAR} ,#{userRegion3,jdbcType=VARCHAR} - ,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR} ,#{doLog,jdbcType=INTEGER} + ,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR} ) @@ -1339,12 +1343,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 + DIRECTION,PROTOCOL,DO_LOG )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} + #{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} ) @@ -1356,11 +1360,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 + DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG )values ( , #{district,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR}, - #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} + #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} ) @@ -1372,11 +1376,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 + DOMAIN,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG )values ( , - #{domain,jdbcType=VARCHAR}, - #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} + #{domain,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER}, + #{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} ) @@ -1388,11 +1392,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 + BYTES,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG )values ( , - #{bytes,jdbcType=VARCHAR}, - #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} + #{bytes,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER}, + #{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} ) @@ -1404,11 +1408,12 @@ 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, - RULE_FILE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN + RULE_FILE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG )values ( , #{ruleFile,jdbcType=VARCHAR}, #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER} + ,#{doLog,jdbcType=INTEGER} ) @@ -1722,6 +1727,9 @@ protocol = #{protocol,jdbcType=INTEGER}, + + do_log = #{doLog,jdbcType=INTEGER}, + where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -1820,6 +1828,9 @@ is_hexbin=#{isHexbin,jdbcType=INTEGER}, + + do_log = #{doLog,jdbcType=INTEGER}, + where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -1915,6 +1926,9 @@ is_hexbin=#{isHexbin,jdbcType=INTEGER}, + + do_log = #{doLog,jdbcType=INTEGER}, + where cfg_id = #{cfgId,jdbcType=BIGINT} @@ -2010,6 +2024,9 @@ 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/dao/configuration/AvContentCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java index 4aaa6b797..b4c568a31 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java @@ -9,7 +9,6 @@ import com.nis.domain.configuration.AvVoipIpCfg; import com.nis.domain.configuration.BaseIpCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; -import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.web.dao.MyBatisDao; @@ -19,7 +18,6 @@ public interface AvContentCfgDao { public List findAccountList(CfgIndexInfo entity) ; public List findVoipIpCfgList(CfgIndexInfo entity); public List findVoipAccountCfgList(CfgIndexInfo entity); - public List findSubscribeIdCfgList(CfgIndexInfo entity); public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity); public void insertCfgIndexInfo(CfgIndexInfo entity); @@ -33,7 +31,6 @@ public interface AvContentCfgDao { public void updateAvVoipKeywordCfgt(CfgIndexInfo entity); public void deleteAvVoipIp(CfgIndexInfo entity); - public void deleteAvVoipKeywordCfg(CfgIndexInfo entity); public void deleteAvVoipAccountCfg(CfgIndexInfo entity); public BaseIpCfg findIpCfgById(BaseIpCfg entity) ; diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml index a98fa3024..68425b959 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml @@ -182,7 +182,7 @@ r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable ,r.area_effective_ids,r.function_id,r.cfg_region_code - + r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type, r.action,r.is_valid,r.is_audit,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, @@ -484,26 +484,7 @@ - - + @@ -1225,6 +1226,9 @@ FILE_URL =#{fileUrl,jdbcType=VARCHAR}, + + + do_log =#{doLog,jdbcType=INTEGER}, diff --git a/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml index d563503e1..c893de57c 100644 --- a/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml @@ -581,7 +581,8 @@ function_id, cfg_type, cfg_region_code, - file_url + file_url, + do_log )values ( #{cfgDesc,jdbcType=VARCHAR}, #{rawLen,jdbcType=BIGINT}, @@ -607,7 +608,8 @@ #{functionId,jdbcType=INTEGER}, #{cfgType,jdbcType=VARCHAR}, #{cfgRegionCode,jdbcType=INTEGER}, - #{fileUrl,jdbcType=VARCHAR} + #{fileUrl,jdbcType=VARCHAR}, + #{doLog,jdbcType=VARCHAR} ) diff --git a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.java b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.java index d7186be30..c17db24b8 100644 --- a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.java @@ -5,6 +5,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; import com.nis.domain.configuration.BaseStringCfg; +import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.web.dao.CrudDao; import com.nis.web.dao.MyBatisDao; @@ -41,7 +42,8 @@ public interface StringCfgDao extends CrudDao{ * @since 1.0.0 */ public void deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds); - + public List findSubscribeIdCfgListByCfgIndexInfo(CfgIndexInfo entity); + public void deleteSubscribeIdCfgByCfgIndexInfo(CfgIndexInfo entity); public List findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg); public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg); public void updateSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg); diff --git a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml index 08c42a5e2..af9281a06 100644 --- a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml @@ -65,7 +65,6 @@ - CFG_ID, CFG_DESC, CFG_KEYWORDS,CFG_TYPE,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, @@ -518,6 +517,9 @@ from ntc_subscribe_id_cfg r + + and r.FUNCTION_ID=#{functionId,jdbcType=INTEGER} + and r.COMPILE_ID=#{compileId,jdbcType=INTEGER} @@ -690,5 +692,44 @@ + + + + + + delete from ntc_subscribe_id_cfg + + + and cfg_id = #{ntcSubscribeIdCfg.cfgId,jdbcType=INTEGER} + + + and compile_id = #{compileId,jdbcType=INTEGER} + + + and function_id = #{functionId,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml index 2e4e61200..f24e7ac07 100644 --- a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml +++ b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml @@ -164,8 +164,8 @@ - insert into specific_service_cfg (spec_service_code,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id,cfg_type) - values(#{specServiceCode},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId},#{cfgType}) + insert into specific_service_cfg (spec_service_code,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id,cfg_type,business_type) + values(#{specServiceCode},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId},#{cfgType},#{businessType}) diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index fcb7e015e..dc1b5d1d3 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -107,7 +107,7 @@ public class AvContentCfgService extends BaseService{ * @return */ public List getSubscribeIdCfgList(CfgIndexInfo entity) { - return avContentCfgDao.findSubscribeIdCfgList(entity); + return stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); } /** * 根据索引表信息获取voipAccountCfg信息 @@ -198,7 +198,7 @@ public class AvContentCfgService extends BaseService{ avContentCfgDao.updateCfgIndexInfo(entity); //无效子配置后,再新增子配置 avContentCfgDao.deleteAvVoipIp(entity); - avContentCfgDao.deleteAvVoipKeywordCfg(entity); + stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -280,7 +280,7 @@ public class AvContentCfgService extends BaseService{ entity.setEditorId(entity.getCurrentUser().getId()); avContentCfgDao.updateCfgIndexInfo(entity); //无效子配置后,再新增子配置 - avContentCfgDao.deleteAvVoipKeywordCfg(entity); + stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); avContentCfgDao.deleteAvVoipAccountCfg(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); @@ -398,7 +398,7 @@ public class AvContentCfgService extends BaseService{ areaIpCfgDao.updateAreaIpCfg(areaIpCfg); voipIpList=avContentCfgDao.findVoipIpCfgList(entity); - ntcList=avContentCfgDao.findSubscribeIdCfgList(entity); + ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); ToMaatBean maatBean = new ToMaatBean(); @@ -511,7 +511,7 @@ public class AvContentCfgService extends BaseService{ BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"}); areaIpCfgDao.updateAreaIpCfg(areaIpCfg); - ntcList=avContentCfgDao.findSubscribeIdCfgList(entity); + ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); accountList=avContentCfgDao.findVoipAccountCfgList(entity); areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); diff --git a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java index 446ae7b14..09eb8ee34 100644 --- a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java @@ -402,12 +402,16 @@ public class FileTransferCfgService extends CrudService:"+null); + } mailCfgDao.saveMailFileDigestCfg(entity); //保存区域IP信息 @@ -619,11 +623,16 @@ public class FileTransferCfgService extends CrudService idList = ConfigServiceUtil.getId(1, 1); - if(idList!=null && idList.size()>0){ - compileId = idList.get(0); + Integer compileId = 0; + try { + List idList = ConfigServiceUtil.getId(1, 1); + if(idList!=null && idList.size()>0){ + compileId = idList.get(0); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("获取编译ID出错"); + throw new MaatConvertException(":"+e.getMessage()); } entity.setCompileId(compileId); entity.setCreateTime(new Date()); @@ -674,11 +683,7 @@ public class FileTransferCfgService extends CrudService:"+e.getMessage()); - } + }else{ // 审核未通过状态的配置 修改后状态改为未审核 diff --git a/src/main/java/com/nis/web/service/configuration/InterceptCfgService.java b/src/main/java/com/nis/web/service/configuration/InterceptCfgService.java index 1900a79c1..7c44cd8a4 100644 --- a/src/main/java/com/nis/web/service/configuration/InterceptCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/InterceptCfgService.java @@ -1,40 +1,21 @@ package com.nis.web.service.configuration; -import java.beans.PropertyDescriptor; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; -import org.springframework.beans.BeansException; -import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.util.Assert; -import org.springframework.util.ClassUtils; import com.nis.domain.Page; import com.nis.domain.configuration.AreaIpCfg; -import com.nis.domain.configuration.AvFileSampleCfg; -import com.nis.domain.configuration.AvSignSampleCfg; -import com.nis.domain.configuration.BaseIpCfg; -import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; -import com.nis.domain.configuration.ComplexkeywordCfg; -import com.nis.domain.configuration.DnsDomainCfg; -import com.nis.domain.configuration.HttpBodyCfg; -import com.nis.domain.configuration.HttpReqHeadCfg; -import com.nis.domain.configuration.HttpResHeadCfg; import com.nis.domain.configuration.HttpUrlCfg; import com.nis.domain.configuration.InterceptPktBin; import com.nis.domain.configuration.IpPortCfg; -import com.nis.domain.configuration.SslKeywordCfg; import com.nis.domain.maat.MaatCfg; import com.nis.domain.maat.MaatCfg.NumBoundaryCfg; import com.nis.domain.maat.ToMaatBean; @@ -46,13 +27,9 @@ import com.nis.domain.maat.MaatCfg.StringCfg; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; -import com.nis.util.DictUtils; -import com.nis.util.IpUtil; import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AreaIpCfgDao; import com.nis.web.dao.configuration.InterceptCfgDao; -import com.nis.web.dao.configuration.IpCfgDao; -import com.nis.web.dao.configuration.StringCfgDao; import com.nis.web.dao.configuration.WebsiteCfgDao; import com.nis.web.security.UserUtils; import com.nis.web.service.BaseService; @@ -72,12 +49,14 @@ public class InterceptCfgService extends CrudService @Autowired protected AreaIpCfgDao areaIpCfgDao; - public CfgIndexInfo getInterceptIpCfg(Long cfgId){ + public CfgIndexInfo getInterceptCfg(Long cfgId){ CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId); List ipPortList = websiteCfgDao.getIpPortList(entity); List pktBinList = interceptCfgDao.getInterceptPktBin(entity); + List httpUrlList = websiteCfgDao.getHttpUrlList(entity); entity.setIpPortList(ipPortList); entity.setInterceptPktBinList(pktBinList); + entity.setHttpUrlList(httpUrlList); return entity; } public Page getWebsiteList(Page page, CfgIndexInfo entity){ @@ -93,7 +72,7 @@ public class InterceptCfgService extends CrudService * @param entity */ - public void saveInterceptIpCfg(CfgIndexInfo entity){ + public void saveInterceptCfg(CfgIndexInfo entity){ if(!entity.getAction().equals(Constants.REPLACE_ACTION)){ entity.setInterceptPktBinList(null); } @@ -115,33 +94,41 @@ public class InterceptCfgService extends CrudService logger.info("获取编译ID出错"); throw new MaatConvertException(":"+e.getMessage()); } - entity.setCompileId(compileId); - entity.setCreateTime(new Date()); - entity.setCreatorId(entity.getCurrentUser().getId()); - websiteCfgDao.saveCfgIndex(entity); - if(entity.getIpPortList()!=null){ - for(IpPortCfg cfg:entity.getIpPortList()){ + entity.setCompileId(compileId); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + websiteCfgDao.saveCfgIndex(entity); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveIpPortCfg(cfg); + } + } + + if(entity.getInterceptPktBinList()!=null ){ + for(InterceptPktBin cfg:entity.getInterceptPktBinList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveIpPortCfg(cfg); + interceptCfgDao.saveInterceptPktBin(cfg); } } - - if(entity.getInterceptPktBinList()!=null ){ - for(InterceptPktBin cfg:entity.getInterceptPktBinList()){ - if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - interceptCfgDao.saveInterceptPktBin(cfg); - } - } - } - //保存区域IP信息 - if(entity.getAreaCfg()!=null){ - for(AreaIpCfg cfg:entity.getAreaCfg()){ - cfg.initDefaultValue(); + } + if(entity.getHttpUrlList()!=null ){ + for(HttpUrlCfg cfg:entity.getHttpUrlList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - areaIpCfgDao.saveAreaIpCfg(cfg); + websiteCfgDao.saveHttpUrlCfg(cfg); } } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } + } }else{ @@ -153,6 +140,7 @@ public class InterceptCfgService extends CrudService //无效子配置后,再新增子配置 interceptCfgDao.deleteInterceptIpCfg(entity); interceptCfgDao.deleteInterceptPktBin(entity); + websiteCfgDao.deleteHttpUrlCfg(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -173,6 +161,14 @@ public class InterceptCfgService extends CrudService } } } + if(entity.getHttpUrlList()!=null){ + for(HttpUrlCfg cfg:entity.getHttpUrlList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveHttpUrlCfg(cfg); + } + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -201,7 +197,7 @@ public class InterceptCfgService extends CrudService entity.setFunctionId(functionId); websiteCfgDao.updateCfgValid(entity); //查询子配置 - entity = this.getInterceptIpCfg(Long.parseLong(id)); + entity = this.getInterceptCfg(Long.parseLong(id)); if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){ IpPortCfg cfg = new IpPortCfg(); BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); @@ -215,6 +211,13 @@ public class InterceptCfgService extends CrudService cfg.setTableName(InterceptPktBin.getTablename()); websiteCfgDao.updateCfgValid(cfg); } + if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0) + { + HttpUrlCfg cfg = new HttpUrlCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(HttpUrlCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); @@ -227,7 +230,7 @@ public class InterceptCfgService extends CrudService } /** - * dns配置审核 + * 配置审核 * @param entity * @param isAudit * @throws MaatConvertException @@ -248,7 +251,7 @@ public class InterceptCfgService extends CrudService List areaIpRegionList = new ArrayList(); //查询子配置并修改审核状态 - entity = this.getInterceptIpCfg(entity.getCfgId()); + entity = this.getInterceptCfg(entity.getCfgId()); if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){ IpPortCfg cfg = new IpPortCfg(); BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); @@ -274,6 +277,17 @@ public class InterceptCfgService extends CrudService strRegionList=map.get("dstList"); } } + if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){ + HttpUrlCfg cfg = new HttpUrlCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(HttpUrlCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(strRegionList,entity.getHttpUrlList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } //保存区域IP信息 List areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); if(!StringUtil.isEmpty(areaIpCfgList)){ @@ -345,10 +359,10 @@ public class InterceptCfgService extends CrudService maatBean.setOpAction(Constants.INSERT_ACTION); //调用服务接口下发配置数据 String json=gsonToJson(maatBean); - logger.info("intercept IP 配置下发配置参数:"+json); + logger.info("intercept IP/DNS 配置下发配置参数:"+json); //调用服务接口下发配置 ToMaatResult result = ConfigServiceUtil.postMaatCfg(json); - logger.info("intercept IP 配置下发响应信息:"+result.getMsg()); + logger.info("intercept IP/DNS 配置下发响应信息:"+result.getMsg()); }else if(isAudit==3){ maatCfg.setCompileId(entity.getCompileId()); @@ -362,10 +376,10 @@ public class InterceptCfgService extends CrudService maatBean.setOpAction(Constants.UPDATE_ACTION); //调用服务接口取消配置 String json=gsonToJson(maatBean); - logger.info("intercept IP 配置下发配置参数:"+json); + logger.info("intercept IP/DNS 配置下发配置参数:"+json); //调用服务接口下发配置 ToMaatResult result = ConfigServiceUtil.put(json,1); - logger.info("intercept IP 配置取消配置响应信息:"+result.getMsg()); + logger.info("intercept IP/DNS 配置取消配置响应信息:"+result.getMsg()); } } } diff --git a/src/main/java/com/nis/web/service/configuration/MailCfgService.java b/src/main/java/com/nis/web/service/configuration/MailCfgService.java index 245446384..6d359fe36 100644 --- a/src/main/java/com/nis/web/service/configuration/MailCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/MailCfgService.java @@ -22,6 +22,7 @@ import com.nis.domain.configuration.ComplexkeywordCfg; import com.nis.domain.configuration.FileDigestCfg; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.MailKeywordCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.maat.MaatCfg; import com.nis.domain.maat.ToMaatBean; import com.nis.domain.maat.ToMaatResult; @@ -37,6 +38,7 @@ import com.nis.util.FileUtils; import com.nis.util.JsonMapper; import com.nis.web.dao.configuration.AreaIpCfgDao; import com.nis.web.dao.configuration.MailCfgDao; +import com.nis.web.dao.configuration.StringCfgDao; import com.nis.web.security.UserUtils; import com.nis.web.service.CrudService; @@ -51,6 +53,10 @@ public class MailCfgService extends CrudService { protected MailCfgDao mailCfgDao; @Autowired protected AreaIpCfgDao areaIpCfgDao; + @Autowired + protected StringCfgDao stringCfgDao; + + public Page getMailList(Page page, CfgIndexInfo entity){ // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); @@ -65,9 +71,11 @@ public class MailCfgService extends CrudService { List keywordList = mailCfgDao.getMailKeywordList(entity); List digestList = mailCfgDao.getMailFileDigestList(entity); List areaCfg = areaIpCfgDao.getByCompileId(entity.getCompileId()); + List ntcSubscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); entity.setIpPortList(ipPortList); entity.setComplexList(keywordList); entity.setDigestList(digestList); + entity.setNtcSubscribeIdCfgList(ntcSubscribeIdList); entity.setAreaCfg(areaCfg); return entity; } @@ -79,6 +87,10 @@ public class MailCfgService extends CrudService { public void saveMailCfg(CfgIndexInfo entity,ToMaatResult result){ //设置区域运营商信息 setAreaEffectiveIds(entity); + + entity.setIsValid(0); + entity.setIsAudit(0); + if(entity.getCfgId()==null){ Integer compileId = 0; try { @@ -86,58 +98,67 @@ public class MailCfgService extends CrudService { if(idList!=null && idList.size()>0){ compileId = idList.get(0); } - entity.setCompileId(compileId); - entity.setCreateTime(new Date()); - entity.setCreatorId(entity.getCurrentUser().getId()); - mailCfgDao.saveCfgIndex(entity); - if(entity.getIpPortList()!=null){ - for(IpPortCfg cfg:entity.getIpPortList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - mailCfgDao.saveIpPortCfg(cfg); - } - } - if(entity.getComplexList()!=null){ - for(ComplexkeywordCfg cfg:entity.getComplexList()){ - if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ - cfg.setDistrict(cfg.getDistrictShowName()); - } - mailCfgDao.saveMailKeywordCfg(cfg); - } - } - } - if(entity.getDigestList()!=null){ - for(FileDigestCfg cfg:entity.getDigestList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - if(result!=null && result.getData()!=null){ - cfg.setRawLen(result.getData().getRawLen()); - cfg.setDigest(result.getData().getDigest()); - cfg.setFileUrl(result.getData().getAccessUrl()); - } - mailCfgDao.saveMailFileDigestCfg(cfg); - } - } - //保存区域IP信息 - if(entity.getAreaCfg()!=null){ - for(AreaIpCfg cfg:entity.getAreaCfg()){ - cfg.initDefaultValue(); - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - areaIpCfgDao.saveAreaIpCfg(cfg); - } - } - } catch (Exception e) { - e.printStackTrace(); + } catch (MaatConvertException e) { logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(""); + } + entity.setCompileId(compileId); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + mailCfgDao.saveCfgIndex(entity); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + mailCfgDao.saveIpPortCfg(cfg); + } + } + if(entity.getComplexList()!=null){ + for(ComplexkeywordCfg cfg:entity.getComplexList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ + cfg.setDistrict(cfg.getDistrictShowName()); + } + mailCfgDao.saveMailKeywordCfg(cfg); + } + } + } + if(entity.getDigestList()!=null){ + for(FileDigestCfg cfg:entity.getDigestList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + if(result!=null && result.getData()!=null){ + cfg.setRawLen(result.getData().getRawLen()); + cfg.setDigest(result.getData().getDigest()); + cfg.setFileUrl(result.getData().getAccessUrl()); + } + mailCfgDao.saveMailFileDigestCfg(cfg); + } } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } + } }else{ mailCfgDao.updateCfgIndex(entity); //无效子配置后,再新增子配置 mailCfgDao.deleteMailIpCfg(entity); mailCfgDao.deleteMailKeywordCfg(entity); mailCfgDao.deleteMailFileDigestCfg(entity); + stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -172,6 +193,14 @@ public class MailCfgService extends CrudService { mailCfgDao.saveMailFileDigestCfg(cfg); } } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -208,6 +237,13 @@ public class MailCfgService extends CrudService { cfg.setTableName(MailKeywordCfg.getTablename()); mailCfgDao.updateCfgValid(cfg); } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0) + { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + mailCfgDao.updateCfgValid(cfg); + } //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); @@ -272,6 +308,19 @@ public class MailCfgService extends CrudService { digestRegionList=map.get("dstList"); } } + + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){ + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + mailCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } + //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); diff --git a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java index e02d7d9c0..af7332b89 100644 --- a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java @@ -1,29 +1,17 @@ package com.nis.web.service.configuration; -import java.beans.PropertyDescriptor; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; -import org.springframework.beans.BeansException; -import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.util.Assert; -import org.springframework.util.ClassUtils; import com.nis.domain.Page; import com.nis.domain.configuration.AreaIpCfg; -import com.nis.domain.configuration.AvFileSampleCfg; -import com.nis.domain.configuration.AvSignSampleCfg; -import com.nis.domain.configuration.BaseIpCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.ComplexkeywordCfg; @@ -33,6 +21,7 @@ import com.nis.domain.configuration.HttpReqHeadCfg; import com.nis.domain.configuration.HttpResHeadCfg; import com.nis.domain.configuration.HttpUrlCfg; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.configuration.SslKeywordCfg; import com.nis.domain.maat.MaatCfg; import com.nis.domain.maat.MaatCfg.NumBoundaryCfg; @@ -46,14 +35,11 @@ import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; import com.nis.util.DictUtils; -import com.nis.util.IpUtil; import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AreaIpCfgDao; -import com.nis.web.dao.configuration.IpCfgDao; import com.nis.web.dao.configuration.StringCfgDao; import com.nis.web.dao.configuration.WebsiteCfgDao; import com.nis.web.security.UserUtils; -import com.nis.web.service.BaseService; import com.nis.web.service.CrudService; /** @@ -67,6 +53,8 @@ public class WebsiteCfgService extends CrudService { protected WebsiteCfgDao websiteCfgDao; @Autowired protected AreaIpCfgDao areaIpCfgDao; + @Autowired + protected StringCfgDao stringCfgDao; public CfgIndexInfo getHttpCfg(Long cfgId){ CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId); @@ -74,6 +62,7 @@ public class WebsiteCfgService extends CrudService { List httpUrlList = websiteCfgDao.getHttpUrlList(entity); List httpReqHdrList = websiteCfgDao.getHttpReqHdrList(entity); List httpResHdrList = websiteCfgDao.getHttpResHdrList(entity); + List subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); entity.setCfgType(Constants.HTTP_REQ_BODY_REGION); List httpReqBodyList = websiteCfgDao.getHttpReqBodyList(entity); entity.setCfgType(Constants.HTTP_RES_BODY_REGION); @@ -84,13 +73,16 @@ public class WebsiteCfgService extends CrudService { entity.setHttpResBodyList(httpResBodyList); entity.setHttpResHdrList(httpResHdrList); entity.setHttpUrlList(httpUrlList); + entity.setNtcSubscribeIdCfgList(subscribeIdList); return entity; } public CfgIndexInfo getSslCfg(Long cfgId){ CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId); List ipPortList = websiteCfgDao.getIpPortList(entity); List sslList = websiteCfgDao.getSslKewordList(entity); + List subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); entity.setIpPortList(ipPortList); + entity.setNtcSubscribeIdCfgList(subscribeIdList); entity.setSslList(sslList); return entity; } @@ -98,8 +90,10 @@ public class WebsiteCfgService extends CrudService { CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId); List ipPortList = websiteCfgDao.getIpPortList(entity); List domainList = websiteCfgDao.getDnsDomainList(entity); + List subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); entity.setIpPortList(ipPortList); entity.setDomainList(domainList); + entity.setNtcSubscribeIdCfgList(subscribeIdList); return entity; } public Page getWebsiteList(Page page, CfgIndexInfo entity){ @@ -113,6 +107,10 @@ public class WebsiteCfgService extends CrudService { public void saveHttpCfg(CfgIndexInfo entity){ //设置区域运营商信息 setAreaEffectiveIds(entity); + + entity.setIsValid(0); + entity.setIsAudit(0); + if(entity.getCfgId()==null){ Integer compileId = 0; try { @@ -120,64 +118,69 @@ public class WebsiteCfgService extends CrudService { if(idList!=null && idList.size()>0){ compileId = idList.get(0); } - entity.setCompileId(compileId); - entity.setCreateTime(new Date()); - entity.setCreatorId(entity.getCurrentUser().getId()); - websiteCfgDao.saveCfgIndex(entity); - if(entity.getIpPortList()!=null){ - for(IpPortCfg cfg:entity.getIpPortList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveIpPortCfg(cfg); - } - } - if(entity.getHttpUrlList()!=null){ - for(HttpUrlCfg cfg:entity.getHttpUrlList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveHttpUrlCfg(cfg); - } - } - if(entity.getHttpReqHdrList()!=null){ - for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ - cfg.setDistrict(cfg.getDistrictShowName()); - } - websiteCfgDao.saveHttpReqHdrCfg(cfg); - } - } - if(entity.getHttpResHdrList()!=null){ - for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ - cfg.setDistrict(cfg.getDistrictShowName()); - } - websiteCfgDao.saveHttpResHdrCfg(cfg); - } - } - if(entity.getHttpReqBodyList()!=null){ - for(HttpBodyCfg cfg:entity.getHttpReqBodyList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveHttpBodyCfg(cfg); - } - } - if(entity.getHttpResBodyList()!=null){ - for(HttpBodyCfg cfg:entity.getHttpResBodyList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveHttpBodyCfg(cfg); - } - } - //保存区域IP信息 - if(entity.getAreaCfg()!=null){ - for(AreaIpCfg cfg:entity.getAreaCfg()){ - cfg.initDefaultValue(); - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - areaIpCfgDao.saveAreaIpCfg(cfg); - } - } - } catch (Exception e) { - e.printStackTrace(); + } catch (MaatConvertException e) { logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(""); + } + entity.setCompileId(compileId); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + websiteCfgDao.saveCfgIndex(entity); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveIpPortCfg(cfg); + } + } + if(entity.getHttpUrlList()!=null){ + for(HttpUrlCfg cfg:entity.getHttpUrlList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveHttpUrlCfg(cfg); + } + } + if(entity.getHttpReqHdrList()!=null){ + for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ + cfg.setDistrict(cfg.getDistrictShowName()); + } + websiteCfgDao.saveHttpReqHdrCfg(cfg); + } + } + if(entity.getHttpResHdrList()!=null){ + for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ + cfg.setDistrict(cfg.getDistrictShowName()); + } + websiteCfgDao.saveHttpResHdrCfg(cfg); + } + } + if(entity.getHttpReqBodyList()!=null){ + for(HttpBodyCfg cfg:entity.getHttpReqBodyList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveHttpBodyCfg(cfg); + } + } + if(entity.getHttpResBodyList()!=null){ + for(HttpBodyCfg cfg:entity.getHttpResBodyList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveHttpBodyCfg(cfg); + } + } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } } }else{ @@ -188,6 +191,7 @@ public class WebsiteCfgService extends CrudService { websiteCfgDao.deleteHttpReqHdrCfg(entity); websiteCfgDao.deleteHttpResHdrCfg(entity); websiteCfgDao.deleteHttpBodyCfg(entity); + stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -236,6 +240,12 @@ public class WebsiteCfgService extends CrudService { websiteCfgDao.saveHttpBodyCfg(cfg); } } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -290,6 +300,12 @@ public class WebsiteCfgService extends CrudService { cfg.setTableName(HttpBodyCfg.getTablename()); websiteCfgDao.updateCfgValid(cfg); } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){ + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); @@ -384,6 +400,17 @@ public class WebsiteCfgService extends CrudService { } } } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){ + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } //保存区域IP信息 List areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); if(!StringUtil.isEmpty(areaIpCfgList)){ @@ -482,6 +509,10 @@ public class WebsiteCfgService extends CrudService { public void saveSslCfg(CfgIndexInfo entity){ //设置区域运营商信息 setAreaEffectiveIds(entity); + + entity.setIsValid(0); + entity.setIsAudit(0); + if(entity.getCfgId()==null){ Integer compileId = 0; try { @@ -489,36 +520,43 @@ public class WebsiteCfgService extends CrudService { if(idList!=null && idList.size()>0){ compileId = idList.get(0); } - entity.setCompileId(compileId); - entity.setCreateTime(new Date()); - entity.setCreatorId(entity.getCurrentUser().getId()); - websiteCfgDao.saveCfgIndex(entity); - if(entity.getIpPortList()!=null){ - for(IpPortCfg cfg:entity.getIpPortList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveIpPortCfg(cfg); - } - } - if(entity.getSslList()!=null){ - for(BaseStringCfg cfg:entity.getSslList()){ - if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveSslKeywordCfg(cfg); - } - } - } - //保存区域IP信息 - if(entity.getAreaCfg()!=null){ - for(AreaIpCfg cfg:entity.getAreaCfg()){ - cfg.initDefaultValue(); - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - areaIpCfgDao.saveAreaIpCfg(cfg); - } - } - } catch (Exception e) { - e.printStackTrace(); + } catch (MaatConvertException e) { logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(""); + } + entity.setCompileId(compileId); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + websiteCfgDao.saveCfgIndex(entity); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveIpPortCfg(cfg); + } + } + if(entity.getSslList()!=null){ + for(BaseStringCfg cfg:entity.getSslList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveSslKeywordCfg(cfg); + } + } + } + if(entity.getSslList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } } }else{ @@ -526,6 +564,7 @@ public class WebsiteCfgService extends CrudService { //无效子配置后,再新增子配置 websiteCfgDao.deleteSslIpCfg(entity); websiteCfgDao.deleteSslKeywordCfg(entity); + stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -546,6 +585,14 @@ public class WebsiteCfgService extends CrudService { } } } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -582,6 +629,13 @@ public class WebsiteCfgService extends CrudService { cfg.setTableName(SslKeywordCfg.getTablename()); websiteCfgDao.updateCfgValid(cfg); } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0) + { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); @@ -635,6 +689,17 @@ public class WebsiteCfgService extends CrudService { strRegionList=map.get("dstList"); } } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){ + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } //保存区域IP信息 List areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); if(!StringUtil.isEmpty(areaIpCfgList)){ @@ -703,6 +768,10 @@ public class WebsiteCfgService extends CrudService { public void saveDnsCfg(CfgIndexInfo entity){ //设置区域运营商信息 setAreaEffectiveIds(entity); + + entity.setIsValid(0); + entity.setIsAudit(0); + if(entity.getCfgId()==null){ Integer compileId = 0; try { @@ -710,39 +779,46 @@ public class WebsiteCfgService extends CrudService { if(idList!=null && idList.size()>0){ compileId = idList.get(0); } - entity.setCompileId(compileId); - entity.setCreateTime(new Date()); - entity.setCreatorId(entity.getCurrentUser().getId()); - websiteCfgDao.saveCfgIndex(entity); - if(entity.getIpPortList()!=null){ - for(IpPortCfg cfg:entity.getIpPortList()){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - websiteCfgDao.saveIpPortCfg(cfg); - } - } - if(entity.getDomainList()!=null){ - for(ComplexkeywordCfg cfg:entity.getDomainList()){ - if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ - cfg.setDistrict(cfg.getDistrictShowName()); - } - websiteCfgDao.saveDnsDomainCfg(cfg); - } - } - } - //保存区域IP信息 - if(entity.getAreaCfg()!=null){ - for(AreaIpCfg cfg:entity.getAreaCfg()){ - cfg.initDefaultValue(); - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); - areaIpCfgDao.saveAreaIpCfg(cfg); - } - } - } catch (Exception e) { - e.printStackTrace(); + } catch (MaatConvertException e) { logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(""); + } + entity.setCompileId(compileId); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + websiteCfgDao.saveCfgIndex(entity); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveIpPortCfg(cfg); + } + } + if(entity.getDomainList()!=null){ + for(ComplexkeywordCfg cfg:entity.getDomainList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){ + cfg.setDistrict(cfg.getDistrictShowName()); + } + websiteCfgDao.saveDnsDomainCfg(cfg); + } + } + } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } } }else{ @@ -750,6 +826,7 @@ public class WebsiteCfgService extends CrudService { //无效子配置后,再新增子配置 websiteCfgDao.deleteDnsIpCfg(entity); websiteCfgDao.deleteDnsDomainCfg(entity); + stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -773,6 +850,14 @@ public class WebsiteCfgService extends CrudService { } } } + if(entity.getNtcSubscribeIdCfgList()!=null){ + for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + stringCfgDao.saveSubscribeIdCfg(cfg); + } + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -810,11 +895,18 @@ public class WebsiteCfgService extends CrudService { } if(entity.getDomainList()!=null && entity.getDomainList().size()>0) { - SslKeywordCfg cfg = new SslKeywordCfg(); + DnsDomainCfg cfg = new DnsDomainCfg(); BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); cfg.setTableName(DnsDomainCfg.getTablename()); websiteCfgDao.updateCfgValid(cfg); } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0) + { + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } //保存区域IP信息 if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ AreaIpCfg cfg = new AreaIpCfg(); @@ -874,6 +966,17 @@ public class WebsiteCfgService extends CrudService { strRegionList=map.get("dstList"); } } + if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){ + NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(NtcSubscribeIdCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } //保存区域IP信息 List areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); if(!StringUtil.isEmpty(areaIpCfgList)){ diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 0ebbf749a..9ec763708 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -314,6 +314,7 @@ http_req_hdr_region=NTC_HTTP_REQ_HDR http_req_body_region=NTC_HTTP_REQ_BODY http_res_hdr_region=NTC_HTTP_RES_HDR http_res_body_region=NTC_HTTP_RES_BODY +ntc_subscribe_id=NTC_SUBSCRIBE_ID http_url_region=NTC_HTTP_URL http_redirect_url_region=PXY_CTRL_HTTP_URL http_redirect_req_hdr_region=PXY_CTRL_HTTP_REQ_HDR diff --git a/src/main/resources/sql/add_function_region.sql b/src/main/resources/sql/add_function_region.sql new file mode 100644 index 000000000..d4e7b16f6 --- /dev/null +++ b/src/main/resources/sql/add_function_region.sql @@ -0,0 +1,19 @@ +INSERT INTO function_region_dict + () +VALUES + ('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 174, 34, 2, 'NTC_SUBSCRIBE_ID', '', 'SSL SUBSCRIBE_ID配置', 1, NULL, NULL, NULL, NULL, 1, 2, '', '', '', '', '', '', 3); + +INSERT INTO function_region_dict + () +VALUES + ('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 175, 7, 2, 'NTC_SUBSCRIBE_ID', '', 'DNS SUBSCRIBE_ID配置', 1, NULL, NULL, NULL, NULL, 1, 2, '', '', '', '', '', '', 5); + +INSERT INTO function_region_dict + () +VALUES + ('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 176, 35, 3, 'NTC_SUBSCRIBE_ID', '', '邮件 SUBSCRIBE_ID配置', 1, NULL, NULL,NULL , NULL, 1, 2, '', '', '', '', '', '', 7); + +INSERT INTO function_region_dict + () +VALUES + ('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 177, 8, 3, 'NTC_SUBSCRIBE_ID', '', 'HTTP SUBSCRIBE_ID配置', 1, NULL, NULL,NULL , NULL, 1, 3, '', '', '', '', '', '', 7); \ No newline at end of file diff --git a/src/main/resources/sql/update_ip_domain_ratelimit_invalid.sql b/src/main/resources/sql/update_ip_domain_ratelimit_invalid.sql new file mode 100644 index 000000000..25c5ff8af --- /dev/null +++ b/src/main/resources/sql/update_ip_domain_ratelimit_invalid.sql @@ -0,0 +1,2 @@ +UPDATE function_service_dict SET is_valid=0 WHERE service_id IN (1057,1058) +UPDATE sys_menu SET del_flag=0 WHERE function_id IN (302,303) \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index f6ced9f99..d364dcc36 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -5,9 +5,6 @@ <spring:message code="${cfgName}"></spring:message> -
+
-

- -

- -
-
-
-
-
- - - +

+ +

+ +
+
+
+
+
+ + + + + + + +
-
-
- -
- - - - - - - - - - - -
-
-
-
- -
- -
-
-
-
-
- -
- - - -
-
-
-
-
-
-
-
- -
- +
+ + + + + + + + + + + + + +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + + +
+
+
+
+
+
+
+
+ +
+
- " class="required form-control" style=" background-color:transparent" - aria-required="true" type="text" value="${_cfg.digest }"> - + " + class="required form-control" + style="background-color: transparent" aria-required="true" + type="text" value="${_cfg.digest }"> +
- +
-
- +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+ + + + + + + + + + +
-
-
-
- -
- -
-
-
-
- + <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> + <%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> - <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
-
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp index 11593a8b3..e2c89c8ae 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp @@ -12,6 +12,8 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.cfdsLevel}"){ $("#intype").val("${cfg.cfdsLevel}"); + }else if("${cfg.compileId}"){ + $("#intype").val("${cfg.compileId}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -59,7 +61,6 @@
- @@ -89,6 +90,7 @@ + @@ -271,6 +273,7 @@ + @@ -377,6 +380,13 @@ ${fns:abbr(lableInfo,20)} + + + + + + + diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp index c3021c16c..47d7b78ad 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp @@ -335,7 +335,7 @@ -
+
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
@@ -344,14 +344,14 @@ - +
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpSubList.jsp index 6b1cef82f..894572091 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpSubList.jsp @@ -53,6 +53,13 @@
+ +
+ + +
+
@@ -409,6 +416,55 @@
+ + +
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp index ab215d0b6..bed681b62 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp @@ -34,8 +34,13 @@ submitHandler : function(form) { //loading('onloading...'); var flag = true; + var subscribeId=0; + //存在隐藏的subscribeId,不算进域配置 + if($(".boxSolid.hidden").hasClass("subscribeId")){ + subscribeId=1; + } //代表所有业务都隐藏了,提示必须增加一种业务数据 - if($(".boxSolid").length ==$(".boxSolid.hidden").length){ + if(($(".boxSolid").length-1) ==($(".boxSolid.hidden").length-subscribeId)){ top.$.jBox.tip("", ""); return; } @@ -217,6 +222,7 @@ + @@ -257,7 +263,12 @@ class="glyphicon glyphicon-plus ${tabName}Add" onClick="addContent(this,'${tabName}')" title="add"> - + + + + + + <%-- --%> @@ -269,7 +280,9 @@ <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + + + @@ -277,14 +290,43 @@ - + + + + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%> +
+ + +
+
+
+ + + + +
-