App相关保存,审核前台提示异常调整,审核异常后台日志打印修改为error级别
This commit is contained in:
@@ -177,9 +177,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("saveAppPolicyCfg failed",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/policyCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -208,10 +214,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||
try {
|
||||
appCfgService.auditAppPolicyCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app策略配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app策略配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/policyCfgList?functionId="+functionId;
|
||||
@@ -288,9 +298,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppIpCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("saveAppIpCfg failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/ipCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -330,10 +346,14 @@ public class AppCfgController extends BaseController {
|
||||
for(List<AppIpCfg> entitys:dataMap.values()) {
|
||||
try {
|
||||
appCfgService.auditAppIpCfg(entitys,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app协议IP配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app协议IP配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,9 +431,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppHttpCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("saveAppHttpCfg failed", e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/httpCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -441,10 +467,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppHttpCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app http配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app http配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/httpCfgList?functionId="+functionId;
|
||||
@@ -520,9 +550,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppDomainCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/domainCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -550,10 +585,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppDomainCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app协议domain配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app协议domain配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/domainCfgList?functionId="+functionId;
|
||||
@@ -629,9 +668,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppByteCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("saveAppByteCfg failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/byteCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -659,10 +704,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppByteCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app协议byte配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app协议byte配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/byteCfgList?functionId="+functionId;
|
||||
@@ -739,9 +788,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppSslCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("saveAppSslCfg failed", e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -769,10 +824,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppSslCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app SSL配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app SSL配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+functionId;
|
||||
@@ -852,9 +911,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppTcpeCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("saveAppTcpCfg failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/tcpCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -898,10 +963,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppTcpCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app SSL配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app SSL配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/tcpCfgList?functionId="+functionId;
|
||||
@@ -968,9 +1037,15 @@ public class AppCfgController extends BaseController {
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppHeaderCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("saveAppHeaderCfg failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/headerCfgList?functionId="+entity.getFunctionId();
|
||||
@@ -998,10 +1073,14 @@ public class AppCfgController extends BaseController {
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppHeaderCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app Header配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
logger.error("app Header配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/headerCfgList?functionId="+functionId;
|
||||
@@ -1158,13 +1237,11 @@ public class AppCfgController extends BaseController {
|
||||
appCfgService.auditAppTopicDomainCfg(entity,isAudit);
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("app主题网站配置下发失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.info("app主题网站配置下发失败:"+e.getMessage());;
|
||||
addMessage(redirectAttributes,"request_service_failed");
|
||||
}else {
|
||||
e.printStackTrace();
|
||||
logger.error("app主题网站配置下发失败",e);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
@@ -1260,7 +1337,12 @@ public class AppCfgController extends BaseController {
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
logger.error("appBuiltinFeatureFileSaveOrUpdate failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/appBuiltinFeatureFileList?functionId="+cfg.getFunctionId();
|
||||
@@ -1299,8 +1381,14 @@ public class AppCfgController extends BaseController {
|
||||
for(String id :idArray){
|
||||
try {
|
||||
appBuiltInFeatureService.audit(isAudit,isValid,functionId,id,auditTime);
|
||||
} catch (MaatConvertException e) {
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("appBuiltinFeature audit failed", e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,9 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
public void saveAsnIpCfg(CfgIndexInfo entity) {
|
||||
Date crateTime=new Date();
|
||||
ConfigGroupInfo groupInfo=specificServiceCfgDao.getConfigGroupInfoByGroupId(entity.getAsnIpGroup().intValue());
|
||||
|
||||
if(groupInfo==null) {
|
||||
throw new RuntimeException("ConfigGroupInfo is null!");
|
||||
}
|
||||
if(groupInfo.getIsIssued()==1) {//如果已经下发,则需要下到综合服务中
|
||||
if(entity.getAsnIpCfgs()!=null) {
|
||||
for(AsnIpCfg cfg:entity.getAsnIpCfgs()) {
|
||||
|
||||
Reference in New Issue
Block a user