协议-配置支持对某些用户的配置不经过审核直接生效的流程
This commit is contained in:
@@ -436,7 +436,10 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
}*/
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -480,6 +483,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditDomainCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditTime(new Date());
|
||||
@@ -518,6 +526,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditDomainCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updateDomainCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
@@ -559,10 +572,13 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
}
|
||||
|
||||
}
|
||||
public void auditDomainCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
public void auditDomainCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||
// TODO Auto-generated method stub
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -634,7 +650,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
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("domain配置下发配置参数:"+json);
|
||||
|
||||
Reference in New Issue
Block a user