域名拦截强度自定义域增加

This commit is contained in:
duandongmei
2018-10-15 19:30:04 +08:00
parent 1b1b68d2c8
commit f73cdd0741
6 changed files with 76 additions and 2 deletions

View File

@@ -365,6 +365,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
maatCfg.setUserRegion(userRegion); maatCfg.setUserRegion(userRegion);
} }
//域名拦截需要增加域名id和域名字符串自定义配置
if(StringUtil.isEmpty(maatCfg.getUserRegion()) if(StringUtil.isEmpty(maatCfg.getUserRegion())
|| maatCfg.getUserRegion().equals(Constants.USER_REGION_PLACEHOLDER)){ || maatCfg.getUserRegion().equals(Constants.USER_REGION_PLACEHOLDER)){
if(doaminFlag){ if(doaminFlag){
@@ -378,6 +379,18 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
} }
} }
//域名拦截需要增加拦截强度自定义域
if(doaminFlag){
if(StringUtil.isEmpty(entity.getUserRegion5()) || maatCfg.getUserRegion().equals(Constants.USER_REGION_PLACEHOLDER)){
userRegion= Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5();
maatCfg.setUserRegion(userRegion);
}else{
userRegion= maatCfg.getUserRegion();
userRegion=userRegion+";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5();
maatCfg.setUserRegion(userRegion);
}
}
configCompileList.add(maatCfg); configCompileList.add(maatCfg);
maatBean.setConfigCompileList(configCompileList); maatBean.setConfigCompileList(configCompileList);
maatBean.setAuditTime(entity.getAuditTime()); maatBean.setAuditTime(entity.getAuditTime());

View File

@@ -1 +0,0 @@
update function_region_dict set config_region_value ='NTC_SUBSCRIBE_ID' where dict_id='201';

View File

@@ -0,0 +1,19 @@
INSERT INTO sys_data_dictionary_name
(`id`, `module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`)
VALUES
(116, '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD>', 'INTERCEPT_DOMAIN_INTENSITY', '', 'user:<3A><><EFBFBD><EFBFBD>Ա,2018-10-15 15:24:55edit|user:<3A><><EFBFBD><EFBFBD>Ա,2018-10-15 15:24:37edit', "2018/10/15 15:24:04", "2018/10/15 15:24:55", 1);
INSERT INTO sys_data_dictionary_item
(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`)
VALUES
(2703, '1', 'weak_intensity', '<EFBFBD><EFBFBD>', 0, 1, 1, 116);
INSERT INTO sys_data_dictionary_item
(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`)
VALUES
(2704, '2', 'stronger_strong_intensity', '<EFBFBD><EFBFBD>ǿ', 0, 1, 1, 116);
INSERT INTO sys_data_dictionary_item
(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`)
VALUES
(2705, '3', 'strong_intensity', 'ǿ', 0, 1, 1, 116);

View File

@@ -0,0 +1,2 @@
update function_service_dict set is_valid=0 where dict_id=137 ;
update function_service_dict set function_id=5 where dict_id=108

View File

@@ -239,8 +239,33 @@
</div> </div>
</div> </div>
<!-- dolog end--> <!-- dolog end-->
<!-- 域名拦截增加拦截强度 -->
<c:if test="${_cfg.functionId eq 201}">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="intercept_intensity" />
</label>
<div class="col-md-6">
<select name="userRegion5"
class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('INTERCEPT_DOMAIN_INTENSITY')}" var="intensityC">
<option value="${intensityC.itemCode}" <c:if test="${_cfg.userRegion5==intensityC.itemCode || (empty _cfg.userRegion5 && intensityC.itemCode eq 1)}">selected</c:if>><spring:message code="${intensityC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="userRegion5"></div>
</div>
</div>
</div>
</c:if>
<%-- action 为1 监测时 可以选择证书--%> <%-- action 为1 监测时 可以选择证书--%>
<div class="row monitAction hidden"> <div class="row monitAction hidden">
<h4 class="form-section">
<spring:message code="action_region" />
<small></small>
</h4>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><spring:message <label class="control-label col-md-3"><spring:message
@@ -256,8 +281,12 @@
</div> </div>
</div> </div>
</div> </div>
<%-- action 为64 限速时 可以选择证书--%> <%-- action 为64 限速时 --%>
<div class="row ratelimitAction hidden"> <div class="row ratelimitAction hidden">
<h4 class="form-section">
<spring:message code="action_region" />
<small></small>
</h4>
<div class="col-md-6 hidden"> <div class="col-md-6 hidden">
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="limit_rate_type"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="limit_rate_type"/></label>

View File

@@ -341,6 +341,9 @@
<th><spring:message code="replace_zone"/></th> <th><spring:message code="replace_zone"/></th>
<th><spring:message code="replaced_content"/></th> <th><spring:message code="replaced_content"/></th>
<th><spring:message code="replace_content"/></th> <th><spring:message code="replace_content"/></th>
</c:if>
<c:if test="${cfg.functionId eq 201 }">
<th><spring:message code="intercept_intensity"/></th>
</c:if> </c:if>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th class="sort-column a.action"><spring:message code="block_type"/></th>
<%-- <th><spring:message code="do_log"/></th> --%> <%-- <th><spring:message code="do_log"/></th> --%>
@@ -403,6 +406,15 @@
${indexCfg.userRegion3 } ${indexCfg.userRegion3 }
</td> </td>
</c:if> </c:if>
<c:if test="${cfg.functionId eq 201 }">
<td>
<c:forEach items="${fns:getDictList('INTERCEPT_DOMAIN_INTENSITY') }" var="intentsityC">
<c:if test="${intentsityC.itemCode eq indexCfg.userRegion5 }">
<spring:message code="${intentsityC.itemValue }"/>
</c:if>
</c:forEach>
</td>
</c:if>
<td> <td>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq indexCfg.action }"> <c:if test="${dict.itemCode eq indexCfg.action }">