(1)修复IP类PZ查询条件值为0时后台没有传值的bug

(2)调整调整PZ入库的分类,性质,标签的字段,由ITEM_CODE 改为 service_dict_id
This commit is contained in:
wangxin
2018-03-12 11:38:46 +08:00
parent 939f7d68eb
commit 17668bceb7
6 changed files with 82 additions and 79 deletions

View File

@@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.nis.domain.Page;
import com.nis.domain.ServiceConfigInfo;
import com.nis.domain.basics.ServiceDictInfo;
import com.nis.domain.ServiceConfigInfo;
import com.nis.domain.basics.ServiceDictInfo;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.RequestInfo;
import com.nis.util.Constants;
@@ -65,7 +65,7 @@ public class IpCfgController extends BaseController{
model.addAttribute("page", page);
model.addAttribute("action", ipCfg.getAction());
model.addAttribute("tableName", tableName);
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
model.addAttribute("requestInfos", requestInfos);
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
model.addAttribute("fls", fls);

View File

@@ -276,19 +276,18 @@
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<choose>
<when test="page !=null and page.alias != null and page.alias != ''">
<if test="cfgId != null and cfgId != ''">
<if test="cfgId != null">
AND ${page.alias}.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null and cfgDesc != ''">
AND ${page.alias}.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="ipType != null and ipType != ''">
<if test="ipType != null">
AND ${page.alias}.IP_TYPE=#{ipType,jdbcType=INTEGER}
</if>
<if test="srcIp != null and srcIp != ''">
@@ -315,25 +314,25 @@
<if test="dstPortMask != null and dstPortMask !=''">
AND ${page.alias}.DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR}
</if>
<if test="direction != null and direction!= ''">
<if test="direction != null">
AND ${page.alias}.DIRECTION=#{direction,jdbcType=INTEGER}
</if>
<if test="protocol != null and protocol!=''">
<if test="protocol != null">
AND ${page.alias}.PROTOCOL=#{protocol,jdbcType=INTEGER}
</if>
<if test="protocolId != null and protocolId !=''">
<if test="protocolId != null">
AND ${page.alias}.PROTOCOL_ID=#{protocolId,jdbcType=INTEGER}
</if>
<if test="action != null and action !=''">
<if test="action != null">
AND ${page.alias}.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null and isValid !=''">
<if test="isValid != null">
AND ${page.alias}.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null and isValid !=''">
<if test="isValid == null">
AND ${page.alias}.IS_VALID != -1
</if>
<if test="isAudit != null and isAudit !=''">
<if test="isAudit != null">
AND ${page.alias}.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorName != null and creatorName !=''">
@@ -354,16 +353,16 @@
<if test="auditTime != null and auditTime !=''">
AND ${page.alias}.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null and serviceId !=''">
<if test="serviceId != null">
AND ${page.alias}.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null and requestId !=''">
<if test="requestId != null">
AND ${page.alias}.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null and compileId !=''">
<if test="compileId != null">
AND ${page.alias}.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null and isAreaEffective !=''">
<if test="isAreaEffective != null">
AND ${page.alias}.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null and classify !=''">
@@ -380,13 +379,13 @@
</if>
</when>
<otherwise>
<if test="cfgId != null and cfgId != ''">
<if test="cfgId != null">
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="ipType != null and ipType != ''">
<if test="ipType != null">
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
</if>
<if test="srcIp != null and srcIp != ''">
@@ -413,25 +412,25 @@
<if test="dstPortMask != null and dstPortMask !=''">
AND r.DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR}
</if>
<if test="direction != null and direction!= ''">
<if test="direction != null">
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
</if>
<if test="protocol != null and protocol!=''">
<if test="protocol != null">
AND r.PROTOCOL=#{protocol,jdbcType=INTEGER}
</if>
<if test="protocolId != null and protocolId !=''">
<if test="protocolId != null">
AND r.PROTOCOL_ID=#{protocolId,jdbcType=INTEGER}
</if>
<if test="action != null and action !=''">
<if test="action != null">
AND r.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null and isValid !=''">
<if test="isValid != null">
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null and isValid !=''">
<if test="isValid == null">
AND r.IS_VALID != -1
</if>
<if test="isAudit != null and isAudit !=''">
<if test="isAudit != null">
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorName != null and creatorName !=''">
@@ -452,16 +451,16 @@
<if test="auditTime != null and auditTime !=''">
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null and serviceId !=''">
<if test="serviceId != null">
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null and requestId !=''">
<if test="requestId != null">
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null and compileId !=''">
<if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null and isAreaEffective !=''">
<if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null and classify !=''">
@@ -478,7 +477,6 @@
</if>
</otherwise>
</choose>
</trim>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -528,34 +526,34 @@
update ${tableName}
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null" >
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="ipType != null" >
ip_type = #{ipType,jdbcType=INTEGER},
</if>
<if test="srcIp != null" >
<if test="srcIp != null and srcIp != ''" >
src_ip = #{srcIp,jdbcType=VARCHAR},
</if>
<if test="srcIpMask != null" >
<if test="srcIpMask != null and srcIpMask != ''" >
src_ip_mask = #{srcIpMask,jdbcType=VARCHAR},
</if>
<if test="srcPort != null" >
<if test="srcPort != null and srcPort != ''" >
src_port = #{srcPort,jdbcType=VARCHAR},
</if>
<if test="srcPortMask != null" >
<if test="srcPortMask != null and srcPortMask != ''" >
src_port_mask = #{srcPortMask,jdbcType=VARCHAR},
</if>
<if test="dstIp != null" >
<if test="dstIp != null and dstIp != ''" >
dst_ip = #{dstIp,jdbcType=VARCHAR},
</if>
<if test="dstIpMask != null" >
<if test="dstIpMask != null and dstIpMask != ''" >
dst_ip_mask = #{dstIpMask,jdbcType=VARCHAR},
</if>
<if test="dstPort != null" >
<if test="dstPort != null and dstPort != ''" >
dst_port = #{dstPort,jdbcType=VARCHAR},
</if>
<if test="srcPortMask != null" >
<if test="srcPortMask != null and srcPortMask != ''" >
dst_port_mask = #{srcPortMask,jdbcType=VARCHAR},
</if>
<if test="direction != null" >
@@ -579,19 +577,19 @@
<if test="creatorId != null" >
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
<if test="createTime != null and createTime != ''" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null" >
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="auditorId != null" >
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null" >
<if test="auditTime != null and auditTime != ''" >
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="serviceId != null" >
@@ -606,16 +604,16 @@
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="classify != null" >
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="attribute != null" >
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="lable != null" >
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="areaEffectiveIds != null" >
<if test="areaEffectiveIds != null and areaEffectiveIds != ''" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}
</if>
</trim>