1、协议中菜单dns增加公共组配置,同时修改审核,取消审核公共组部分,并且界面回显展示组号。
2、协议菜单中http url 增加公共组配置,同时修改审核,取消审核公共组部分,并且界面回显展示组号。
(cherry picked from commit d1f64348f4)
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.source_compile_id,a.cancel_request_id,
|
||||
a.do_blacklist
|
||||
a.do_blacklist,a.common_group_ids
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
@@ -490,7 +490,8 @@
|
||||
user_region5,
|
||||
do_log,
|
||||
source_compile_id,
|
||||
do_blacklist
|
||||
do_blacklist,
|
||||
common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -519,7 +520,8 @@
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{sourceCompileId,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -948,6 +950,9 @@
|
||||
user_region4 = #{userRegion4,jdbcType=VARCHAR},
|
||||
user_region5 = #{userRegion5,jdbcType=VARCHAR},
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
<if test="commonGroupIds != null">
|
||||
common_group_ids = #{commonGroupIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -3507,6 +3507,33 @@ public abstract class BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键字公共组配置处理
|
||||
* @param entity
|
||||
*/
|
||||
public void auditStrGroupCfg(List<GroupCfg> groupRelationList,BaseCfg entity){
|
||||
// url,跟dns公共组下发时用的组id
|
||||
if(entity!=null&&!StringUtil.isEmpty(entity.getCommonGroupIds())){
|
||||
// maat添加公共组信息
|
||||
String[] orgGroupIds=entity.getCommonGroupIds().split(",");
|
||||
for (int i = 0; i < orgGroupIds.length; i++) {
|
||||
if(!StringUtil.isEmpty(orgGroupIds[i])){
|
||||
List<Integer> listGroupId=new ArrayList<>();
|
||||
GroupCfg group = new GroupCfg();
|
||||
group.setGroupId(Integer.parseInt(orgGroupIds[i]));
|
||||
group.setCompileId(entity.getCompileId());
|
||||
group.setAuditTime(entity.getAuditTime());
|
||||
group.setIsValid(entity.getIsValid()); // '0无效,1有效,-1删除;
|
||||
group.setIsCommonGroup(1); // 标识为公共组 ,已下发过的组是否还需标记为公共组
|
||||
if(!listGroupId.contains(group.getGroupId())){
|
||||
groupRelationList.add(group);
|
||||
listGroupId.add(group.getGroupId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -577,7 +577,6 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getDomainCfg(entity.getCfgId(),entity.getCompileId());
|
||||
|
||||
if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){
|
||||
HttpUrlCfg cfg = new HttpUrlCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
@@ -616,6 +615,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
auditStrGroupCfg(groupRelationList, entity); // 是否添加公共组
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
@@ -643,6 +643,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
logger.info("domain配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
addKeepGroupList(maatCfg, entity);// 取消审核保留公共组
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
|
||||
@@ -1195,6 +1195,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
auditStrGroupCfg(groupRelationList, entity); // 是否添加公共组
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
@@ -1226,6 +1227,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
logger.info("dns配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
addKeepGroupList(maatCfg, entity);// 取消审核保留公共组
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<select name="commonGroupIds" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="dnsGroupInfo">
|
||||
<option value="${dnsGroupInfo.groupId}">${dnsGroupInfo.groupName}</option>
|
||||
<option value="${dnsGroupInfo.groupId}" <c:if test="${_cfg.commonGroupIds==dnsGroupInfo.groupId}">selected</c:if>>${dnsGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<select name="commonGroupIds" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="urlGroupInfo">
|
||||
<option value="${urlGroupInfo.groupId}">${urlGroupInfo.groupName}</option>
|
||||
<option value="${urlGroupInfo.groupId}" <c:if test="${_cfg.commonGroupIds==urlGroupInfo.groupId}">selected</c:if> >${urlGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
// 修改dns公共组时回显用
|
||||
if($("select[name$='commonGroupIds']").val()){
|
||||
addContent($(".dnsGroupAdd"),'dnsGroup');
|
||||
}
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<i id="schedule${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_DNS_REGIONTitle${index}" onclick="switchSubCfgTabInfo('NTC_DNS_REGION',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='dnsGroup' />
|
||||
<i id="NTC_DNS_REGION${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
@@ -350,4 +357,19 @@
|
||||
<%@include file="/WEB-INF/include/form/scheduleNewSubList.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 显示 公共组信息 -->
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_DNS_REGIONInfo${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<%-- <label><spring:message code='asn_no'/>:</label> --%>
|
||||
<label>
|
||||
${_cfg.commonGroupIds}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</html>
|
||||
@@ -13,6 +13,11 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
// 修改url公共组时回显用
|
||||
if($("select[name$='commonGroupIds']").val()){
|
||||
addContent($(".urlGroupAdd"),'urlGroup');
|
||||
}
|
||||
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<i id="schedule${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_URL_REGIONTitle${index}" onclick="switchSubCfgTabInfo('NTC_URL_REGION',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='urlGroup' />
|
||||
<i id="NTC_URL_REGION${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
@@ -345,4 +352,19 @@
|
||||
<%@include file="/WEB-INF/include/form/scheduleNewSubList.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 显示 公共组信息 -->
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_URL_REGIONInfo${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<%-- <label><spring:message code='asn_no'/>:</label> --%>
|
||||
<label>
|
||||
${_cfg.commonGroupIds}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</html>
|
||||
Reference in New Issue
Block a user