修改isValid为isAudit
This commit is contained in:
@@ -218,7 +218,7 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditCachePolicy(entity, isValid,Constants.INSERT_ACTION);
|
auditCachePolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -262,7 +262,7 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditCachePolicy(entity, isValid,Constants.UPDATE_ACTION);
|
auditCachePolicy(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditHttpCfg(entity, isValid,Constants.INSERT_ACTION);
|
auditHttpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(UserUtils.getUser().getId());
|
entity.setEditorId(UserUtils.getUser().getId());
|
||||||
@@ -287,7 +287,7 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditHttpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
auditHttpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,9 +371,6 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
|||||||
List<DigestCfg> digestRegionList = new ArrayList();
|
List<DigestCfg> digestRegionList = new ArrayList();
|
||||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||||
|
|
||||||
//查询子配置并修改审核状态
|
|
||||||
entity = this.getHttpCfg(entity.getCfgId(),entity.getCompileId());
|
|
||||||
|
|
||||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||||
IpPortCfg cfg = new IpPortCfg();
|
IpPortCfg cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditInterceptIpCfg(entity, isValid,Constants.INSERT_ACTION);
|
auditInterceptIpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(entity.getServiceId().equals(518)){//ip仿冒策略
|
if(entity.getServiceId().equals(518)){//ip仿冒策略
|
||||||
@@ -279,7 +279,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditInterceptIpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
auditInterceptIpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,8 +371,6 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
List<DigestCfg> digestRegionList = new ArrayList();
|
List<DigestCfg> digestRegionList = new ArrayList();
|
||||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||||
|
|
||||||
//查询子配置并修改审核状态
|
|
||||||
entity = this.getInterceptCfg(entity.getCfgId(),entity.getCompileId());
|
|
||||||
if(entity.getServiceId().equals(518)){//IP仿冒策略
|
if(entity.getServiceId().equals(518)){//IP仿冒策略
|
||||||
//仿冒IP池配置匹配下发或者取消
|
//仿冒IP池配置匹配下发或者取消
|
||||||
PxyObjSpoofingIpPool pool=new PxyObjSpoofingIpPool();
|
PxyObjSpoofingIpPool pool=new PxyObjSpoofingIpPool();
|
||||||
@@ -507,12 +505,15 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
maatCfg.setUserRegion(Constants.INTERCEPT_IP_MONIT_USER_REGION_KEY+"="+entity.getUserRegion1());
|
maatCfg.setUserRegion(Constants.INTERCEPT_IP_MONIT_USER_REGION_KEY+"="+entity.getUserRegion1());
|
||||||
//监测的域名需下发拦截强度
|
//监测的域名需下发拦截强度
|
||||||
if(entity.getFunctionId().equals(200)){
|
if(entity.getFunctionId().equals(200)){
|
||||||
entity.setUserRegion5(StringUtil.isEmpty(entity.getUserRegion5()) ? "1":entity.getUserRegion5());
|
if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){
|
||||||
if(StringUtil.isEmpty(maatCfg.getUserRegion())) {
|
entity.setUserRegion5(StringUtil.isEmpty(entity.getUserRegion5()) ? "1":entity.getUserRegion5());
|
||||||
maatCfg.setUserRegion(Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5());
|
if(StringUtil.isEmpty(maatCfg.getUserRegion())) {
|
||||||
}else {
|
maatCfg.setUserRegion(Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5());
|
||||||
maatCfg.setUserRegion(maatCfg.getUserRegion()+";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5());
|
}else {
|
||||||
|
maatCfg.setUserRegion(maatCfg.getUserRegion()+";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//限速 需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps
|
//限速 需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps
|
||||||
|
|||||||
@@ -193,10 +193,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//TODO 处理定时任务【如果有定时任务则新增】
|
||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditIpCfg(entity, isValid,Constants.INSERT_ACTION);
|
auditIpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -271,11 +272,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//TODO 处理定时任务【如果有定时任务则删除旧的,新增新的】
|
||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditIpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
auditIpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,6 +322,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//TODO 处理定时任务【如果有定时任务则删除】
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -562,8 +564,6 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
//获取region
|
//获取region
|
||||||
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||||
int maatType=0;
|
int maatType=0;
|
||||||
//查询子配置并修改审核状态
|
|
||||||
entity = this.getIpPortCfg(entity.getCfgId(),entity.getCompileId());
|
|
||||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||||
//判断下发类型是走maat还是callback
|
//判断下发类型是走maat还是callback
|
||||||
String regionValue=entity.getIpPortList().get(0).getCfgType();
|
String regionValue=entity.getIpPortList().get(0).getCfgType();
|
||||||
@@ -638,6 +638,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
areaIpRegionList=map.get("dstList");
|
areaIpRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TODO 处理定时任务【审核通过-》增加一条sche_new;审核不通过-》增加一条sche0,2,sche旧的置为无效;配置取消-》增加一条0,3,sche旧的置为无效】。
|
||||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
if(maatType==Constants.CALLBACK_TYPE){
|
if(maatType==Constants.CALLBACK_TYPE){
|
||||||
|
|||||||
Reference in New Issue
Block a user