删除标注为过时的方法
This commit is contained in:
@@ -380,11 +380,6 @@ public class BaseController {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
}
|
||||
@Deprecated
|
||||
protected void setSaveOrUpdateProps(Model model,BaseCfg cfg,String areaCfgIds) throws Exception{
|
||||
}
|
||||
|
||||
|
||||
public List<AreaBean> getAreaIsps(String areaEffectiveIds,List<AreaBean> areaIspList,List<SysDictInfo> isps,List<SysDictInfo> areas) {
|
||||
Map<String, SysDictInfo> areaMap=new HashMap<String, SysDictInfo>();
|
||||
for (SysDictInfo areaDict : areas) {
|
||||
|
||||
@@ -295,38 +295,4 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* sendToMaatConvertorBatch(单域配置下发maat)
|
||||
* (cfgs里每条为一条配置,每条配置可能包含区域IP)
|
||||
* @param operation
|
||||
* @param cfgs
|
||||
* @return
|
||||
* @throws Exception
|
||||
*boolean
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean sendToMaatConvertorBatch(int operation,List<? extends BaseCfg> cfgs) throws Exception{
|
||||
|
||||
//发送至maat,待完成
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* sendToMaatConvertor(转换配置为Maat格式)
|
||||
* (所有的配置需拥有一样的编译ID,action,serviceId,等属性)
|
||||
* @param cfg
|
||||
* @return
|
||||
*boolean
|
||||
* @throws Exception
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Deprecated
|
||||
public boolean sendToMaatConvertor(int operation,List<AreaIpCfg> areaCfg,BaseCfg ... cfg) throws Exception{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -12,24 +11,21 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.configuration.AreaBean;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
@@ -357,60 +353,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditIpCfg(审核IP类配置)
|
||||
* (继承BaseIpCfg这个类方可使用)
|
||||
* @param baseIpCfg
|
||||
* @return
|
||||
*int
|
||||
* @throws Exception
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditIpCfg(int isAduit,List<BaseIpCfg> auditCfg) throws Exception{
|
||||
List<BaseIpCfg> areaCfg=new ArrayList<>();
|
||||
for(BaseIpCfg c:auditCfg){
|
||||
if(c.getAreaCfg()!=null){
|
||||
areaCfg.addAll(c.getAreaCfg());
|
||||
}
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
Constants.AUDIT_YES==isAduit){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertorBatch(isAduit,auditCfg)){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.auditIpBatch(areaCfg);
|
||||
}
|
||||
this.auditBatch(auditCfg, IpCfgDao.class);
|
||||
}
|
||||
}else{
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.auditIpBatch(areaCfg);
|
||||
}
|
||||
this.auditBatch(auditCfg, IpCfgDao.class);
|
||||
}
|
||||
|
||||
}
|
||||
// @Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
// public void deleteWhiteIp(String ids){
|
||||
// List<BaseIpCfg> ipCfgs=new ArrayList<BaseIpCfg>();
|
||||
// Date date =new Date();
|
||||
// if(StringUtils.isNotBlank(ids)){
|
||||
// for(String idStr:ids.split(",")){
|
||||
// if(StringUtils.isNotBlank(idStr)){
|
||||
// BaseIpCfg cfg=new BaseIpCfg();
|
||||
// cfg.setCfgId(Long.parseLong(idStr));
|
||||
// cfg.setTableName(IpPortCfg.getTablename());
|
||||
// cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
// cfg.setEditTime(date);
|
||||
// cfg.setIsValid(Constants.VALID_DEL);
|
||||
// ipCfgs.add(cfg);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// this.deleteBatch(ipCfgs, IpCfgDao.class);
|
||||
// }
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void deleteIp(String ids,String compileIds,int functionId){
|
||||
if(StringUtils.isNotBlank(compileIds)){
|
||||
|
||||
@@ -62,29 +62,7 @@ public class NumCfgService extends CrudService<NumCfgDao,NumBoundaryCfg> {
|
||||
}
|
||||
return numCfgDao.updateByPrimaryKeySelective(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditNumCfg(审核IP类配置)
|
||||
* (继承NumBoundaryCfg这个类方可使用)
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @throws Exception
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int auditNumCfg(NumBoundaryCfg sendCfg,NumBoundaryCfg cfg) throws Exception{
|
||||
if(Constants.AUDIT_NOT_YES==cfg.getIsAudit().intValue()||
|
||||
Constants.AUDIT_YES==cfg.getIsAudit().intValue()){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertor(cfg.getIsAudit(),null,sendCfg)){
|
||||
return numCfgDao.audit(cfg);
|
||||
}
|
||||
}else{
|
||||
return numCfgDao.audit(cfg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* deleteNumCfg(删除IP类配置)
|
||||
|
||||
@@ -169,37 +169,7 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditStringCfg(审核IP类配置)
|
||||
* (继承BaseStringCfg这个类方可使用)
|
||||
* @param baseStringCfg
|
||||
* @return
|
||||
*int
|
||||
* @throws Exception
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditStringCfg(int isAduit,List<BaseStringCfg> auditCfg,List<BaseStringCfg> sendCfg) throws Exception{
|
||||
List<BaseIpCfg> areaCfg=new ArrayList<>();
|
||||
for(BaseStringCfg c:auditCfg){
|
||||
if(c.getAreaCfg()!=null){
|
||||
areaCfg.addAll(c.getAreaCfg());
|
||||
}
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
Constants.AUDIT_YES==isAduit){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertorBatch(isAduit,sendCfg)){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.auditIpBatch(areaCfg);
|
||||
}
|
||||
this.auditBatch(auditCfg, StringCfgDao.class);
|
||||
}
|
||||
}else{
|
||||
this.auditBatch(auditCfg, StringCfgDao.class);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void deleteWhiteDomain(String ids){
|
||||
List<BaseStringCfg> cfgs=new ArrayList<BaseStringCfg>();
|
||||
|
||||
Reference in New Issue
Block a user