//HTTP block: response code is not null ;response content

null(userRegion is not null)
//HTTP redirect: response code is not null ;response content is not
null(userRegion is not null)
//HTTP replace: replace type is not null ;find is not null;replace with
is not null(userRegion is not null)
修复proxy 排序 查询列表bug
This commit is contained in:
duandongmei
2018-08-09 15:07:49 +08:00
parent 5964eeca80
commit 9b1f4d30cc
5 changed files with 34 additions and 38 deletions

View File

@@ -404,42 +404,34 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
//判断http配置是否需要设置自定义域参数
String userRegion = "";
//HTTP block
//HTTP block response code is not null ;response content null(userRegion is not null)
if(entity.getAction().equals(16)){
String userRegion1=StringUtil.isEmpty(entity.getUserRegion1()) ? "":entity.getUserRegion1();
userRegion=Constants.REDIRECT_RESPONSE_CODE_KEY+"="+userRegion1;
String userRegion2=StringUtil.isEmpty(entity.getUserRegion2()) ? "":entity.getUserRegion2();
userRegion=userRegion+";"+Constants.REDIRECT_CONTENT_KEY+"="+userRegion2;
}
//HTTP redirect
//HTTP redirect response code is not null ;response content is not null(userRegion is not null)
if(entity.getAction().equals(48)){
String userRegion1=StringUtil.isEmpty(entity.getUserRegion1()) ? "":entity.getUserRegion1();
userRegion=Constants.REDIRECT_RESPONSE_CODE_KEY+"="+userRegion1;
String userRegion2=StringUtil.isEmpty(entity.getUserRegion2()) ? "":entity.getUserRegion2();
userRegion=userRegion+";"+Constants.REDIRECT_URL_KEY+"="+userRegion2;
}
//HTTP replace
//HTTP replace replace type is not null ;find is not null;replace with is not null(userRegion is not null)
if(entity.getAction().equals(80)){
if(!StringUtil.isEmpty(entity.getUserRegion1())){
userRegion=Constants.REPLACE_ZONE_KEY+"="+entity.getUserRegion1();
}
userRegion=Constants.REPLACE_ZONE_KEY+"="+entity.getUserRegion1();
String substitute="";
if(!StringUtil.isEmpty(entity.getUserRegion2())){
String userRegion2=entity.getUserRegion2();
substitute="/";
userRegion2 = BaseService.replaceContentEscape(userRegion2);
substitute=substitute+userRegion2;
}
if(!StringUtil.isEmpty(entity.getUserRegion3())){
String userRegion3=entity.getUserRegion3();
userRegion3 = BaseService.replaceContentEscape(userRegion3);
substitute=substitute+"/"+userRegion3;
}
if(StringUtil.isEmpty(substitute)){
userRegion="";
}else{
userRegion=userRegion+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
}
String userRegion2=StringUtil.isEmpty(entity.getUserRegion2()) ? "":entity.getUserRegion2();
substitute="/";
userRegion2 = BaseService.replaceContentEscape(userRegion2);
substitute=substitute+userRegion2;
String userRegion3=StringUtil.isEmpty(entity.getUserRegion3()) ? "":entity.getUserRegion3();
userRegion3 = BaseService.replaceContentEscape(userRegion3);
substitute=substitute+"/"+userRegion3;
userRegion=userRegion+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
}
if(StringUtil.isEmpty(userRegion)){
userRegion=Constants.USER_REGION_PLACEHOLDER;