域名拦截强度自定义域增加
This commit is contained in:
@@ -365,6 +365,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
}
|
||||
|
||||
//域名拦截需要增加域名id和域名字符串自定义配置
|
||||
if(StringUtil.isEmpty(maatCfg.getUserRegion())
|
||||
|| maatCfg.getUserRegion().equals(Constants.USER_REGION_PLACEHOLDER)){
|
||||
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);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
update function_region_dict set config_region_value ='NTC_SUBSCRIBE_ID' where dict_id='201';
|
||||
19
src/main/resources/sql/20181015/add_dictionary.sql
Normal file
19
src/main/resources/sql/20181015/add_dictionary.sql
Normal 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);
|
||||
@@ -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
|
||||
@@ -239,8 +239,33 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 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 监测时 可以选择证书--%>
|
||||
<div class="row monitAction hidden">
|
||||
<h4 class="form-section">
|
||||
<spring:message code="action_region" />
|
||||
<small></small>
|
||||
</h4>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
@@ -256,8 +281,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- action 为64 限速时 可以选择证书--%>
|
||||
<%-- action 为64 限速时 --%>
|
||||
<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="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="limit_rate_type"/></label>
|
||||
|
||||
@@ -341,6 +341,9 @@
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
<th><spring:message code="replaced_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>
|
||||
<th class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
<%-- <th><spring:message code="do_log"/></th> --%>
|
||||
@@ -403,6 +406,15 @@
|
||||
${indexCfg.userRegion3 }
|
||||
</td>
|
||||
</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>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
|
||||
Reference in New Issue
Block a user