stream、DDOS和高级功能模块对某些用户的配置不经过审核直接生效及生效中的配置进行修改的功能
This commit is contained in:
@@ -248,7 +248,10 @@ public class AppCfgService extends BaseService {
|
||||
public void saveOrUpdateAppPolicyCfg(AppPolicyCfg entity) throws Exception {
|
||||
// 设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
if (entity.getCfgId() == null) {
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
@@ -302,7 +305,20 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
if(entity.getFunctionId() == 407){
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL);
|
||||
}
|
||||
if(entity.getFunctionId() == 63){
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||
}
|
||||
if(entity.getFunctionId() == 408){
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
||||
}
|
||||
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
@@ -356,6 +372,20 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
if(entity.getFunctionId() == 407){
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL);
|
||||
}
|
||||
if(entity.getFunctionId() == 63){
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||
}
|
||||
if(entity.getFunctionId() == 408){
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
||||
}
|
||||
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +393,10 @@ public class AppCfgService extends BaseService {
|
||||
public void saveOrUpdateAppIpCfg(AppIpCfg entity) throws Exception {
|
||||
// 设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
if (entity.getCfgId() == null) {
|
||||
|
||||
SpecificServiceCfg specificServiceCfg=specificServiceCfgDao.getBySpecServiceId(entity.getSpecServiceId());
|
||||
@@ -433,6 +466,13 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
List<AppIpCfg> entitys=new ArrayList<AppIpCfg>();
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
entitys.add(entity);
|
||||
auditAppIpCfg(entitys, entity.getIsAudit());
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
@@ -457,6 +497,16 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
List<AppIpCfg> entitys=new ArrayList<AppIpCfg>();
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
AppIpCfg entity2 = appCfgDao.getAppIpCfg(entity.getCfgId());
|
||||
entity2.setIsAudit(1);
|
||||
entity2.setIsValid(1);
|
||||
entitys.add(entity2);
|
||||
auditAppIpCfg(entitys, entity.getIsAudit());
|
||||
}
|
||||
}
|
||||
}
|
||||
public void saveAppHttpCfg(List<ComplexkeywordCfg> cfgs) {
|
||||
@@ -538,7 +588,10 @@ public class AppCfgService extends BaseService {
|
||||
public void saveOrUpdateAppDomainCfg(AppDomainCfg entity) throws Exception {
|
||||
// 设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
if (entity.getCfgId() == null) {
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
@@ -565,6 +618,11 @@ public class AppCfgService extends BaseService {
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
@@ -586,6 +644,11 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -593,7 +656,10 @@ public class AppCfgService extends BaseService {
|
||||
public void saveOrUpdateAppTopicDomainCfg(AppTopicDomainCfg entity) throws Exception {
|
||||
// 设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
if (entity.getCfgId() == null) {
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
@@ -620,6 +686,11 @@ public class AppCfgService extends BaseService {
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
@@ -641,6 +712,11 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -890,7 +966,10 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
public void auditAppPolicyCfg(AppPolicyCfg entity, Integer isAudit) {
|
||||
public void auditAppPolicyCfg(AppPolicyCfg entity, Integer isAudit,Integer opAction) {
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
String configType = entity.getConfigType();
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
@@ -1036,7 +1115,7 @@ public class AppCfgService extends BaseService {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
// 调用服务接口下发配置数据
|
||||
String json = gsonToJson(maatBean);
|
||||
logger.info("app策略配置下发配置参数:" + json);
|
||||
@@ -1164,6 +1243,12 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
public void auditAppIpCfg(List<AppIpCfg> entitys, Integer isAudit) {
|
||||
for (AppIpCfg entity : entitys) {
|
||||
entity.setTableName(AppIpCfg.getTablename());
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
}
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
@@ -1380,7 +1465,10 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
public void auditAppDomainCfg(AppDomainCfg entity, Integer isAudit) {
|
||||
public void auditAppDomainCfg(AppDomainCfg entity, Integer isAudit,Integer opAction) {
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
@@ -1441,7 +1529,7 @@ public class AppCfgService extends BaseService {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
// 调用服务接口下发配置数据
|
||||
String json = gsonToJson(maatBean);
|
||||
logger.info("app域名配置下发配置参数:" + json);
|
||||
@@ -1469,7 +1557,10 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
|
||||
// app主题网站配置审核
|
||||
public void auditAppTopicDomainCfg(AppTopicDomainCfg entity, Integer isAudit) {
|
||||
public void auditAppTopicDomainCfg(AppTopicDomainCfg entity, Integer isAudit,Integer opAction) {
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
@@ -1536,7 +1627,7 @@ public class AppCfgService extends BaseService {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
// 调用服务接口下发配置数据
|
||||
String json = gsonToJson(maatBean);
|
||||
logger.info("app主题网站配置下发配置参数:" + json);
|
||||
|
||||
Reference in New Issue
Block a user