dns所有策略均校验是否存在欺骗ip
This commit is contained in:
@@ -197,9 +197,12 @@
|
|||||||
<if test="isValid != null">
|
<if test="isValid != null">
|
||||||
AND r.is_valid=#{isValid,jdbcType=INTEGER}
|
AND r.is_valid=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="dnsStrategyId != null">
|
<if test="dnsStrategyId != null and dnsStrategyId ==0">
|
||||||
AND r.dns_strategy_id=#{dnsStrategyId,jdbcType=INTEGER}
|
AND r.dns_strategy_id=#{dnsStrategyId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dnsStrategyId != null and dnsStrategyId !=0">
|
||||||
|
and r.dns_strategy_id in (select t.res_group_1_id from dns_res_strategy t where cfg_id=#{dnsStrategyId,jdbcType=INTEGER})
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -1016,18 +1016,18 @@ jQuery.validator.addMethod("ipMaskSole",function(value,element) {
|
|||||||
// DNS阻断无策略校验
|
// DNS阻断无策略校验
|
||||||
jQuery.validator.addMethod("noStrategyCheck",function(value,element) {
|
jQuery.validator.addMethod("noStrategyCheck",function(value,element) {
|
||||||
var flag = true;
|
var flag = true;
|
||||||
if(value == 0){
|
//if(value == 0){
|
||||||
var ctx = $(element).attr("ctx");
|
var ctx = $(element).attr("ctx");
|
||||||
var url = ctx+"/cfg/dnsIp/dnsNoStrategyCheck";
|
var url = ctx+"/cfg/dnsIp/dnsNoStrategyCheck";
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
async:false,
|
async:false,
|
||||||
url: url,
|
url: url,
|
||||||
data:{"dnsStrategyId":0},
|
data:{"dnsStrategyId":value},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
flag = data;
|
flag = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
//}
|
||||||
return flag;
|
return flag;
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user