协议ID修改

This commit is contained in:
wangxin
2018-07-12 15:19:37 +08:00
parent f1abf9062d
commit ed4e9201e3
4 changed files with 7 additions and 126 deletions

View File

@@ -66,7 +66,7 @@ public class XmppController extends BaseController {
@RequestMapping(value = {"updateXmppCfgValid"})
@RequiresPermissions(value={"other:xmpp:config"})
public String updateXmppCfgValid(Integer isValid,String ids,Integer functionId) {
websiteCfgService.updateHttpCfgValid(isValid,ids,functionId);
xmppCfgService.updateXmppCfgValid(isValid,ids,functionId);
return "redirect:" + adminPath +"/ntc/other/xmppList?functionId="+functionId;
}
@RequestMapping(value = {"auditXmppCfg"})

View File

@@ -217,7 +217,7 @@
<if test="ipPort!=null">
AND a.compile_id in (select t.compile_id from ip_port_cfg t
<where>
and t.protocol_id=19
and t.protocol_id=20
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
</if>
@@ -506,7 +506,7 @@
</update>
<!-- 删除http子配置 -->
<delete id="deleteIpCfg" >
delete from ip_port_cfg where compile_id=#{compileId} and protocol_id=19 and function_id=#{functionId}
delete from ip_port_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
<delete id="deleteHttpUrlCfg">
delete from http_url_cfg where compile_id=#{compileId} and function_id=#{functionId}

View File

@@ -217,7 +217,7 @@
<if test="ipPort!=null">
AND a.compile_id in (select t.compile_id from ip_port_cfg t
<where>
and t.protocol_id=4
and t.protocol_id=17
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
</if>
@@ -395,126 +395,7 @@
#{cfgRegionCode,jdbcType=INTEGER}
)
</insert>
<!-- insert http_req_hdr_cfg表信息 -->
<!-- <insert id="saveHttpReqHdrCfg" parameterType="com.nis.domain.configuration.HttpReqHeadCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into http_req_head_cfg (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
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,
function_id,
district,
cfg_keywords,
cfg_type,
cfg_region_code,
expr_type,
match_method,
is_hexbin
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{district,jdbcType=VARCHAR},
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER}
)
</insert> -->
<!-- insert http_url_cfg表信息 -->
<!-- <insert id="saveHttpUrlCfg" parameterType="com.nis.domain.configuration.HttpUrlCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into http_url_cfg (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
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,
function_id,
cfg_keywords,
cfg_type,
cfg_region_code,
expr_type,
match_method,
is_hexbin
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER}
)
</insert> -->
<update id="updateCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
update cfg_index_info
<set >
@@ -571,7 +452,7 @@
</update>
<!-- 删除http子配置 -->
<delete id="deleteXmppIpCfg" >
delete from ip_port_cfg where compile_id=#{compileId} and protocol_id=16 and function_id=#{functionId}
delete from ip_port_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},

View File

@@ -118,7 +118,7 @@ public class XmppCfgService extends CrudService<XmppCfgDao,CfgIndexInfo> {
}
}
}
public void updateHttpCfgValid(Integer isValid,String ids,Integer functionId){
public void updateXmppCfgValid(Integer isValid,String ids,Integer functionId){
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){