(1)修复修改时页面被遮盖层覆盖的bug

(2)APP策略,基础协议,加密隧道行为调整,自定义域恢复;分隔,关键字字段用&连接
This commit is contained in:
wangxin
2018-08-06 15:09:12 +08:00
parent d839848452
commit a4b16f4043
4 changed files with 38 additions and 20 deletions

View File

@@ -413,11 +413,25 @@ public class AppCfgService extends BaseService {
entity.setTableName(AppPolicyCfg.getTablename());
appCfgDao.auditCfg(entity);
if(isAudit==1){
StringBuffer cfgKeywords=new StringBuffer();
if(entity.getBehavCode()!=null){
entity.setCfgKeywords(entity.getAppCode()+Constants.KEYWORD_EXPR+entity.getBehavCode());
if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) {
cfgKeywords.append(Constants.APP_ID_REGION+"="+entity.getAppCode());
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)||Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) {
cfgKeywords.append(Constants.PROTO_ID_REGION+"="+entity.getAppCode());
}
cfgKeywords.append(Constants.KEYWORD_EXPR);
cfgKeywords.append(Constants.BEHAV_ID_REGION+"="+entity.getBehavCode());
// entity.setCfgKeywords(entity.getAppCode()+Constants.KEYWORD_EXPR+entity.getBehavCode());
}else{
entity.setCfgKeywords(entity.getAppCode()+"");
if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) {
cfgKeywords.append(Constants.APP_ID_REGION+"="+entity.getAppCode());
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)||Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) {
cfgKeywords.append(Constants.PROTO_ID_REGION+"="+entity.getAppCode());
}
// entity.setCfgKeywords(entity.getAppCode()+"");
}
entity.setCfgKeywords(cfgKeywords.toString());
List<AppPolicyCfg> list = new ArrayList();
list.add(entity);
Map<String,List> map = cfgConvert(strRegionList,list,2,entity,groupRelationList);
@@ -469,30 +483,30 @@ public class AppCfgService extends BaseService {
maatCfg.setGroupNum(groupRelationList.size());
maatCfg.setAreaIpRegionList(areaIpRegionList);
maatCfg.setIsValid(entity.getIsValid());
String userRegion=null;
if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) {
//设置APP自定义域
String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode();
//限速业务需要设置
String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit");
if(!actionCode.equals("默认")){
if(entity.getAction().equals(Integer.parseInt(actionCode))){
userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit();
}
}
userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode();
if(entity.getBehavCode()!=null) {
userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
}
maatCfg.setUserRegion(userRegion);
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) {
String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode();
maatCfg.setUserRegion(userRegion);
userRegion = Constants.PROTO_ID_REGION+"="+entity.getAppCode();
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)) {
String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode();
userRegion = Constants.PROTO_ID_REGION+"="+entity.getAppCode();
if(entity.getBehavCode()!=null) {
userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
}
maatCfg.setUserRegion(userRegion);
}
//限速业务需要设置
String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit");
if(!actionCode.equals("默认")){
if(entity.getAction().equals(Integer.parseInt(actionCode))){
userRegion += Constants.USER_REGION_SPLIT+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit();
}
}
maatCfg.setUserRegion(userRegion);
configCompileList.add(maatCfg);
maatBean.setConfigCompileList(configCompileList);
maatBean.setAuditTime(entity.getAuditTime());