dns配置功能提交

Signed-off-by: zhangwei <zhangwei@intranet.com>
This commit is contained in:
zhangwei
2018-06-04 12:43:06 +08:00
parent 1874592ed0
commit 24c37c1834
9 changed files with 1306 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.domain.configuration.BaseCfg;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.domain.configuration.DnsDomainCfg;
import com.nis.domain.configuration.DnsIpCfg;
import com.nis.domain.configuration.HttpBodyCfg;
@@ -51,11 +52,11 @@ public interface WebsiteCfgDao extends CrudDao<CfgIndexInfo>{
public void updateCfgValid(BaseCfg entity);
public void auditCfg(BaseCfg entity);
public List<CfgIndexInfo> getDnsList(CfgIndexInfo entity);
public List<DnsIpCfg> getDnsIp(CfgIndexInfo entity);
public List<DnsDomainCfg> getDnsDomain(CfgIndexInfo entity);
public void saveDnsIpCfg(DnsIpCfg entity);
public void saveDnsDomainCfg(DnsDomainCfg entity);
// public List<CfgIndexInfo> getDnsList(CfgIndexInfo entity);
// public List<DnsIpCfg> getDnsIp(CfgIndexInfo entity);
public List<ComplexkeywordCfg> getDnsDomainList(CfgIndexInfo entity);
// public void saveDnsIpCfg(DnsIpCfg entity);
public void saveDnsDomainCfg(ComplexkeywordCfg entity);
public void deleteDnsIpCfg(CfgIndexInfo entity);
public void deleteDnsDomainCfg(CfgIndexInfo entity);

View File

@@ -346,6 +346,7 @@
<include refid="ComplexCfg_Column" />
FROM http_res_head_cfg a where compile_id=#{compileId} and function_id=#{functionId}
</select>
<!-- ssl关键字查询 -->
<select id="getSslKewordList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
SELECT
<include refid="StrCfg_Column" />
@@ -353,6 +354,15 @@
<if test="cfgType != null and cfgType != ''">
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
</if>
</select>
<!-- dns域名查询 -->
<select id="getDnsDomainList" resultMap="complexCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
SELECT
<include refid="ComplexCfg_Column" />
FROM dns_domain_cfg a where compile_id=#{compileId} and function_id=#{functionId}
<if test="cfgType != null and cfgType != ''">
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
</if>
</select>
<!-- insert cfgIndexInfox -->
<insert id="saveCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
@@ -883,4 +893,74 @@
<delete id="deleteSslKeywordCfg">
delete from ssl_keyword_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
<!-- insert dns_domain_cfg表信息 -->
<insert id="saveDnsDomainCfg" parameterType="com.nis.domain.configuration.DnsDomainCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into dns_domain_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>
<!-- 删除dns ip子配置 -->
<delete id="deleteDnsIpCfg" >
delete from ip_port_cfg where compile_id=#{compileId} and protocol_id=6 and function_id=#{functionId}
</delete>
<!-- 删除dns域名配置 -->
<delete id="deleteDnsDomainCfg">
delete from dns_domain_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
</mapper>