(1)修复基础协议,app协议,加密隧道行为主配置被账号配置覆盖的bug
(2)DNS配置下发时,只展示有审核通过的欺骗IP的DNS策略
This commit is contained in:
@@ -323,7 +323,7 @@ public class WebsiteController extends BaseController{
|
|||||||
initFormCondition(model,entity);
|
initFormCondition(model,entity);
|
||||||
}
|
}
|
||||||
//获取所有响应策略信息
|
//获取所有响应策略信息
|
||||||
List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(null, 1,1);
|
List<DnsResStrategy> resStrategys=dnsResStrategyService.findhasValidIpResStrategys(null, 1,1);
|
||||||
model.addAttribute("dnsResStrategys", resStrategys);
|
model.addAttribute("dnsResStrategys", resStrategys);
|
||||||
model.addAttribute("_cfg", entity);
|
model.addAttribute("_cfg", entity);
|
||||||
return "/cfg/website/dnsForm";
|
return "/cfg/website/dnsForm";
|
||||||
|
|||||||
@@ -14,5 +14,8 @@ public interface DnsResStrategyDao extends CrudDao<DnsResStrategy> {
|
|||||||
List<DnsResStrategy> findList(@Param("cfgId")Long cfgId
|
List<DnsResStrategy> findList(@Param("cfgId")Long cfgId
|
||||||
,@Param("isAudit")Integer isAudit
|
,@Param("isAudit")Integer isAudit
|
||||||
,@Param("isValid")Integer isValid);
|
,@Param("isValid")Integer isValid);
|
||||||
|
List<DnsResStrategy> findhasValidIpList(@Param("cfgId")Long cfgId
|
||||||
|
,@Param("isAudit")Integer isAudit
|
||||||
|
,@Param("isValid")Integer isValid);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -164,6 +164,37 @@
|
|||||||
</where>
|
</where>
|
||||||
order by cfg_Id
|
order by cfg_Id
|
||||||
</select>
|
</select>
|
||||||
|
<!-- 查出所有 有效数据-->
|
||||||
|
<select id="findhasValidIpList" resultMap="DnsResStrategyMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="DnsResStrategyColumns"/>
|
||||||
|
FROM (
|
||||||
|
SELECT DISTINCT dns_strategy_id FROM dns_ip_cfg WHERE is_valid=1 AND is_audit=1
|
||||||
|
) a
|
||||||
|
LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||||
|
<where>
|
||||||
|
<if test="isValid == -1">
|
||||||
|
AND r.is_valid !=-1
|
||||||
|
</if>
|
||||||
|
<if test="isValid == 1">
|
||||||
|
AND r.is_valid =1
|
||||||
|
</if>
|
||||||
|
<if test="isValid == 0">
|
||||||
|
AND r.is_valid =0
|
||||||
|
</if>
|
||||||
|
<if test="isAudit == 0">
|
||||||
|
AND r.is_audit =0
|
||||||
|
</if>
|
||||||
|
<if test="isAudit == 1">
|
||||||
|
AND r.is_audit =1
|
||||||
|
</if>
|
||||||
|
<if test="cfgId != null">
|
||||||
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<![CDATA[ and r.cfg_id <> 0]]>
|
||||||
|
</where>
|
||||||
|
order by r.cfg_Id
|
||||||
|
</select>
|
||||||
<insert id="insert" parameterType="com.nis.domain.configuration.DnsResStrategy" >
|
<insert id="insert" parameterType="com.nis.domain.configuration.DnsResStrategy" >
|
||||||
insert into dns_res_strategy (
|
insert into dns_res_strategy (
|
||||||
CFG_DESC,
|
CFG_DESC,
|
||||||
|
|||||||
@@ -202,15 +202,15 @@ public class AppCfgService extends BaseService {
|
|||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
entity.setIsAudit(0);
|
entity.setIsAudit(0);
|
||||||
// 设置SubscribeID域配置参数
|
// 设置SubscribeID域配置参数
|
||||||
if (entity != null && entity.getNtcSubscribeIdCfgList() != null) {
|
// if (entity != null && entity.getNtcSubscribeIdCfgList() != null) {
|
||||||
for (NtcSubscribeIdCfg cfg : entity.getNtcSubscribeIdCfgList()) {
|
// for (NtcSubscribeIdCfg cfg : entity.getNtcSubscribeIdCfgList()) {
|
||||||
entity.setExprType(cfg.getExprType());
|
// entity.setExprType(cfg.getExprType());
|
||||||
entity.setIsHexbin(cfg.getIsHexbin());
|
// entity.setIsHexbin(cfg.getIsHexbin());
|
||||||
entity.setMatchMethod(cfg.getMatchMethod());
|
// entity.setMatchMethod(cfg.getMatchMethod());
|
||||||
entity.setCfgKeywords(cfg.getCfgKeywords());
|
// entity.setCfgKeywords(cfg.getCfgKeywords());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
entity.initDefaultValue();
|
// entity.initDefaultValue();
|
||||||
appCfgDao.insertAppPolicyCfg(entity);
|
appCfgDao.insertAppPolicyCfg(entity);
|
||||||
// 保存策略IP配置
|
// 保存策略IP配置
|
||||||
if (entity != null && entity.getIpPortList() != null) {
|
if (entity != null && entity.getIpPortList() != null) {
|
||||||
@@ -224,7 +224,7 @@ public class AppCfgService extends BaseService {
|
|||||||
for (NtcSubscribeIdCfg cfg : entity.getNtcSubscribeIdCfgList()) {
|
for (NtcSubscribeIdCfg cfg : entity.getNtcSubscribeIdCfgList()) {
|
||||||
if (StringUtils.isNotBlank(cfg.getCfgKeywords())) {
|
if (StringUtils.isNotBlank(cfg.getCfgKeywords())) {
|
||||||
entity.setCfgKeywords(cfg.getCfgKeywords());
|
entity.setCfgKeywords(cfg.getCfgKeywords());
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgRegionCode", "cfgType" });
|
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgRegionCode", "cfgType", "exprType", "matchMethod", "isHexbin" });
|
||||||
stringcfgDao.saveSubscribeIdCfg(cfg);
|
stringcfgDao.saveSubscribeIdCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -244,13 +244,13 @@ public class AppCfgService extends BaseService {
|
|||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
entity.setIsAudit(0);
|
entity.setIsAudit(0);
|
||||||
// 设置SubscribeID域配置参数
|
// 设置SubscribeID域配置参数
|
||||||
if (entity != null && entity.getNtcSubscribeIdCfgList() != null) {
|
// if (entity != null && entity.getNtcSubscribeIdCfgList() != null) {
|
||||||
for (NtcSubscribeIdCfg cfg : entity.getNtcSubscribeIdCfgList()) {
|
// for (NtcSubscribeIdCfg cfg : entity.getNtcSubscribeIdCfgList()) {
|
||||||
entity.setExprType(cfg.getExprType());
|
// entity.setExprType(cfg.getExprType());
|
||||||
entity.setIsHexbin(cfg.getIsHexbin());
|
// entity.setIsHexbin(cfg.getIsHexbin());
|
||||||
entity.setMatchMethod(cfg.getMatchMethod());
|
// entity.setMatchMethod(cfg.getMatchMethod());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
appCfgDao.updateAppPolicyCfg(entity);
|
appCfgDao.updateAppPolicyCfg(entity);
|
||||||
|
|
||||||
// 先删后加 各域配置
|
// 先删后加 各域配置
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ public class DnsResStrategyService extends BaseService{
|
|||||||
List<DnsResStrategy> list=dnsResStrategyDao.findList(cfgId,isValid,isAudit);
|
List<DnsResStrategy> list=dnsResStrategyDao.findList(cfgId,isValid,isAudit);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
public List<DnsResStrategy> findhasValidIpResStrategys(Long cfgId,Integer isValid,Integer isAudit) {
|
||||||
|
List<DnsResStrategy> list=dnsResStrategyDao.findhasValidIpList(cfgId,isValid,isAudit);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
public DnsResStrategy getDnsResStrategy(Long id,Integer isValid) {
|
public DnsResStrategy getDnsResStrategy(Long id,Integer isValid) {
|
||||||
List<DnsResStrategy> list=dnsResStrategyDao.findList(id,isValid,null);
|
List<DnsResStrategy> list=dnsResStrategyDao.findList(id,isValid,null);
|
||||||
|
|||||||
Reference in New Issue
Block a user