1、协议中菜单dns增加公共组配置,同时修改审核,取消审核公共组部分,并且界面回显展示组号。
2、协议菜单中http url 增加公共组配置,同时修改审核,取消审核公共组部分,并且界面回显展示组号。
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);//无效
|
||||
|
||||
Reference in New Issue
Block a user