From 3af6ecf053d29a4abebeb1e1c8687c3fe786328e Mon Sep 17 00:00:00 2001 From: renkaige Date: Tue, 16 Oct 2018 18:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BAGroupReuse=E4=B8=AD=E6=B7=BB=E5=8A=A0s?= =?UTF-8?q?ervice=E5=AD=97=E6=AE=B5,=E4=B8=BAIpRegion=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0userregion=E5=AD=97=E6=AE=B5,=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81app=E5=8D=8F=E8=AE=AEip=E4=B8=9A=E5=8A=A1=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E6=B7=BB=E5=8A=A0=E5=9F=9F=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/domain/restful/GroupReuse.java | 10 + .../java/com/nis/domain/restful/IpRegion.java | 274 ++++++++++-------- 2 files changed, 158 insertions(+), 126 deletions(-) diff --git a/src/main/java/com/nis/domain/restful/GroupReuse.java b/src/main/java/com/nis/domain/restful/GroupReuse.java index 1b3fdd5..52fd608 100644 --- a/src/main/java/com/nis/domain/restful/GroupReuse.java +++ b/src/main/java/com/nis/domain/restful/GroupReuse.java @@ -24,6 +24,9 @@ import com.wordnik.swagger.annotations.ApiModelProperty; public class GroupReuse implements Serializable { private static final long serialVersionUID = 1L; + // ASN-IP阻断和监测不用传service和ipregion.userRegion字段,当是app协议ip业务时需要传入ipregion.userRegion字段 + @ApiModelProperty(value = "业务ID", required = true) + private Integer service; @ApiModelProperty(value = "字符串域分组列表", access = "", required = true) private List strRegionList; @@ -80,4 +83,11 @@ public class GroupReuse implements Serializable { this.numRegionList = numRegionList; } + public Integer getService() { + return service; + } + + public void setService(Integer service) { + this.service = service; + } } diff --git a/src/main/java/com/nis/domain/restful/IpRegion.java b/src/main/java/com/nis/domain/restful/IpRegion.java index 5f37149..11687d2 100644 --- a/src/main/java/com/nis/domain/restful/IpRegion.java +++ b/src/main/java/com/nis/domain/restful/IpRegion.java @@ -15,61 +15,64 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.wordnik.swagger.annotations.ApiModelProperty; -/** -* @ClassName: StrRegion -* @Description: TODO(这里用一句话描述这个类的作用) -* @author (darnell) -* @date 2016年8月29日 下午10:29:45 -* @version V1.0 -*/ +/** + * @ClassName: StrRegion + * @Description: TODO(这里用一句话描述这个类的作用) + * @author (darnell) + * @date 2016年8月29日 下午10:29:45 + * @version V1.0 + */ public class IpRegion implements Serializable { - /** - * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) - */ + /** + * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) + */ private static final long serialVersionUID = 1L; - @ApiModelProperty(value="域ID", required=true) + @ApiModelProperty(value = "域ID", required = true) private Long regionId; - @ApiModelProperty(value="分组ID", required=true) + @ApiModelProperty(value = "分组ID", required = true) private Long groupId; - - @ApiModelProperty(value="业务表名称", required=true) + + @ApiModelProperty(value = "业务表名称", required = true) private String tableName; - - @ApiModelProperty(value="地址类型", required=true) + + @ApiModelProperty(value = "地址类型", required = true) private Integer addrType; - @ApiModelProperty(value="源IP", required=true) + @ApiModelProperty(value = "源IP", required = true) private String srcIp; - @ApiModelProperty(value="源IP掩码", required=true) + @ApiModelProperty(value = "源IP掩码", required = true) private String maskSrcIp; - @ApiModelProperty(value="源端口", required=true) + @ApiModelProperty(value = "源端口", required = true) private String srcPort; - @ApiModelProperty(value="源端口掩码", required=true) + @ApiModelProperty(value = "源端口掩码", required = true) private String maskSrcPort; - @ApiModelProperty(value="目的IP", required=true) + @ApiModelProperty(value = "目的IP", required = true) private String dstIp; - @ApiModelProperty(value="目的IP掩码", required=true) + @ApiModelProperty(value = "目的IP掩码", required = true) private String maskDstIp; - @ApiModelProperty(value="目的端口", required=true) + @ApiModelProperty(value = "目的端口", required = true) private String dstPort; - @ApiModelProperty(value="目的端口掩码", required=true) + @ApiModelProperty(value = "目的端口掩码", required = true) private String maskDstPort; - @ApiModelProperty(value="协议", required=true) + @ApiModelProperty(value = "协议", required = true) private Integer protocol; - @ApiModelProperty(value="方向", required=true) + @ApiModelProperty(value = "方向", required = true) private Integer direction; - @ApiModelProperty(value="有效标志", required=true) + @ApiModelProperty(value = "有效标志", required = true) private Integer isValid; - @ApiModelProperty(value="操作时间", required=true) - @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "操作时间", required = true) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date opTime; - @ApiModelProperty(value="版本序列号", required=true) + @ApiModelProperty(value = "版本序列号", required = true) private Long procSeq; - + @ApiModelProperty(value = "本地更新时间 ", required = true) private Date lastUpdate; - - + + // 为app协议ip业务添加userregion字段,该业务的ip域需要下发到阀门中,阀门需要userregion字段,校验时需要校验当为app协议ip业务时userregion字段不能为空 + @ApiModelProperty(value = "用户自定义域", required = true) + private String userRegion; + @JsonIgnore public Long getProcSeq() { return procSeq; @@ -78,6 +81,7 @@ public class IpRegion implements Serializable { public void setProcSeq(Long procSeq) { this.procSeq = procSeq; } + @JsonIgnore public Date getLastUpdate() { return lastUpdate; @@ -87,212 +91,227 @@ public class IpRegion implements Serializable { this.lastUpdate = lastUpdate; } - /** - * @return regionId - */ + /** + * @return regionId + */ public Long getRegionId() { return regionId; } - /** - * @param regionId 要设置的 regionId - */ + /** + * @param regionId + * 要设置的 regionId + */ public void setRegionId(Long regionId) { this.regionId = regionId; } - /** - * @return groupId - */ + /** + * @return groupId + */ public Long getGroupId() { return groupId; } - /** - * @param groupId 要设置的 groupId - */ + /** + * @param groupId + * 要设置的 groupId + */ public void setGroupId(Long groupId) { this.groupId = groupId; } - /** - * @return addrType - */ + /** + * @return addrType + */ public Integer getAddrType() { return addrType; } - /** - * @param addrType 要设置的 addrType - */ + /** + * @param addrType + * 要设置的 addrType + */ public void setAddrType(Integer addrType) { this.addrType = addrType; } - /** - * @return srcIp - */ + /** + * @return srcIp + */ public String getSrcIp() { return srcIp; } - /** - * @param srcIp 要设置的 srcIp - */ + /** + * @param srcIp + * 要设置的 srcIp + */ public void setSrcIp(String srcIp) { this.srcIp = srcIp; } - /** - * @return maskSrcIp - */ + /** + * @return maskSrcIp + */ public String getMaskSrcIp() { return maskSrcIp; } - /** - * @param maskSrcIp 要设置的 maskSrcIp - */ + /** + * @param maskSrcIp + * 要设置的 maskSrcIp + */ public void setMaskSrcIp(String maskSrcIp) { this.maskSrcIp = maskSrcIp; } - /** - * @return srcPort - */ + /** + * @return srcPort + */ public String getSrcPort() { return srcPort; } - /** - * @param srcPort 要设置的 srcPort - */ + /** + * @param srcPort + * 要设置的 srcPort + */ public void setSrcPort(String srcPort) { this.srcPort = srcPort; } - /** - * @return maskSrcPort - */ + /** + * @return maskSrcPort + */ public String getMaskSrcPort() { return maskSrcPort; } - /** - * @param maskSrcPort 要设置的 maskSrcPort - */ + /** + * @param maskSrcPort + * 要设置的 maskSrcPort + */ public void setMaskSrcPort(String maskSrcPort) { this.maskSrcPort = maskSrcPort; } - /** - * @return dstIp - */ + /** + * @return dstIp + */ public String getDstIp() { return dstIp; } - /** - * @param dstIp 要设置的 dstIp - */ + /** + * @param dstIp + * 要设置的 dstIp + */ public void setDstIp(String dstIp) { this.dstIp = dstIp; } - /** - * @return maskDstIp - */ + /** + * @return maskDstIp + */ public String getMaskDstIp() { return maskDstIp; } - /** - * @param maskDstIp 要设置的 maskDstIp - */ + /** + * @param maskDstIp + * 要设置的 maskDstIp + */ public void setMaskDstIp(String maskDstIp) { this.maskDstIp = maskDstIp; } - /** - * @return dstPort - */ + /** + * @return dstPort + */ public String getDstPort() { return dstPort; } - /** - * @param dstPort 要设置的 dstPort - */ + /** + * @param dstPort + * 要设置的 dstPort + */ public void setDstPort(String dstPort) { this.dstPort = dstPort; } - /** - * @return maskDstPort - */ + /** + * @return maskDstPort + */ public String getMaskDstPort() { return maskDstPort; } - /** - * @param maskDstPort 要设置的 maskDstPort - */ + /** + * @param maskDstPort + * 要设置的 maskDstPort + */ public void setMaskDstPort(String maskDstPort) { this.maskDstPort = maskDstPort; } - /** - * @return protocol - */ + /** + * @return protocol + */ public Integer getProtocol() { return protocol; } - /** - * @param protocol 要设置的 protocol - */ + /** + * @param protocol + * 要设置的 protocol + */ public void setProtocol(Integer protocol) { this.protocol = protocol; } - /** - * @return direction - */ + /** + * @return direction + */ public Integer getDirection() { return direction; } - /** - * @param direction 要设置的 direction - */ + /** + * @param direction + * 要设置的 direction + */ public void setDirection(Integer direction) { this.direction = direction; } - /** - * @return isValid - */ + /** + * @return isValid + */ public Integer getIsValid() { return isValid; } - /** - * @param isValid 要设置的 isValid - */ + /** + * @param isValid + * 要设置的 isValid + */ public void setIsValid(Integer isValid) { this.isValid = isValid; } - /** - * @return opTime - */ + /** + * @return opTime + */ public Date getOpTime() { return opTime; } - /** - * @param opTime 要设置的 opTime - */ + /** + * @param opTime + * 要设置的 opTime + */ public void setOpTime(Date opTime) { this.opTime = opTime; } @@ -305,9 +324,12 @@ public class IpRegion implements Serializable { this.tableName = tableName; } + public String getUserRegion() { + return userRegion; + } - - - + public void setUserRegion(String userRegion) { + this.userRegion = userRegion; + } }