Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

This commit is contained in:
leijun
2018-08-28 18:52:44 +08:00
8 changed files with 85 additions and 80 deletions

View File

@@ -324,24 +324,24 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
}
//限速需要发Droprate=0.001 暂不支持Bandwidth=200kbps
if(entity.getAction().equals(Constants.RATELIMIT_ACTION)){
entity.setUserRegion2(StringUtil.isEmpty(entity.getUserRegion2()) ? "":entity.getUserRegion2());
entity.setUserRegion1(StringUtil.isEmpty(entity.getUserRegion1()) ? "":entity.getUserRegion1());
maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+entity.getUserRegion2());
maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+entity.getUserRegion1());
}
String userRegion="";
//替换需要发zone
if(entity.getAction().equals(Constants.REPLACE_ACTION)){
//HTTP replace replace type is not null ;find is not null;replace with is not null(userRegion is not null)
userRegion=Constants.REPLACE_ZONE_KEY+"="+entity.getUserRegion3();
userRegion=Constants.REPLACE_ZONE_KEY+"="+entity.getUserRegion1();
String substitute="";
String userRegion4=StringUtil.isEmpty(entity.getUserRegion4()) ? "":entity.getUserRegion4();
String userRegion2=StringUtil.isEmpty(entity.getUserRegion2()) ? "":entity.getUserRegion2();
substitute="/";
userRegion4 = BaseService.replaceContentEscape(userRegion4);
substitute=substitute+userRegion4;
userRegion2 = BaseService.replaceContentEscape(userRegion2);
substitute=substitute+userRegion2;
String userRegion5=StringUtil.isEmpty(entity.getUserRegion5()) ? "":entity.getUserRegion5();
userRegion5 = BaseService.replaceContentEscape(userRegion5);
substitute=substitute+"/"+userRegion5;
String userRegion3=StringUtil.isEmpty(entity.getUserRegion3()) ? "":entity.getUserRegion3();
userRegion3 = BaseService.replaceContentEscape(userRegion3);
substitute=substitute+"/"+userRegion3;
userRegion=userRegion+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
maatCfg.setUserRegion(userRegion);