From b8a8923a7eec5f3648c00c9b1022dfcfdda103e3 Mon Sep 17 00:00:00 2001 From: zhangwq Date: Mon, 3 Dec 2018 13:38:32 +0800 Subject: [PATCH] =?UTF-8?q?snat=E7=AD=96=E7=95=A5=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0action=E3=80=81serivce=E3=80=81doLog.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/domain/callback/IpAddrPool.java | 6 +-- .../web/dao/configuration/IpMultiplexDao.java | 1 - .../web/dao/configuration/IpMultiplexDao.xml | 11 ++-- .../configuration/IpAddrPoolCfgService.java | 16 +++--- .../configuration/IpMultiplexService.java | 9 +++- .../ipmulitiplex/snatPolicyForm2.jsp | 52 ++++++++++++++----- .../ipmulitiplex/snatPolicyList2.jsp | 8 +++ 7 files changed, 73 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/nis/domain/callback/IpAddrPool.java b/src/main/java/com/nis/domain/callback/IpAddrPool.java index 567a09272..27420e5fe 100644 --- a/src/main/java/com/nis/domain/callback/IpAddrPool.java +++ b/src/main/java/com/nis/domain/callback/IpAddrPool.java @@ -7,7 +7,7 @@ public class IpAddrPool extends InlineIp{ @Expose private Integer regionId; @Expose - private Integer groupId; + private Long groupId; @Expose private Long addrPoolId; @@ -19,11 +19,11 @@ public class IpAddrPool extends InlineIp{ this.regionId = regionId; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.java b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.java index 63d8fe0e4..cece5005b 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.java +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.java @@ -14,7 +14,6 @@ public interface IpMultiplexDao extends CrudDao{ List findPage(IpReusePolicyCfg entity); List findList(@Param("cfgId")Long cfgId - ,@Param("isAudit")Integer isAudit ,@Param("isValid")Integer isValid); void savePolicyCfg(IpReusePolicyCfg entity); diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml index 381348658..2f4972b93 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml @@ -9,6 +9,7 @@ + @@ -38,7 +39,7 @@ r.CFG_ID,r.CFG_DESC,r.ADDR_POOL_ID,r.USER_ID,r.USER_TYPE, - r.ACTION,r.IS_VALID,r.IS_AUDIT,r.CFG_REGION_CODE,r.CFG_TYPE,r.FUNCTION_ID, + r.ACTION,r.DO_LOG,r.IS_VALID,r.IS_AUDIT,r.CFG_REGION_CODE,r.CFG_TYPE,r.FUNCTION_ID, r.SERVICE_ID,r.COMPILE_ID,r.REQUEST_ID,r.CLASSIFY,r.ATTRIBUTE,r.LABLE, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.CANCEL_REQUEST_ID,r.IS_AREA_EFFECTIVE,r.AREA_EFFECTIVE_IDS, @@ -162,9 +163,6 @@ AND r.is_valid != -1 - - AND r.is_audit = #{isAudit,jdbcType=INTEGER} - ORDER BY r.cfg_id @@ -176,6 +174,7 @@ user_id, user_type, action, + do_log, is_valid, is_audit, cfg_type, @@ -206,6 +205,7 @@ #{userId,jdbcType=INTEGER}, #{userType,jdbcType=VARCHAR}, #{action,jdbcType=INTEGER}, + #{doLog,jdbcType=INTEGER}, 0, 0, #{cfgType,jdbcType=VARCHAR}, @@ -261,6 +261,9 @@ user_id = #{userId,jdbcType=INTEGER}, + + do_log = #{doLog,jdbcType=INTEGER}, + is_valid = #{isValid,jdbcType=INTEGER}, diff --git a/src/main/java/com/nis/web/service/configuration/IpAddrPoolCfgService.java b/src/main/java/com/nis/web/service/configuration/IpAddrPoolCfgService.java index 95c8afc01..95a498067 100644 --- a/src/main/java/com/nis/web/service/configuration/IpAddrPoolCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpAddrPoolCfgService.java @@ -176,9 +176,9 @@ public class IpAddrPoolCfgService extends BaseService{ } IpCfg c = cfgs.get(0); ip.setRegionId(ipcfg.getCompileId()); - //ip.setGroupId(ipcfg.getCompileId()); - + ip.setGroupId(cfg.getCfgId()); ip.setAddrType(ipcfg.getIpType()); + ip.setSrcIp(c.getSrcIp()); ip.setMaskSrcIp(c.getSrcIpMask()); ip.setSrcPort(c.getSrcPort()); @@ -190,13 +190,12 @@ public class IpAddrPoolCfgService extends BaseService{ ip.setProtocol(ipcfg.getProtocol()); ip.setDirection(ipcfg.getDirection()); + ip.setAddrPoolId(cfg.getCfgId()); ip.setIsValid(cfg.getIsValid()); ip.setAction(ipcfg.getAction()); ip.setService(ipcfg.getServiceId()); - ip.setAddrPoolId(cfg.getCfgId()); - ip.setOpTime(auditTime); ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());//添加区域管控 - + ip.setOpTime(auditTime); resStrategyList.add(ip); } //调用服务接口下发配置数据 @@ -224,7 +223,9 @@ public class IpAddrPoolCfgService extends BaseService{ } IpCfg c = cfgs.get(0); ip.setRegionId(ipcfg.getCompileId()); + ip.setGroupId(cfg.getCfgId()); ip.setAddrType(ipcfg.getIpType()); + ip.setSrcIp(c.getSrcIp()); ip.setMaskSrcIp(c.getSrcIpMask()); ip.setSrcPort(c.getSrcPort()); @@ -235,12 +236,13 @@ public class IpAddrPoolCfgService extends BaseService{ ip.setMaskDstPort(c.getDstPortMask()); ip.setProtocol(ipcfg.getProtocol()); ip.setDirection(ipcfg.getDirection()); + + ip.setAddrPoolId(cfg.getCfgId()); ip.setIsValid(cfg.getIsValid()); ip.setAction(ipcfg.getAction()); ip.setService(ipcfg.getServiceId()); - ip.setAddrPoolId(cfg.getCfgId()); - ip.setOpTime(auditTime); ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds()); + ip.setOpTime(auditTime); resStrategyList.add(ip); } //调用服务接口取消配置 diff --git a/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java b/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java index 56b2bafc2..c8cc4cd3a 100644 --- a/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java +++ b/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java @@ -40,7 +40,7 @@ public class IpMultiplexService extends BaseService{ } public IpReusePolicyCfg getPolicyCfg(Long cfgId, Integer isValid) { - List list=ipMultiplexDao.findList(cfgId,isValid,null); + List list=ipMultiplexDao.findList(cfgId,isValid); IpReusePolicyCfg policyCfg=null; if(list != null && list.size()>0){ policyCfg=list.get(0); @@ -119,6 +119,7 @@ public class IpMultiplexService extends BaseService{ cfg.setIsAudit(isAudit); cfg.setAuditorId(UserUtils.getUser().getId()); cfg.setAuditTime(auditTime); + cfg.setDoLog(null);; ipMultiplexDao.updatePolicyCfg(cfg); SysDictInfoService sysDictInfoService = SpringContextHolder.getBean(SysDictInfoService.class); @@ -132,6 +133,9 @@ public class IpMultiplexService extends BaseService{ params.put("addrPoolId", cfg.getAddrPoolId()); params.put("userType", cfg.getUserType()); params.put("userId", cfg.getUserId()); + params.put("doLog", cfg.getDoLog()); + params.put("action", cfg.getAction()); + params.put("service", cfg.getServiceId()); params.put("isValid", 1); params.put("opTime", auditTime); params.put("effectiveRange", areaEffectiveIds); @@ -159,6 +163,9 @@ public class IpMultiplexService extends BaseService{ params.put("addrPoolId", cfg.getAddrPoolId()); params.put("userType", cfg.getUserType()); params.put("userId", cfg.getUserId()); + params.put("doLog", cfg.getDoLog()); + params.put("action", cfg.getAction()); + params.put("service", cfg.getServiceId()); params.put("isValid", 0); params.put("opTime", auditTime); params.put("effectiveRange", areaEffectiveIds); diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyForm2.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyForm2.jsp index 9474516a5..950d2617e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyForm2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyForm2.jsp @@ -84,20 +84,30 @@ $(function(){ -
-
- -
- -
-
-
-
+ + +
+
+ + + + + + + + + + + +
+
+ + +
@@ -128,6 +138,20 @@ $(function(){
+
+
+ +
+ +
+
+
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp index 581878972..251751887 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp @@ -293,6 +293,7 @@ + <%-- --%> @@ -349,6 +350,13 @@ + + + + + + + <%--