ASN、Http(s) Url报表时间检索增加限制;app payload、http、dns、ssl配置导入并下发增加userRegion属性
This commit is contained in:
@@ -641,7 +641,6 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
baseIpCfg.setSrcPort("0");
|
baseIpCfg.setSrcPort("0");
|
||||||
baseIpCfg.setPortPattern(1);
|
baseIpCfg.setPortPattern(1);
|
||||||
}
|
}
|
||||||
baseIpCfg.setDestPort(baseIpCfg.getSrcPort().trim());
|
|
||||||
} else {
|
} else {
|
||||||
if (baseIpCfg.getSrcPort().indexOf("/") > -1) {
|
if (baseIpCfg.getSrcPort().indexOf("/") > -1) {
|
||||||
baseIpCfg.setPortPattern(2);
|
baseIpCfg.setPortPattern(2);
|
||||||
@@ -649,9 +648,8 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
baseIpCfg.setPortPattern(1);
|
baseIpCfg.setPortPattern(1);
|
||||||
}
|
}
|
||||||
baseIpCfg.setSrcPort(baseIpCfg.getSrcPort().trim());
|
baseIpCfg.setSrcPort(baseIpCfg.getSrcPort().trim());
|
||||||
baseIpCfg.setDestPort(baseIpCfg.getDestPort().trim());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
baseIpCfg.setDestPort(baseIpCfg.getDestPort().trim());
|
||||||
}
|
}
|
||||||
// TODO 判断源端口和目的端口格式
|
// TODO 判断源端口和目的端口格式
|
||||||
// TODO 判断源和目的端口的值
|
// TODO 判断源和目的端口的值
|
||||||
|
|||||||
@@ -1636,9 +1636,9 @@ public abstract class BaseService {
|
|||||||
}else if("AsnIpCfg".equals(type)) {
|
}else if("AsnIpCfg".equals(type)) {
|
||||||
List<AsnIpCfg> listPage = (List<AsnIpCfg>) list;
|
List<AsnIpCfg> listPage = (List<AsnIpCfg>) list;
|
||||||
this.saveAsnIpBatch(listPage);
|
this.saveAsnIpBatch(listPage);
|
||||||
}else if("AppComplexFeature".equals(type)) {
|
}else if("AppComplexFeature".equals(type)) {// APP Payload
|
||||||
List<AppComplexFeatureCfg> listPage = (List<AppComplexFeatureCfg>) list;
|
List<AppComplexFeatureCfg> listPage = (List<AppComplexFeatureCfg>) list;
|
||||||
this.saveAppComplexFeatureBatch(listPage);
|
this.saveAppComplexFeatureBatch(regionDict,serviceDict,listPage,send);
|
||||||
}else if("BaseStringCfg".equals(type)) {
|
}else if("BaseStringCfg".equals(type)) {
|
||||||
List<BaseStringCfg<?>> listPage = (List<BaseStringCfg<?>>) list;
|
List<BaseStringCfg<?>> listPage = (List<BaseStringCfg<?>>) list;
|
||||||
// 调用对应配置的service
|
// 调用对应配置的service
|
||||||
@@ -1823,23 +1823,64 @@ public abstract class BaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* APP Payload导入配置时数据批量入库
|
* APP Payload导入配置时数据批量入库
|
||||||
|
* @param serviceDict
|
||||||
|
* @param regionDict
|
||||||
* @param data
|
* @param data
|
||||||
|
* @param send
|
||||||
*/
|
*/
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveAppComplexFeatureBatch(List<AppComplexFeatureCfg> data) {
|
public void saveAppComplexFeatureBatch(FunctionRegionDict regionDict, FunctionServiceDict serviceDict, List<AppComplexFeatureCfg> data, boolean send) {
|
||||||
|
if (regionDict != null) {
|
||||||
|
Integer regionType = regionDict.getRegionType();
|
||||||
|
if (3 == regionType.intValue()) {
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
SqlSession batchSqlSession = null;
|
SqlSession batchSqlSession = null;
|
||||||
try{
|
try{
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
for(int index = 0; index < data.size();index++){
|
for(int index = 0; index < data.size();index++){
|
||||||
AppComplexFeatureCfg cfg = data.get(index);
|
AppComplexFeatureCfg cfg = data.get(index);
|
||||||
((AppMultiFeatureCfgDao) batchSqlSession.getMapper(AppMultiFeatureCfgDao.class)).insertAppComplexFeatureCfgBatch(cfg);
|
((AppMultiFeatureCfgDao) batchSqlSession.getMapper(AppMultiFeatureCfgDao.class)).insertAppComplexFeatureCfgBatch(cfg);
|
||||||
|
if (send) {
|
||||||
|
if(regionDict.getIsMaat().intValue()==1) {
|
||||||
|
MaatCfg maatCfg=convertMaatCfg(cfg,3);
|
||||||
|
//userRegion处理
|
||||||
|
if(regionDict.getFunctionId()==563) {
|
||||||
|
maatCfg.setUserRegion(Constants.APP_ID_REGION+"="+cfg.getAppCode());
|
||||||
|
}
|
||||||
|
configCompileList.add(maatCfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (send && configCompileList.size() > 0) {
|
||||||
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
|
maatBean.setConfigCompileList(configCompileList);
|
||||||
|
maatBean.setAuditTime(new Date());
|
||||||
|
maatBean.setCreatorName(UserUtils.getUser().getName());
|
||||||
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
|
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||||
|
// 调用服务接口下发配置数据
|
||||||
|
String json = BaseService.gsonToJson(maatBean);
|
||||||
|
if(configCompileList.size()>10) {
|
||||||
|
logger.info("APP Feature增强字符串配置下发配置条数:" + configCompileList.size());
|
||||||
|
}else {
|
||||||
|
logger.info("APP Feature增强字符串配置下发配置参数:" + json);
|
||||||
|
}
|
||||||
|
// 调用服务接口下发配置
|
||||||
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
|
logger.info("APP Feature增强字符串配置下发响应信息:" + result.getMsg());
|
||||||
|
|
||||||
}
|
}
|
||||||
batchSqlSession.commit();
|
batchSqlSession.commit();
|
||||||
|
|
||||||
}finally {
|
}finally {
|
||||||
if(batchSqlSession != null){
|
if(batchSqlSession != null){
|
||||||
batchSqlSession.close();
|
batchSqlSession.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2211,6 +2252,8 @@ public abstract class BaseService {
|
|||||||
userRegion = Constants.REPLACE_ZONE_KEY+"="+_cfg.getUserRegion1()+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
|
userRegion = Constants.REPLACE_ZONE_KEY+"="+_cfg.getUserRegion1()+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
|
||||||
}
|
}
|
||||||
maatCfg.setUserRegion(userRegion);
|
maatCfg.setUserRegion(userRegion);
|
||||||
|
}else if(regionDict.getFunctionId()==563 || regionDict.getFunctionId()==565 || regionDict.getFunctionId()==566) {// APP Payload、HTTP、SSL Admin
|
||||||
|
maatCfg.setUserRegion(Constants.APP_ID_REGION+"="+_cfg.getAppCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
configCompileList.add(maatCfg);
|
configCompileList.add(maatCfg);
|
||||||
@@ -2417,6 +2460,8 @@ public abstract class BaseService {
|
|||||||
userRegion = Constants.REPLACE_ZONE_KEY+"="+cfg.getUserRegion1()+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
|
userRegion = Constants.REPLACE_ZONE_KEY+"="+cfg.getUserRegion1()+";"+Constants.REPLACE_SUBSTITUTE_KEY+"="+substitute;
|
||||||
}
|
}
|
||||||
maatCfg.setUserRegion(userRegion);
|
maatCfg.setUserRegion(userRegion);
|
||||||
|
}else if(regionDict.getFunctionId()==564 || regionDict.getFunctionId()==565 || regionDict.getFunctionId()==566) {// APP HTTP、DNS、SSL Admin
|
||||||
|
maatCfg.setUserRegion(Constants.APP_ID_REGION+"="+cfg.getAppCode());
|
||||||
}
|
}
|
||||||
configCompileList.add(maatCfg);
|
configCompileList.add(maatCfg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,9 +145,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <input name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" -->
|
<!-- <input name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" -->
|
||||||
<%-- value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
<%-- value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
||||||
|
|
||||||
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:setReportTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'searchFoundEndTime\')}'});"/>
|
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -158,7 +157,7 @@
|
|||||||
<!-- <input name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" -->
|
<!-- <input name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" -->
|
||||||
<%-- value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
<%-- value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
||||||
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'searchFoundStartTime\')}',maxDate:'#F{$dp.$D(\'searchFoundStartTime\',{d:7})}'});"/>
|
value="${log.searchFoundEndTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
<%-- value="${log.searchReportStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
<%-- value="${log.searchReportStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
||||||
|
|
||||||
<input id="searchReportStartTime" name="searchReportStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input id="searchReportStartTime" name="searchReportStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="${log.searchReportStartTime}" onclick="WdatePicker({onpicked:setReportTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'searchReportEndTime\')}'});"/>
|
value="${log.searchReportStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#searchReportStartTime','#searchReportEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<!-- <input name="searchReportEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" -->
|
<!-- <input name="searchReportEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" -->
|
||||||
<%-- value="${log.searchReportEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
<%-- value="${log.searchReportEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> --%>
|
||||||
<input id="searchReportEndTime" name="searchReportEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input id="searchReportEndTime" name="searchReportEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="${log.searchReportEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'searchReportStartTime\')}',maxDate:'#F{$dp.$D(\'searchReportStartTime\',{d:7})}'});"/>
|
value="${log.searchReportEndTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#searchReportStartTime','#searchReportEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
|
|||||||
Reference in New Issue
Block a user