Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop
This commit is contained in:
@@ -614,6 +614,9 @@ public class Page<T> {
|
||||
public boolean isLastPage() {
|
||||
return lastPage;
|
||||
}
|
||||
public void setLastPage(boolean lastPage) {
|
||||
this.lastPage = lastPage;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -2354,6 +2354,10 @@ public class BaseController {
|
||||
* @return
|
||||
*/
|
||||
public void auditAll(Page page,Integer auditType,Object entity)throws Exception {
|
||||
page.setOrderBy("");
|
||||
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
//携带审核状态信息的BaseCfg
|
||||
BaseCfg auditBatchCfg=new BaseCfg();
|
||||
//携带审核条件的BaseCfg
|
||||
@@ -2615,7 +2619,7 @@ public class BaseController {
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, cfgIndexList, hasData);
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -2642,7 +2646,7 @@ public class BaseController {
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, hasData);
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -2669,7 +2673,7 @@ public class BaseController {
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData);
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -2696,7 +2700,7 @@ public class BaseController {
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData);
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -2727,20 +2731,26 @@ public class BaseController {
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//批量下发时,未下发过的app需要下发正常配置;已下发过的app需要下发ip复用配置(为保证事物,分两种方式下发)
|
||||
//1028 app_ip_cfg
|
||||
//TODO 批量审核通过APP IP需要处理的问题:一批中存在一个APP 所有IP均未下发过的问题?待解决
|
||||
//批量下发时,未下发过的app需要下发正常配置;已下发过的app需要下发ip复用配置(为保证事物,分两种方式下发)
|
||||
if(auditBatchCfg.getServiceId().equals(1028)) {
|
||||
if(true) {
|
||||
/*if(true) {
|
||||
page.setOrderBy("");
|
||||
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
/************预先获取已下发的groupid和compileid,且每批次重新获取,避免上一批次有新的compileId下发*************/
|
||||
*//************预先获取已下发的groupid和compileid,且每批次重新获取,避免上一批次有新的compileId下发*************//*
|
||||
Map<Integer, Integer> isIssuedCompileIds=new HashMap<>();
|
||||
//分组复用组信息1:app ip,2:内容,3:区域 ,4 asn
|
||||
ConfigGroupInfo groupInfo=new ConfigGroupInfo();
|
||||
@@ -2764,7 +2774,7 @@ public class BaseController {
|
||||
hasData=configSynchronizationService.auditAppIpData(userRegionList,
|
||||
page,auditBatchCfg,list,hasData,true);
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -2775,9 +2785,14 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||
page.setOrderBy("");
|
||||
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
/************预先获取未下发的groupid和compileid,********************/
|
||||
*//************预先获取未下发的groupid和compileid,********************//*
|
||||
//获取已下发的appcompileid
|
||||
Map<Integer, Integer> notIssuedCompileIds=new HashMap<>();
|
||||
//分组复用组信息1:app ip,2:内容,3:区域 ,4 asn
|
||||
@@ -2802,7 +2817,7 @@ public class BaseController {
|
||||
hasData=configSynchronizationService.auditAppIpData(userRegionList,
|
||||
page,auditBatchCfg,list,hasData,true);
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -2811,7 +2826,7 @@ public class BaseController {
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}else {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
@@ -2851,7 +2866,7 @@ public class BaseController {
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setPageNo(page.getNext());
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
from config_group_info
|
||||
where group_type =#{groupType}
|
||||
</select>
|
||||
<select id="findAllListByGroupIno" resultMap="configGroupInfoMap">
|
||||
<select id="findAllListByGroupInfo" resultMap="configGroupInfoMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from config_group_info
|
||||
|
||||
@@ -42,6 +42,12 @@ $(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//不可见字符校验[内含字符大小校验]
|
||||
if(flag){
|
||||
flag=validateInvisibleCharTag();
|
||||
}
|
||||
|
||||
if(flag){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
|
||||
@@ -42,6 +42,11 @@ $(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
//不可见字符校验[内含字符大小校验]
|
||||
if(flag){
|
||||
flag=validateInvisibleCharTag();
|
||||
}
|
||||
|
||||
if(flag){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
|
||||
@@ -128,6 +128,12 @@ $(function(){
|
||||
$("div[for=upBoundary]").html("<label for=\"upBoundary\" class=\"error\" id=\"upBoundary-error\">"+message+"</label>");
|
||||
flag=false;
|
||||
}
|
||||
|
||||
//不可见字符校验[内含字符大小校验]
|
||||
if(flag){
|
||||
flag=validateInvisibleCharTag();
|
||||
}
|
||||
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
|
||||
@@ -80,6 +80,12 @@ $(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//不可见字符校验[内含字符大小校验]
|
||||
if(flag){
|
||||
flag=validateInvisibleCharTag();
|
||||
}
|
||||
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
|
||||
@@ -42,6 +42,12 @@ $(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//不可见字符校验[内含字符大小校验]
|
||||
if(flag){
|
||||
flag=validateInvisibleCharTag();
|
||||
}
|
||||
|
||||
if(flag){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
|
||||
@@ -1521,42 +1521,48 @@ var validateTagInputKeyword=function(){
|
||||
}
|
||||
var validCharLength=function(){
|
||||
var flag=true;
|
||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
var value=$(this).val()
|
||||
if(value!=''){
|
||||
value=value.replace("***and***","");
|
||||
if(value.length < 4 || value.length > 1024){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
$(".tagsinput:visible").each(function(){
|
||||
var text='';
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
if(text.length < 4 || text.length > 1024){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
|
||||
}
|
||||
var validateInvisibleCharTag=function(){
|
||||
var hasInvisibleCharTags=[];
|
||||
var flag=true;
|
||||
var reg = new RegExp(/\t|\r|\n/);
|
||||
$(".tagsinput").find(".tag").each(function(){
|
||||
var text=$(this).children("span").text();
|
||||
$(".tagsinput:visible").each(function(){
|
||||
var hasInvisibleCharTags=[];
|
||||
$(this).find(".tag").each(function(){
|
||||
var text=$(this).children("span").text().trim();
|
||||
if (text.match(reg)) {
|
||||
hasInvisibleCharTags.push("'"+text.trim()+"'");
|
||||
hasInvisibleCharTags.push("'"+text+"'");
|
||||
}
|
||||
});
|
||||
if(hasInvisibleCharTags.length==1){
|
||||
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
return false;
|
||||
}else if(hasInvisibleCharTags.length>=1){
|
||||
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.haveInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
return false;
|
||||
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
if(flag){
|
||||
flag= false;
|
||||
}
|
||||
var charLengthValid=validCharLength();
|
||||
return charLengthValid;
|
||||
}else if(hasInvisibleCharTags.length>=1){
|
||||
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.haveInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
if(flag){
|
||||
flag= false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
flag=validCharLength();
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
var setHexCaseSenstive=function(){
|
||||
$("input[name$='configHex']").each(function(){
|
||||
|
||||
Reference in New Issue
Block a user