修复缓存策略配置、IP分组管理、DNS分组管理导出黑屏bug
This commit is contained in:
@@ -251,18 +251,20 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查出所有 有效数据-->
|
<!-- 查出所有 有效数据-->
|
||||||
<select id="findPolicyByGroupInfoList" resultMap="PolicyGroupInfoMap">
|
<select id="findPolicyByGroupInfoList" resultMap="PolicyGroupInfoMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="PolicyGroupInfoColumns"/>
|
<include refid="PolicyGroupInfoColumns"/>
|
||||||
<trim prefix="," prefixOverrides=",">
|
<trim prefix="," prefixOverrides=",">
|
||||||
, s.name as creator_name
|
, s.name as creator_name
|
||||||
,e.name as editor_name
|
,e.name as editor_name
|
||||||
</trim>
|
</trim>
|
||||||
FROM policy_group_info r
|
FROM
|
||||||
left join sys_user s on r.creator_id=s.id
|
policy_group_info r
|
||||||
left join sys_user e on r.editor_id=e.id
|
left join sys_user s on r.creator_id=s.id
|
||||||
where r.CFG_ID in (${ids})
|
left join sys_user e on r.editor_id=e.id
|
||||||
|
WHERE
|
||||||
|
r.group_id IN (${ids})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||||
<result column="source_compile_id" property="sourceCompileId" jdbcType="INTEGER" />
|
<!-- <result column="source_compile_id" property="sourceCompileId" jdbcType="INTEGER" /> -->
|
||||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||||
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|||||||
@@ -77,29 +77,32 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
List<CachePolicyUserRegion> list = commonPolicyDao.getCachePolicyUserRegionList(entity);
|
List<CachePolicyUserRegion> list = commonPolicyDao.getCachePolicyUserRegionList(entity);
|
||||||
for (CachePolicyUserRegion c : list) {
|
for (CachePolicyUserRegion c : list) {
|
||||||
JSONObject jsonObject=JSONObject.fromObject(c.getUserRegion1());
|
if(!StringUtil.isBlank(c.getUserRegion1())) { // action为缓存白名单时 userRegion1 为null
|
||||||
CachePolicyUserRegion stu=(CachePolicyUserRegion)JSONObject.toBean(jsonObject, CachePolicyUserRegion.class);
|
JSONObject jsonObject=JSONObject.fromObject(c.getUserRegion1());
|
||||||
c.setCache_cookied_cont(stu.getCache_cookied_cont());
|
CachePolicyUserRegion stu=(CachePolicyUserRegion)JSONObject.toBean(jsonObject, CachePolicyUserRegion.class);
|
||||||
c.setCache_dyn_url(stu.getCache_dyn_url());
|
c.setCache_cookied_cont(stu.getCache_cookied_cont());
|
||||||
c.setForce_caching(stu.getForce_caching());
|
c.setCache_dyn_url(stu.getCache_dyn_url());
|
||||||
c.setIgnore_req_nocache(stu.getIgnore_req_nocache());
|
c.setForce_caching(stu.getForce_caching());
|
||||||
c.setIgnore_res_nocache(stu.getIgnore_res_nocache());
|
c.setIgnore_req_nocache(stu.getIgnore_req_nocache());
|
||||||
c.setInactive_time(stu.getInactive_time());
|
c.setIgnore_res_nocache(stu.getIgnore_res_nocache());
|
||||||
c.setMax_cache_obj_size(stu.getMax_cache_obj_size());
|
c.setInactive_time(stu.getInactive_time());
|
||||||
c.setMax_cache_size(stu.getMax_cache_size());
|
c.setMax_cache_obj_size(stu.getMax_cache_obj_size());
|
||||||
c.setMin_use(stu.getMin_use());
|
c.setMax_cache_size(stu.getMax_cache_size());
|
||||||
c.setNo_revalidate(stu.getNo_revalidate());
|
c.setMin_use(stu.getMin_use());
|
||||||
c.setPinning_time(stu.getPinning_time());
|
c.setNo_revalidate(stu.getNo_revalidate());
|
||||||
if(stu.getCache_key()!=null){
|
c.setPinning_time(stu.getPinning_time());
|
||||||
String ignore=String.valueOf(stu.getCache_key().get("ignore_qs"));
|
if(stu.getCache_key()!=null){
|
||||||
String cookie=String.valueOf(stu.getCache_key().get("cookie"));
|
String ignore=String.valueOf(stu.getCache_key().get("ignore_qs"));
|
||||||
if(!ignore.equals("null") && ignore!=null){
|
String cookie=String.valueOf(stu.getCache_key().get("cookie"));
|
||||||
c.setIgnore_qs(ignore);
|
if(!ignore.equals("null") && ignore!=null){
|
||||||
}
|
c.setIgnore_qs(ignore);
|
||||||
if(!cookie.equals("null") && cookie!=null){
|
}
|
||||||
c.setCookie(cookie);
|
if(!cookie.equals("null") && cookie!=null){
|
||||||
}
|
c.setCookie(cookie);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -109,20 +112,21 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(String ids){
|
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(String ids){
|
||||||
List<CachePolicyUserRegion> list = commonPolicyDao.getCachePolicyByUserRegionList(ids);
|
List<CachePolicyUserRegion> list = commonPolicyDao.getCachePolicyByUserRegionList(ids);
|
||||||
for (CachePolicyUserRegion c : list) {
|
for (CachePolicyUserRegion c : list) {
|
||||||
JSONObject jsonObject=JSONObject.fromObject(c.getUserRegion1());
|
if(!StringUtil.isBlank(c.getUserRegion1())) { // action为缓存白名单时 userRegion1 为null
|
||||||
CachePolicyUserRegion stu=(CachePolicyUserRegion)JSONObject.toBean(jsonObject, CachePolicyUserRegion.class);
|
JSONObject jsonObject=JSONObject.fromObject(c.getUserRegion1());
|
||||||
c.setCache_cookied_cont(stu.getCache_cookied_cont());
|
CachePolicyUserRegion stu=(CachePolicyUserRegion)JSONObject.toBean(jsonObject, CachePolicyUserRegion.class);
|
||||||
c.setCache_dyn_url(stu.getCache_dyn_url());
|
c.setCache_cookied_cont(stu.getCache_cookied_cont());
|
||||||
c.setForce_caching(stu.getForce_caching());
|
c.setCache_dyn_url(stu.getCache_dyn_url());
|
||||||
c.setIgnore_req_nocache(stu.getIgnore_req_nocache());
|
c.setForce_caching(stu.getForce_caching());
|
||||||
c.setIgnore_res_nocache(stu.getIgnore_res_nocache());
|
c.setIgnore_req_nocache(stu.getIgnore_req_nocache());
|
||||||
c.setInactive_time(stu.getInactive_time());
|
c.setIgnore_res_nocache(stu.getIgnore_res_nocache());
|
||||||
c.setMax_cache_obj_size(stu.getMax_cache_obj_size());
|
c.setInactive_time(stu.getInactive_time());
|
||||||
c.setMax_cache_size(stu.getMax_cache_size());
|
c.setMax_cache_obj_size(stu.getMax_cache_obj_size());
|
||||||
c.setMin_use(stu.getMin_use());
|
c.setMax_cache_size(stu.getMax_cache_size());
|
||||||
c.setNo_revalidate(stu.getNo_revalidate());
|
c.setMin_use(stu.getMin_use());
|
||||||
c.setPinning_time(stu.getPinning_time());
|
c.setNo_revalidate(stu.getNo_revalidate());
|
||||||
if(stu.getCache_key()!=null){
|
c.setPinning_time(stu.getPinning_time());
|
||||||
|
if(stu.getCache_key()!=null){
|
||||||
String ignore=String.valueOf(stu.getCache_key().get("ignore_qs"));
|
String ignore=String.valueOf(stu.getCache_key().get("ignore_qs"));
|
||||||
String cookie=String.valueOf(stu.getCache_key().get("cookie"));
|
String cookie=String.valueOf(stu.getCache_key().get("cookie"));
|
||||||
if(!ignore.equals("null") && ignore!=null){
|
if(!ignore.equals("null") && ignore!=null){
|
||||||
@@ -131,7 +135,8 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(!cookie.equals("null") && cookie!=null){
|
if(!cookie.equals("null") && cookie!=null){
|
||||||
c.setCookie(cookie);
|
c.setCookie(cookie);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user