(1)审核调用auditBatch改为直接单个audit
(2)修复IP审核去错configRegionCode导致的空指针异常
This commit is contained in:
@@ -660,13 +660,16 @@ public class BaseController {
|
||||
if(protocol==null){
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("direction"))+";");
|
||||
}
|
||||
//direction check end
|
||||
//protocol check end
|
||||
if(StringUtils.isNotBlank(errInfo.toString())){
|
||||
msg.append(lineStart).append(errInfo);
|
||||
if(line<list.size()){
|
||||
msg.append("<br/>");
|
||||
}
|
||||
}
|
||||
// requestId check start
|
||||
Integer requestId=value.getRequestId();
|
||||
// requestId check end
|
||||
line++;
|
||||
}
|
||||
if(StringUtils.isNotBlank(msg.toString())){
|
||||
|
||||
@@ -114,7 +114,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
public void auditWhiteDomain(HttpUrlCfg cfg) throws Exception{
|
||||
List<HttpUrlCfg> beans=new ArrayList<>();
|
||||
beans.add(cfg);
|
||||
this.auditBatch(beans, DomainDao.class);
|
||||
domainDao.audit(cfg);
|
||||
List<MaatCfg> configCompileList = new ArrayList<>();
|
||||
List<GroupCfg> groupRelationList = new ArrayList<>();
|
||||
List<IpCfg> ipRegionList = new ArrayList<>();
|
||||
@@ -185,7 +185,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
public void auditDomain(HttpUrlCfg cfg) throws Exception{
|
||||
List<HttpUrlCfg> beans=new ArrayList<>();
|
||||
beans.add(cfg);
|
||||
this.auditBatch(beans, DomainDao.class);
|
||||
domainDao.audit(cfg);
|
||||
List<BaseIpCfg> beans1=new ArrayList<>();
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(cfg.getCompileId());
|
||||
for(AreaIpCfg area:areaIpCfgList){
|
||||
|
||||
@@ -130,7 +130,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
//更新IP配置与区域IP的状态
|
||||
List<BaseIpCfg> beans=new ArrayList<>();
|
||||
beans.add(cfg);
|
||||
this.auditBatch(beans, IpCfgDao.class);
|
||||
ipCfgDao.audit(cfg);
|
||||
List<BaseIpCfg> beans1=new ArrayList<>();
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(cfg.getCompileId());
|
||||
for(AreaIpCfg area:areaIpCfgList){
|
||||
@@ -166,12 +166,29 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
|
||||
int maatType=0;
|
||||
//判断下发类型是走maat还是callback
|
||||
if(cfg.getCfgRegionCode()!=null){
|
||||
for(FunctionRegionDict f:dictList){
|
||||
if(f.getCfgRegionCode().intValue()==cfg.getCfgRegionCode()){
|
||||
if(f.getConfigRegionCode().intValue()==cfg.getCfgRegionCode()){
|
||||
maatType=f.getIsMaat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
List<SysDataDictionaryItem> maatServiceList = DictUtils.getDictList("MAAT_SERVICE");
|
||||
for(SysDataDictionaryItem maatService:maatServiceList){
|
||||
if(Integer.parseInt(maatService.getItemCode())==cfg.getServiceId().intValue()){
|
||||
for(FunctionRegionDict f:dictList){
|
||||
if(maatService.getItemValue().equals(f.getConfigRegionValue())){
|
||||
maatType=f.getIsMaat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(cfg.getIsAudit()==Constants.AUDIT_YES){
|
||||
if(maatType==Constants.CALLBACK_TYPE){
|
||||
List<InlineIp> ipList=new ArrayList<>();
|
||||
@@ -281,7 +298,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
public void auditWhiteIp(BaseIpCfg cfg) throws Exception{
|
||||
List<BaseIpCfg> beans=new ArrayList<>();
|
||||
beans.add(cfg);
|
||||
this.auditBatch(beans, IpCfgDao.class);
|
||||
ipCfgDao.audit(cfg);
|
||||
List<MaatCfg> configCompileList = new ArrayList<>();
|
||||
List<GroupCfg> groupRelationList = new ArrayList<>();
|
||||
List<IpCfg> ipRegionList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user