snat策略下发增加action、serivce、doLog.
This commit is contained in:
@@ -7,7 +7,7 @@ public class IpAddrPool extends InlineIp{
|
|||||||
@Expose
|
@Expose
|
||||||
private Integer regionId;
|
private Integer regionId;
|
||||||
@Expose
|
@Expose
|
||||||
private Integer groupId;
|
private Long groupId;
|
||||||
@Expose
|
@Expose
|
||||||
private Long addrPoolId;
|
private Long addrPoolId;
|
||||||
|
|
||||||
@@ -19,11 +19,11 @@ public class IpAddrPool extends InlineIp{
|
|||||||
this.regionId = regionId;
|
this.regionId = regionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getGroupId() {
|
public Long getGroupId() {
|
||||||
return groupId;
|
return groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGroupId(Integer groupId) {
|
public void setGroupId(Long groupId) {
|
||||||
this.groupId = groupId;
|
this.groupId = groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ public interface IpMultiplexDao extends CrudDao<IpMultiplexDao>{
|
|||||||
List<IpReusePolicyCfg> findPage(IpReusePolicyCfg entity);
|
List<IpReusePolicyCfg> findPage(IpReusePolicyCfg entity);
|
||||||
|
|
||||||
List<IpReusePolicyCfg> findList(@Param("cfgId")Long cfgId
|
List<IpReusePolicyCfg> findList(@Param("cfgId")Long cfgId
|
||||||
,@Param("isAudit")Integer isAudit
|
|
||||||
,@Param("isValid")Integer isValid);
|
,@Param("isValid")Integer isValid);
|
||||||
|
|
||||||
void savePolicyCfg(IpReusePolicyCfg entity);
|
void savePolicyCfg(IpReusePolicyCfg entity);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<result column="user_id" property="userId" jdbcType="INTEGER"/>
|
<result column="user_id" property="userId" jdbcType="INTEGER"/>
|
||||||
<result column="user_type" property="userType" jdbcType="VARCHAR"/>
|
<result column="user_type" property="userType" jdbcType="VARCHAR"/>
|
||||||
|
|
||||||
|
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
|
|
||||||
<sql id="policyColumns">
|
<sql id="policyColumns">
|
||||||
r.CFG_ID,r.CFG_DESC,r.ADDR_POOL_ID,r.USER_ID,r.USER_TYPE,
|
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.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.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,
|
r.CANCEL_REQUEST_ID,r.IS_AREA_EFFECTIVE,r.AREA_EFFECTIVE_IDS,
|
||||||
@@ -162,9 +163,6 @@
|
|||||||
<if test="isValid ==null">
|
<if test="isValid ==null">
|
||||||
AND r.is_valid != -1
|
AND r.is_valid != -1
|
||||||
</if>
|
</if>
|
||||||
<if test="isAudit !=null">
|
|
||||||
AND r.is_audit = #{isAudit,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
ORDER BY r.cfg_id
|
ORDER BY r.cfg_id
|
||||||
</select>
|
</select>
|
||||||
@@ -176,6 +174,7 @@
|
|||||||
user_id,
|
user_id,
|
||||||
user_type,
|
user_type,
|
||||||
action,
|
action,
|
||||||
|
do_log,
|
||||||
is_valid,
|
is_valid,
|
||||||
is_audit,
|
is_audit,
|
||||||
cfg_type,
|
cfg_type,
|
||||||
@@ -206,6 +205,7 @@
|
|||||||
#{userId,jdbcType=INTEGER},
|
#{userId,jdbcType=INTEGER},
|
||||||
#{userType,jdbcType=VARCHAR},
|
#{userType,jdbcType=VARCHAR},
|
||||||
#{action,jdbcType=INTEGER},
|
#{action,jdbcType=INTEGER},
|
||||||
|
#{doLog,jdbcType=INTEGER},
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
#{cfgType,jdbcType=VARCHAR},
|
#{cfgType,jdbcType=VARCHAR},
|
||||||
@@ -261,6 +261,9 @@
|
|||||||
<if test="userId != null" >
|
<if test="userId != null" >
|
||||||
user_id = #{userId,jdbcType=INTEGER},
|
user_id = #{userId,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="doLog != null" >
|
||||||
|
do_log = #{doLog,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
<if test="isValid != null" >
|
<if test="isValid != null" >
|
||||||
is_valid = #{isValid,jdbcType=INTEGER},
|
is_valid = #{isValid,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -176,9 +176,9 @@ public class IpAddrPoolCfgService extends BaseService{
|
|||||||
}
|
}
|
||||||
IpCfg c = cfgs.get(0);
|
IpCfg c = cfgs.get(0);
|
||||||
ip.setRegionId(ipcfg.getCompileId());
|
ip.setRegionId(ipcfg.getCompileId());
|
||||||
//ip.setGroupId(ipcfg.getCompileId());
|
ip.setGroupId(cfg.getCfgId());
|
||||||
|
|
||||||
ip.setAddrType(ipcfg.getIpType());
|
ip.setAddrType(ipcfg.getIpType());
|
||||||
|
|
||||||
ip.setSrcIp(c.getSrcIp());
|
ip.setSrcIp(c.getSrcIp());
|
||||||
ip.setMaskSrcIp(c.getSrcIpMask());
|
ip.setMaskSrcIp(c.getSrcIpMask());
|
||||||
ip.setSrcPort(c.getSrcPort());
|
ip.setSrcPort(c.getSrcPort());
|
||||||
@@ -190,13 +190,12 @@ public class IpAddrPoolCfgService extends BaseService{
|
|||||||
ip.setProtocol(ipcfg.getProtocol());
|
ip.setProtocol(ipcfg.getProtocol());
|
||||||
ip.setDirection(ipcfg.getDirection());
|
ip.setDirection(ipcfg.getDirection());
|
||||||
|
|
||||||
|
ip.setAddrPoolId(cfg.getCfgId());
|
||||||
ip.setIsValid(cfg.getIsValid());
|
ip.setIsValid(cfg.getIsValid());
|
||||||
ip.setAction(ipcfg.getAction());
|
ip.setAction(ipcfg.getAction());
|
||||||
ip.setService(ipcfg.getServiceId());
|
ip.setService(ipcfg.getServiceId());
|
||||||
ip.setAddrPoolId(cfg.getCfgId());
|
|
||||||
ip.setOpTime(auditTime);
|
|
||||||
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());//添加区域管控
|
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());//添加区域管控
|
||||||
|
ip.setOpTime(auditTime);
|
||||||
resStrategyList.add(ip);
|
resStrategyList.add(ip);
|
||||||
}
|
}
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
@@ -224,7 +223,9 @@ public class IpAddrPoolCfgService extends BaseService{
|
|||||||
}
|
}
|
||||||
IpCfg c = cfgs.get(0);
|
IpCfg c = cfgs.get(0);
|
||||||
ip.setRegionId(ipcfg.getCompileId());
|
ip.setRegionId(ipcfg.getCompileId());
|
||||||
|
ip.setGroupId(cfg.getCfgId());
|
||||||
ip.setAddrType(ipcfg.getIpType());
|
ip.setAddrType(ipcfg.getIpType());
|
||||||
|
|
||||||
ip.setSrcIp(c.getSrcIp());
|
ip.setSrcIp(c.getSrcIp());
|
||||||
ip.setMaskSrcIp(c.getSrcIpMask());
|
ip.setMaskSrcIp(c.getSrcIpMask());
|
||||||
ip.setSrcPort(c.getSrcPort());
|
ip.setSrcPort(c.getSrcPort());
|
||||||
@@ -235,12 +236,13 @@ public class IpAddrPoolCfgService extends BaseService{
|
|||||||
ip.setMaskDstPort(c.getDstPortMask());
|
ip.setMaskDstPort(c.getDstPortMask());
|
||||||
ip.setProtocol(ipcfg.getProtocol());
|
ip.setProtocol(ipcfg.getProtocol());
|
||||||
ip.setDirection(ipcfg.getDirection());
|
ip.setDirection(ipcfg.getDirection());
|
||||||
|
|
||||||
|
ip.setAddrPoolId(cfg.getCfgId());
|
||||||
ip.setIsValid(cfg.getIsValid());
|
ip.setIsValid(cfg.getIsValid());
|
||||||
ip.setAction(ipcfg.getAction());
|
ip.setAction(ipcfg.getAction());
|
||||||
ip.setService(ipcfg.getServiceId());
|
ip.setService(ipcfg.getServiceId());
|
||||||
ip.setAddrPoolId(cfg.getCfgId());
|
|
||||||
ip.setOpTime(auditTime);
|
|
||||||
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
|
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
|
||||||
|
ip.setOpTime(auditTime);
|
||||||
resStrategyList.add(ip);
|
resStrategyList.add(ip);
|
||||||
}
|
}
|
||||||
//调用服务接口取消配置
|
//调用服务接口取消配置
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class IpMultiplexService extends BaseService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IpReusePolicyCfg getPolicyCfg(Long cfgId, Integer isValid) {
|
public IpReusePolicyCfg getPolicyCfg(Long cfgId, Integer isValid) {
|
||||||
List<IpReusePolicyCfg> list=ipMultiplexDao.findList(cfgId,isValid,null);
|
List<IpReusePolicyCfg> list=ipMultiplexDao.findList(cfgId,isValid);
|
||||||
IpReusePolicyCfg policyCfg=null;
|
IpReusePolicyCfg policyCfg=null;
|
||||||
if(list != null && list.size()>0){
|
if(list != null && list.size()>0){
|
||||||
policyCfg=list.get(0);
|
policyCfg=list.get(0);
|
||||||
@@ -119,6 +119,7 @@ public class IpMultiplexService extends BaseService{
|
|||||||
cfg.setIsAudit(isAudit);
|
cfg.setIsAudit(isAudit);
|
||||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditTime(auditTime);
|
cfg.setAuditTime(auditTime);
|
||||||
|
cfg.setDoLog(null);;
|
||||||
ipMultiplexDao.updatePolicyCfg(cfg);
|
ipMultiplexDao.updatePolicyCfg(cfg);
|
||||||
|
|
||||||
SysDictInfoService sysDictInfoService = SpringContextHolder.getBean(SysDictInfoService.class);
|
SysDictInfoService sysDictInfoService = SpringContextHolder.getBean(SysDictInfoService.class);
|
||||||
@@ -132,6 +133,9 @@ public class IpMultiplexService extends BaseService{
|
|||||||
params.put("addrPoolId", cfg.getAddrPoolId());
|
params.put("addrPoolId", cfg.getAddrPoolId());
|
||||||
params.put("userType", cfg.getUserType());
|
params.put("userType", cfg.getUserType());
|
||||||
params.put("userId", cfg.getUserId());
|
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("isValid", 1);
|
||||||
params.put("opTime", auditTime);
|
params.put("opTime", auditTime);
|
||||||
params.put("effectiveRange", areaEffectiveIds);
|
params.put("effectiveRange", areaEffectiveIds);
|
||||||
@@ -159,6 +163,9 @@ public class IpMultiplexService extends BaseService{
|
|||||||
params.put("addrPoolId", cfg.getAddrPoolId());
|
params.put("addrPoolId", cfg.getAddrPoolId());
|
||||||
params.put("userType", cfg.getUserType());
|
params.put("userType", cfg.getUserType());
|
||||||
params.put("userId", cfg.getUserId());
|
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("isValid", 0);
|
||||||
params.put("opTime", auditTime);
|
params.put("opTime", auditTime);
|
||||||
params.put("effectiveRange", areaEffectiveIds);
|
params.put("effectiveRange", areaEffectiveIds);
|
||||||
|
|||||||
@@ -84,20 +84,30 @@ $(function(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<!-- dolog begin-->
|
||||||
<div class="form-group">
|
<!-- <div class="row doLog"> -->
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="user"/></label>
|
<div class="col-md-6">
|
||||||
<div class="col-md-6">
|
<div class="form-group">
|
||||||
<select name="userId" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||||
<option value="" ><spring:message code="select"/></option>
|
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||||
<c:forEach items="${users }" var="user">
|
<c:choose>
|
||||||
<option value="${user.id}" <c:if test="${_cfg.userId eq user.id }">selected</c:if>><spring:message code="${user.userName}"/></option>
|
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||||
</c:forEach>
|
<label class="radio-inline">
|
||||||
</select>
|
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||||
</div>
|
</label>
|
||||||
<div for="userId"></div>
|
</c:when>
|
||||||
</div>
|
<c:otherwise>
|
||||||
</div>
|
<label class="radio-inline">
|
||||||
|
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||||
|
</label>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- dolog end-->
|
||||||
|
|
||||||
<c:if test="${fn:length(serviceList)>1}">
|
<c:if test="${fn:length(serviceList)>1}">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -128,6 +138,20 @@ $(function(){
|
|||||||
</c:if>
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="user"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="userId" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||||
|
<option value="" ><spring:message code="select"/></option>
|
||||||
|
<c:forEach items="${users }" var="user">
|
||||||
|
<option value="${user.id}" <c:if test="${_cfg.userId eq user.id }">selected</c:if>><spring:message code="${user.userName}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="userId"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="address_pool"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="address_pool"/></label>
|
||||||
|
|||||||
@@ -293,6 +293,7 @@
|
|||||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||||
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||||
<th><spring:message code="is_audit"/></th>
|
<th><spring:message code="is_audit"/></th>
|
||||||
|
<th><spring:message code="do_log"/></th>
|
||||||
<%-- <th><spring:message code="whether_area_block"/></th> --%>
|
<%-- <th><spring:message code="whether_area_block"/></th> --%>
|
||||||
<th><spring:message code="letter"/></th>
|
<th><spring:message code="letter"/></th>
|
||||||
<th><spring:message code="classification"/></th>
|
<th><spring:message code="classification"/></th>
|
||||||
@@ -349,6 +350,13 @@
|
|||||||
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||||
|
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||||
|
<spring:message code="${dict.itemValue }"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</td>
|
||||||
<%-- <td>
|
<%-- <td>
|
||||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||||
|
|||||||
Reference in New Issue
Block a user