APP payload特征增加session数值域配置
This commit is contained in:
@@ -18,6 +18,7 @@ import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
@@ -111,6 +112,15 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
if(entity.getNumCfgList()!=null){
|
||||
for(AppTcpCfg cfg:entity.getNumCfgList()){
|
||||
if(cfg.getLowBoundary()!=null && cfg.getUpBoundary()!=null){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppTcpCfg(cfg);//复用AppTcpCfg对象作为数值类对象
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -126,6 +136,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
appMultiFeatureCfgDao.deleteAppIpRangeCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppStringFeatureCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppComplexFeatureCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppTcpCfg(entity);//复用AppTcpCfg对象作为数值类对象
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
@@ -150,6 +161,14 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getNumCfgList()!=null){
|
||||
for(AppTcpCfg cfg:entity.getNumCfgList()){
|
||||
if(cfg.getLowBoundary()!=null && cfg.getUpBoundary()!=null){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppTcpCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void auditAppFeatureCfg(AppFeatureIndex entity, Integer isAudit) {
|
||||
@@ -212,6 +231,18 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppTcpCfg> numCfgList = appMultiFeatureCfgDao.getAppTcpCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
if(numCfgList!=null && numCfgList.size()>0){
|
||||
AppTcpCfg cfg = new AppTcpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AppTcpCfg.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(numRegionList,numCfgList,4,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
numRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -299,6 +330,13 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
cfg.setTableName(AppComplexFeatureCfg.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改数值域配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getNumCfgList())) {
|
||||
AppTcpCfg cfg = new AppTcpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppTcpCfg.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -315,6 +353,10 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
public List<AppIpCfg> getAppIpRangeCfg(Integer compileId,Integer functionId){
|
||||
return appMultiFeatureCfgDao.getAppIpRangeCfg(compileId,functionId);
|
||||
}
|
||||
//I数值域配置
|
||||
public List<AppTcpCfg> getAppTcpCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppTcpCfg(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
|
||||
public Map<String, List> exportFeature(AppFeatureIndex entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
|
||||
Reference in New Issue
Block a user