Control Policy配置增加源/目的IP、关键字检索条件.
This commit is contained in:
@@ -282,9 +282,9 @@
|
||||
<if test="httpReqBody!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_body_cfg f
|
||||
<where>
|
||||
and cfg_type='NTC_HTTP_REQ_BODY'
|
||||
AND f.cfg_type = #{httpReqBody.cfgType}
|
||||
<if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''">
|
||||
and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
@@ -293,9 +293,9 @@
|
||||
<if test="httpResBody!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_body_cfg f
|
||||
<where>
|
||||
and cfg_type='NTC_HTTP_RES_BODY'
|
||||
AND f.cfg_type = #{httpResBody.cfgType}
|
||||
<if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''">
|
||||
and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
@@ -304,8 +304,9 @@
|
||||
<if test="httpReqHdr!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_req_head_cfg f
|
||||
<where>
|
||||
AND f.cfg_type = #{httpReqHdr.cfgType}
|
||||
<if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''">
|
||||
REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
@@ -313,8 +314,9 @@
|
||||
<if test="httpResHdr!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_res_head_cfg f
|
||||
<where>
|
||||
AND f.cfg_type = #{httpResHdr.cfgType}
|
||||
<if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''">
|
||||
REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
|
||||
@@ -100,6 +100,19 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
// 设置cfg_type,用于列表检索时区分
|
||||
if(entity.getHttpReqHdr() != null){
|
||||
entity.getHttpReqHdr().setCfgType(Constants.HTTP_REDIRECT_REQ_HEAD_REGION);
|
||||
}
|
||||
if(entity.getHttpReqBody() != null){
|
||||
entity.getHttpReqBody().setCfgType(Constants.HTTP_REDIRECT_REQ_BODY_REGION);
|
||||
}
|
||||
if(entity.getHttpResHdr() != null){
|
||||
entity.getHttpResHdr().setCfgType(Constants.HTTP_REDIRECT_RES_HEAD_REGION);
|
||||
}
|
||||
if(entity.getHttpResBody() != null){
|
||||
entity.getHttpResBody().setCfgType(Constants.HTTP_REDIRECT_RES_BODY_REGION);
|
||||
}
|
||||
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
|
||||
@@ -161,6 +161,19 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
// 设置cfg_type,用于列表检索时区分
|
||||
if(entity.getHttpReqHdr() != null){
|
||||
entity.getHttpReqHdr().setCfgType(Constants.HTTP_REQ_HEAD_REGION);
|
||||
}
|
||||
if(entity.getHttpReqBody() != null){
|
||||
entity.getHttpReqBody().setCfgType(Constants.HTTP_REQ_BODY_REGION);
|
||||
}
|
||||
if(entity.getHttpResHdr() != null){
|
||||
entity.getHttpResHdr().setCfgType(Constants.HTTP_RES_HEAD_REGION);
|
||||
}
|
||||
if(entity.getHttpResBody() != null){
|
||||
entity.getHttpResBody().setCfgType(Constants.HTTP_RES_BODY_REGION);
|
||||
}
|
||||
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
|
||||
Reference in New Issue
Block a user