stream、DDOS和高级功能模块对某些用户的配置不经过审核直接生效及生效中的配置进行修改的功能
This commit is contained in:
@@ -79,15 +79,19 @@ public class AsnIpController extends BaseController{
|
|||||||
public String save(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){
|
public String save(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){
|
||||||
try{
|
try{
|
||||||
asnIpCfgService.saveAsnIpCfg(cfg);
|
asnIpCfgService.saveAsnIpCfg(cfg);
|
||||||
addMessage(redirectAttributes,"success","save_success");
|
//配置仅保存
|
||||||
}catch(Exception e){
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
logger.error("信息保存失败",e);
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
e.printStackTrace();
|
|
||||||
if(e instanceof MaatConvertException) {
|
|
||||||
addMessage(redirectAttributes,"error",e.getMessage());
|
|
||||||
}else {
|
}else {
|
||||||
addMessage(redirectAttributes,"error","save_failed");
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ASN IP配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ASN IP配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath +"/basics/asn/list?functionId="+cfg.getFunctionId();
|
return "redirect:" + adminPath +"/basics/asn/list?functionId="+cfg.getFunctionId();
|
||||||
@@ -98,11 +102,19 @@ public class AsnIpController extends BaseController{
|
|||||||
try{
|
try{
|
||||||
|
|
||||||
asnIpCfgService.update(cfg);
|
asnIpCfgService.update(cfg);
|
||||||
addMessage(redirectAttributes,"success","save_success");
|
//配置仅保存
|
||||||
}catch(Exception e){
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
logger.error("信息保存失败",e);
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
e.printStackTrace();
|
}else {
|
||||||
addMessage(redirectAttributes,"error","save_failed");
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ASN IP配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ASN IP配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath +"/basics/asn/list?functionId="+cfg.getFunctionId();
|
return "redirect:" + adminPath +"/basics/asn/list?functionId="+cfg.getFunctionId();
|
||||||
|
|||||||
@@ -219,15 +219,19 @@ public class AppCfgController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
logger.error("saveAppPolicyCfg failed", e);
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
e.printStackTrace();
|
}else {
|
||||||
if (e instanceof MaatConvertException) {
|
//配置直接生效
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("app 协议配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("app 协议配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/app/policyCfgList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/app/policyCfgList?functionId=" + entity.getFunctionId();
|
||||||
@@ -255,12 +259,10 @@ public class AppCfgController extends BaseController {
|
|||||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id), null);
|
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
entity.setAuditTime(new Date());
|
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||||
try {
|
try {
|
||||||
appCfgService.auditAppPolicyCfg(entity, isAudit);
|
appCfgService.auditAppPolicyCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -394,15 +396,19 @@ public class AppCfgController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppIpCfg(entity);
|
appCfgService.saveOrUpdateAppIpCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
e.printStackTrace();
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
logger.error("saveAppIpCfg failed", e);
|
}else {
|
||||||
if (e instanceof MaatConvertException) {
|
//配置直接生效
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
}catch (MaatConvertException e) {
|
||||||
|
logger.error("APP IP配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("APP IP配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/app/ipCfgList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/app/ipCfgList?functionId=" + entity.getFunctionId();
|
||||||
@@ -432,10 +438,7 @@ public class AppCfgController extends BaseController {
|
|||||||
entity = appCfgService.getAppIpCfg(Long.parseLong(id));
|
entity = appCfgService.getAppIpCfg(Long.parseLong(id));
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
entity.setAuditTime(new Date());
|
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
entity.setTableName(AppIpCfg.getTablename());
|
|
||||||
if (dataMap.containsKey(entity.getCompileId())) {
|
if (dataMap.containsKey(entity.getCompileId())) {
|
||||||
dataMap.get(entity.getCompileId()).add(entity);
|
dataMap.get(entity.getCompileId()).add(entity);
|
||||||
} else {
|
} else {
|
||||||
@@ -737,14 +740,19 @@ public class AppCfgController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppDomainCfg(entity);
|
appCfgService.saveOrUpdateAppDomainCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
e.printStackTrace();
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
if (e instanceof MaatConvertException) {
|
}else {
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
//配置直接生效
|
||||||
} else {
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("APP域名配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("APP域名配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/app/domainCfgList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/app/domainCfgList?functionId=" + entity.getFunctionId();
|
||||||
@@ -772,11 +780,9 @@ public class AppCfgController extends BaseController {
|
|||||||
entity = appCfgService.getAppDomainCfg(Long.parseLong(id));
|
entity = appCfgService.getAppDomainCfg(Long.parseLong(id));
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
entity.setAuditTime(new Date());
|
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
appCfgService.auditAppDomainCfg(entity, isAudit);
|
appCfgService.auditAppDomainCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -1507,18 +1513,19 @@ public class AppCfgController extends BaseController {
|
|||||||
entity.setCfgKeywords(entity.getCfgKeywords());
|
entity.setCfgKeywords(entity.getCfgKeywords());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppTopicDomainCfg(entity);
|
appCfgService.saveOrUpdateAppTopicDomainCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
if (e instanceof MaatConvertException) {
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
e.printStackTrace();
|
}else {
|
||||||
logger.info("app主题网站配置下发失败:" + e.getMessage());
|
//配置直接生效
|
||||||
;
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
|
||||||
} else {
|
|
||||||
e.printStackTrace();
|
|
||||||
logger.error("app主题网站配置下发失败", e);
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("APP主题网站配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("APP主题网站配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/app/topicDomainCfgList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/app/topicDomainCfgList?functionId=" + entity.getFunctionId();
|
||||||
@@ -1546,11 +1553,9 @@ public class AppCfgController extends BaseController {
|
|||||||
entity = appCfgService.getAppTopicDomainCfg(Long.parseLong(id));
|
entity = appCfgService.getAppTopicDomainCfg(Long.parseLong(id));
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
entity.setAuditTime(new Date());
|
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
appCfgService.auditAppTopicDomainCfg(entity, isAudit);
|
appCfgService.auditAppTopicDomainCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("app主题网站配置下发失败", e);
|
logger.error("app主题网站配置下发失败", e);
|
||||||
|
|||||||
@@ -142,14 +142,19 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appMultiFeatureCfgService.saveOrUpdateAppFeatureCfg(entity);
|
appMultiFeatureCfgService.saveOrUpdateAppFeatureCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
e.printStackTrace();
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
if (e instanceof MaatConvertException) {
|
}else {
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
//配置直接生效
|
||||||
} else {
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("APP 特征配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("APP 特征配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + entity.getFunctionId();
|
||||||
@@ -176,11 +181,9 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(id));
|
entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(id));
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
entity.setAuditTime(new Date());
|
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
appMultiFeatureCfgService.auditAppFeatureCfg(entity, isAudit);
|
appMultiFeatureCfgService.auditAppFeatureCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (MaatConvertException e) {
|
} catch (MaatConvertException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -158,18 +158,22 @@ public class BasicProtocolController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
e.printStackTrace();
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
logger.error("基础协议信息保存失败", e);
|
}else {
|
||||||
if (e instanceof MaatConvertException) {
|
//配置直接生效
|
||||||
// addMessage(redirectAttributes,e.getMessage());
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
|
||||||
} else if (e instanceof CallExternalProceduresException) {
|
|
||||||
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("基础协议配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (CallExternalProceduresException e) {
|
||||||
|
logger.error("调用外部程序出错:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("基础协议配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/basicprotocol/list?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/basicprotocol/list?functionId=" + entity.getFunctionId();
|
||||||
@@ -197,12 +201,10 @@ public class BasicProtocolController extends BaseController {
|
|||||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id), null);
|
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
entity.setAuditTime(new Date());
|
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL);
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL);
|
||||||
try {
|
try {
|
||||||
appCfgService.auditAppPolicyCfg(entity, isAudit);
|
appCfgService.auditAppPolicyCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
|
|||||||
@@ -178,17 +178,22 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
e.printStackTrace();
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
logger.error("加密隧道信息保存失败", e);
|
}else {
|
||||||
if (e instanceof MaatConvertException) {
|
//配置直接生效
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} else if (e instanceof CallExternalProceduresException) {
|
|
||||||
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("加密隧道行为配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (CallExternalProceduresException e) {
|
||||||
|
logger.error("调用外部程序出错:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("加密隧道行为配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/encryptedtunnelbehav/list?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/encryptedtunnelbehav/list?functionId=" + entity.getFunctionId();
|
||||||
@@ -221,7 +226,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
|||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
||||||
try {
|
try {
|
||||||
appCfgService.auditAppPolicyCfg(entity, isAudit);
|
appCfgService.auditAppPolicyCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
|
|||||||
@@ -98,15 +98,19 @@ public class DnsIpCfgController extends BaseController {
|
|||||||
@ModelAttribute("cfg") DnsIpCfg cfg, RedirectAttributes redirectAttributes) {
|
@ModelAttribute("cfg") DnsIpCfg cfg, RedirectAttributes redirectAttributes) {
|
||||||
try {
|
try {
|
||||||
dnsIpCfgService.saveOrUpdate(cfg);
|
dnsIpCfgService.saveOrUpdate(cfg);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
logger.error("信息保存失败", e);
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
e.printStackTrace();
|
}else {
|
||||||
if (e instanceof MaatConvertException) {
|
//配置直接生效
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("DNS欺骗ip配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("DNS欺骗ip配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/cfg/dnsIp/list?functionId=" + cfg.getFunctionId();
|
return "redirect:" + adminPath + "/cfg/dnsIp/list?functionId=" + cfg.getFunctionId();
|
||||||
|
|||||||
@@ -80,10 +80,18 @@ public class DnsResStrategyController extends BaseController {
|
|||||||
|
|
||||||
dnsResStrategyService.saveOrUpdate(cfg);
|
dnsResStrategyService.saveOrUpdate(cfg);
|
||||||
|
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (MaatConvertException e) {
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("DNS响应策略配置下发失败:",e);
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("DNS响应策略配置保存失败:",e);
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,15 +71,19 @@ public class DdosCfgController extends BaseController {
|
|||||||
@ModelAttribute("cfg") DdosIpCfg cfg, RedirectAttributes redirectAttributes) {
|
@ModelAttribute("cfg") DdosIpCfg cfg, RedirectAttributes redirectAttributes) {
|
||||||
try {
|
try {
|
||||||
ddosCfgService.saveOrUpdate(cfg);
|
ddosCfgService.saveOrUpdate(cfg);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
} catch (Exception e) {
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
logger.error("信息保存失败", e);
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
e.printStackTrace();
|
}else {
|
||||||
if (e instanceof MaatConvertException) {
|
//配置直接生效
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("DDOS配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("DDOS配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + cfg.getFunctionId();
|
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + cfg.getFunctionId();
|
||||||
@@ -120,7 +124,7 @@ public class DdosCfgController extends BaseController {
|
|||||||
Date auditTime = new Date();
|
Date auditTime = new Date();
|
||||||
for (String id : idArray) {
|
for (String id : idArray) {
|
||||||
try {
|
try {
|
||||||
ddosCfgService.audit(isAudit, isValid, functionId, id, auditTime);
|
ddosCfgService.audit(isAudit, isValid, functionId, id, auditTime,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (MaatConvertException e) {
|
} catch (MaatConvertException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -238,20 +238,26 @@ public class PxyObjKeyringController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pxyObjKeyringService.saveOrUpdate(cfg);
|
pxyObjKeyringService.saveOrUpdate(cfg);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (MultiPartNewException e) {
|
||||||
|
logger.error("证书文件上传失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("拦截策略配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("证书上传失败", e);
|
logger.error("拦截策略配置保存失败:",e);
|
||||||
if (e instanceof MaatConvertException) {
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
|
||||||
} else if (e instanceof MultiPartNewException) {
|
|
||||||
addMessage(redirectAttributes, "error", e.getMessage());
|
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/proxy/intercept/strateagy/list?functionId=" + cfg.getFunctionId();
|
return "redirect:" + adminPath + "/proxy/intercept/strateagy/list?functionId=" + cfg.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -641,18 +647,24 @@ public class PxyObjKeyringController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pxyObjKeyringService.trustedCertsaveOrUpdate(cfg);
|
pxyObjKeyringService.trustedCertsaveOrUpdate(cfg);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (MultiPartNewException e) {
|
||||||
|
logger.error("可信证书上传失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", e.getMessage());
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("可信证书单配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("证书上传失败", e);
|
logger.error("可信证书配置保存失败:",e);
|
||||||
if (e instanceof MultiPartNewException) {
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
addMessage(redirectAttributes, "error", e.getMessage());
|
|
||||||
} else if (e instanceof MaatConvertException) {
|
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
|
||||||
} else {
|
|
||||||
addMessage(redirectAttributes, "error", "save_failed");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/proxy/intercept/strateagy/trustedCertList?functionId=" + cfg.getFunctionId();
|
return "redirect:" + adminPath + "/proxy/intercept/strateagy/trustedCertList?functionId=" + cfg.getFunctionId();
|
||||||
|
|||||||
@@ -336,6 +336,9 @@
|
|||||||
from asn_ip_cfg r where r.is_valid!=-1 and r.user_region1=#{asnId}
|
from asn_ip_cfg r where r.is_valid!=-1 and r.user_region1=#{asnId}
|
||||||
</select>
|
</select>
|
||||||
<insert id="insert" parameterType="com.nis.domain.basics.AsnIpCfg" >
|
<insert id="insert" parameterType="com.nis.domain.basics.AsnIpCfg" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
insert into asn_ip_cfg (
|
insert into asn_ip_cfg (
|
||||||
CFG_DESC,
|
CFG_DESC,
|
||||||
ACTION,
|
ACTION,
|
||||||
|
|||||||
@@ -215,6 +215,9 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insert" parameterType="com.nis.domain.configuration.DnsIpCfg" >
|
<insert id="insert" parameterType="com.nis.domain.configuration.DnsIpCfg" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
insert into dns_ip_cfg (
|
insert into dns_ip_cfg (
|
||||||
CFG_DESC,
|
CFG_DESC,
|
||||||
ACTION,
|
ACTION,
|
||||||
|
|||||||
@@ -197,6 +197,9 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
|||||||
order by r.cfg_Id
|
order by r.cfg_Id
|
||||||
</select>
|
</select>
|
||||||
<insert id="insert" parameterType="com.nis.domain.configuration.DnsResStrategy" >
|
<insert id="insert" parameterType="com.nis.domain.configuration.DnsResStrategy" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
insert into dns_res_strategy (
|
insert into dns_res_strategy (
|
||||||
CFG_DESC,
|
CFG_DESC,
|
||||||
ACTION,
|
ACTION,
|
||||||
|
|||||||
@@ -359,6 +359,9 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<insert id="insert" parameterType="com.nis.domain.configuration.PxyObjKeyring" >
|
<insert id="insert" parameterType="com.nis.domain.configuration.PxyObjKeyring" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
insert into pxy_obj_keyring (
|
insert into pxy_obj_keyring (
|
||||||
CFG_ID,
|
CFG_ID,
|
||||||
CFG_DESC,
|
CFG_DESC,
|
||||||
@@ -434,6 +437,9 @@
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertPxyObjTrustedCaCert" parameterType="com.nis.domain.configuration.PxyObjTrustedCaCert" >
|
<insert id="insertPxyObjTrustedCaCert" parameterType="com.nis.domain.configuration.PxyObjTrustedCaCert" >
|
||||||
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
insert into pxy_obj_trusted_ca_cert (
|
insert into pxy_obj_trusted_ca_cert (
|
||||||
CFG_ID,
|
CFG_ID,
|
||||||
CFG_DESC,
|
CFG_DESC,
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.nis.domain.maat.ToMaatResult;
|
|||||||
import com.nis.domain.specific.ConfigGroupInfo;
|
import com.nis.domain.specific.ConfigGroupInfo;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.CrudDao;
|
import com.nis.web.dao.CrudDao;
|
||||||
import com.nis.web.dao.basics.AsnGroupInfoDao;
|
import com.nis.web.dao.basics.AsnGroupInfoDao;
|
||||||
import com.nis.web.dao.basics.AsnIpCfgDao;
|
import com.nis.web.dao.basics.AsnIpCfgDao;
|
||||||
@@ -82,24 +83,31 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
public void save(List<AsnIpCfg> entitys) {
|
public void save(List<AsnIpCfg> entitys) {
|
||||||
logger.warn("Start to save IP,size:"+entitys.size());
|
logger.warn("Start to save IP,size:"+entitys.size());
|
||||||
long start=System.currentTimeMillis();
|
long start=System.currentTimeMillis();
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
// SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
SqlSession batchSqlSession = null;
|
// SqlSession batchSqlSession = null;
|
||||||
try{
|
// try{
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
// batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
for(AsnIpCfg asnIpCfg:entitys) {
|
// for(AsnIpCfg asnIpCfg:entitys) {
|
||||||
((AsnIpCfgDao) batchSqlSession.getMapper(AsnIpCfgDao.class)).insert(asnIpCfg);
|
// ((AsnIpCfgDao) batchSqlSession.getMapper(AsnIpCfgDao.class)).insert(asnIpCfg);
|
||||||
}
|
// }
|
||||||
batchSqlSession.commit();
|
// batchSqlSession.commit();
|
||||||
}finally {
|
for(AsnIpCfg asnIpCfg:entitys) {
|
||||||
if(batchSqlSession != null){
|
asnIpCfgDao.insert(asnIpCfg);
|
||||||
batchSqlSession.close();
|
}
|
||||||
}
|
// }finally {
|
||||||
}
|
// if(batchSqlSession != null){
|
||||||
|
// batchSqlSession.close();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
long end=System.currentTimeMillis();
|
long end=System.currentTimeMillis();
|
||||||
logger.warn("Save IP finish,cost:"+(end-start));
|
logger.warn("Save IP finish,cost:"+(end-start));
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void update(AsnIpCfg entity){
|
public void update(AsnIpCfg entity){
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
Date editTime=new Date();
|
Date editTime=new Date();
|
||||||
entity.setEditTime(editTime);
|
entity.setEditTime(editTime);
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
@@ -115,6 +123,22 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
entity.setDetail(detail);
|
entity.setDetail(detail);
|
||||||
entity.setCompileId(groupInfo.getCompileId());
|
entity.setCompileId(groupInfo.getCompileId());
|
||||||
asnIpCfgDao.update(entity);
|
asnIpCfgDao.update(entity);
|
||||||
|
if(isValid==1) {
|
||||||
|
Map<Long,List<AsnIpCfg>> asnIpMap=Maps.newHashMap();
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
|
if(asnIpMap.containsKey(Long.parseLong(entity.getUserRegion1()))) {
|
||||||
|
asnIpMap.get(Long.parseLong(entity.getUserRegion1())).add(entity);
|
||||||
|
}else {
|
||||||
|
List<AsnIpCfg> _asnIps=Lists.newArrayList();
|
||||||
|
_asnIps.add(entity);
|
||||||
|
asnIpMap.put(Long.parseLong(entity.getUserRegion1()), _asnIps);
|
||||||
|
}
|
||||||
|
|
||||||
|
auditIpBatch(asnIpMap,entity.getIsAudit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void processGroup(Map<Long,AsnGroupInfo> asnNoMap){
|
public void processGroup(Map<Long,AsnGroupInfo> asnNoMap){
|
||||||
@@ -261,6 +285,10 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveAsnIpCfg(CfgIndexInfo entity) {
|
public void saveAsnIpCfg(CfgIndexInfo entity) {
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//asn号
|
//asn号
|
||||||
String userRegion1=entity.getUserRegion1();
|
String userRegion1=entity.getUserRegion1();
|
||||||
@@ -308,6 +336,26 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.save(entity.getAsnIpCfgs());
|
this.save(entity.getAsnIpCfgs());
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
|
||||||
|
Map<Long,List<AsnIpCfg>> asnIpMap=Maps.newHashMap();
|
||||||
|
for(AsnIpCfg asnIpCfg:entity.getAsnIpCfgs()) {
|
||||||
|
asnIpCfg.setIsAudit(1);
|
||||||
|
asnIpCfg.setIsValid(1);
|
||||||
|
asnIpCfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
asnIpCfg.setAuditTime(new Date());
|
||||||
|
if(asnIpMap.containsKey(Long.parseLong(asnIpCfg.getUserRegion1()))) {
|
||||||
|
asnIpMap.get(Long.parseLong(asnIpCfg.getUserRegion1())).add(asnIpCfg);
|
||||||
|
}else {
|
||||||
|
List<AsnIpCfg> _asnIps=Lists.newArrayList();
|
||||||
|
_asnIps.add(asnIpCfg);
|
||||||
|
asnIpMap.put(Long.parseLong(asnIpCfg.getUserRegion1()), _asnIps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auditIpBatch(asnIpMap,entity.getIsAudit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void delete(String ids) {
|
public void delete(String ids) {
|
||||||
|
|||||||
@@ -248,7 +248,10 @@ public class AppCfgService extends BaseService {
|
|||||||
public void saveOrUpdateAppPolicyCfg(AppPolicyCfg entity) throws Exception {
|
public void saveOrUpdateAppPolicyCfg(AppPolicyCfg entity) throws Exception {
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
if (entity.getCfgId() == null) {
|
if (entity.getCfgId() == null) {
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -302,7 +305,20 @@ public class AppCfgService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
if(entity.getFunctionId() == 407){
|
||||||
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL);
|
||||||
|
}
|
||||||
|
if(entity.getFunctionId() == 63){
|
||||||
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||||
|
}
|
||||||
|
if(entity.getFunctionId() == 408){
|
||||||
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
||||||
|
}
|
||||||
|
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -356,6 +372,20 @@ public class AppCfgService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
if(entity.getFunctionId() == 407){
|
||||||
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL);
|
||||||
|
}
|
||||||
|
if(entity.getFunctionId() == 63){
|
||||||
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP);
|
||||||
|
}
|
||||||
|
if(entity.getFunctionId() == 408){
|
||||||
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
||||||
|
}
|
||||||
|
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +393,10 @@ public class AppCfgService extends BaseService {
|
|||||||
public void saveOrUpdateAppIpCfg(AppIpCfg entity) throws Exception {
|
public void saveOrUpdateAppIpCfg(AppIpCfg entity) throws Exception {
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
if (entity.getCfgId() == null) {
|
if (entity.getCfgId() == null) {
|
||||||
|
|
||||||
SpecificServiceCfg specificServiceCfg=specificServiceCfgDao.getBySpecServiceId(entity.getSpecServiceId());
|
SpecificServiceCfg specificServiceCfg=specificServiceCfgDao.getBySpecServiceId(entity.getSpecServiceId());
|
||||||
@@ -433,6 +466,13 @@ public class AppCfgService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
List<AppIpCfg> entitys=new ArrayList<AppIpCfg>();
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
entitys.add(entity);
|
||||||
|
auditAppIpCfg(entitys, entity.getIsAudit());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -457,6 +497,16 @@ public class AppCfgService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
List<AppIpCfg> entitys=new ArrayList<AppIpCfg>();
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
AppIpCfg entity2 = appCfgDao.getAppIpCfg(entity.getCfgId());
|
||||||
|
entity2.setIsAudit(1);
|
||||||
|
entity2.setIsValid(1);
|
||||||
|
entitys.add(entity2);
|
||||||
|
auditAppIpCfg(entitys, entity.getIsAudit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void saveAppHttpCfg(List<ComplexkeywordCfg> cfgs) {
|
public void saveAppHttpCfg(List<ComplexkeywordCfg> cfgs) {
|
||||||
@@ -538,7 +588,10 @@ public class AppCfgService extends BaseService {
|
|||||||
public void saveOrUpdateAppDomainCfg(AppDomainCfg entity) throws Exception {
|
public void saveOrUpdateAppDomainCfg(AppDomainCfg entity) throws Exception {
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
if (entity.getCfgId() == null) {
|
if (entity.getCfgId() == null) {
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -565,6 +618,11 @@ public class AppCfgService extends BaseService {
|
|||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException(e.getMessage());
|
throw new MaatConvertException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -586,6 +644,11 @@ public class AppCfgService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,7 +656,10 @@ public class AppCfgService extends BaseService {
|
|||||||
public void saveOrUpdateAppTopicDomainCfg(AppTopicDomainCfg entity) throws Exception {
|
public void saveOrUpdateAppTopicDomainCfg(AppTopicDomainCfg entity) throws Exception {
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
if (entity.getCfgId() == null) {
|
if (entity.getCfgId() == null) {
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -620,6 +686,11 @@ public class AppCfgService extends BaseService {
|
|||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException(e.getMessage());
|
throw new MaatConvertException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -641,6 +712,11 @@ public class AppCfgService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -890,7 +966,10 @@ public class AppCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void auditAppPolicyCfg(AppPolicyCfg entity, Integer isAudit) {
|
public void auditAppPolicyCfg(AppPolicyCfg entity, Integer isAudit,Integer opAction) {
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
String configType = entity.getConfigType();
|
String configType = entity.getConfigType();
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
@@ -1036,7 +1115,7 @@ public class AppCfgService extends BaseService {
|
|||||||
maatBean.setAuditTime(entity.getAuditTime());
|
maatBean.setAuditTime(entity.getAuditTime());
|
||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(opAction);
|
||||||
// 调用服务接口下发配置数据
|
// 调用服务接口下发配置数据
|
||||||
String json = gsonToJson(maatBean);
|
String json = gsonToJson(maatBean);
|
||||||
logger.info("app策略配置下发配置参数:" + json);
|
logger.info("app策略配置下发配置参数:" + json);
|
||||||
@@ -1164,6 +1243,12 @@ public class AppCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void auditAppIpCfg(List<AppIpCfg> entitys, Integer isAudit) {
|
public void auditAppIpCfg(List<AppIpCfg> entitys, Integer isAudit) {
|
||||||
|
for (AppIpCfg entity : entitys) {
|
||||||
|
entity.setTableName(AppIpCfg.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
|
}
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
List<MaatCfg> configCompileList = new ArrayList();
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
List<GroupCfg> groupRelationList = new ArrayList();
|
List<GroupCfg> groupRelationList = new ArrayList();
|
||||||
@@ -1380,7 +1465,10 @@ public class AppCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void auditAppDomainCfg(AppDomainCfg entity, Integer isAudit) {
|
public void auditAppDomainCfg(AppDomainCfg entity, Integer isAudit,Integer opAction) {
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
List<MaatCfg> configCompileList = new ArrayList();
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
@@ -1441,7 +1529,7 @@ public class AppCfgService extends BaseService {
|
|||||||
maatBean.setAuditTime(entity.getAuditTime());
|
maatBean.setAuditTime(entity.getAuditTime());
|
||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(opAction);
|
||||||
// 调用服务接口下发配置数据
|
// 调用服务接口下发配置数据
|
||||||
String json = gsonToJson(maatBean);
|
String json = gsonToJson(maatBean);
|
||||||
logger.info("app域名配置下发配置参数:" + json);
|
logger.info("app域名配置下发配置参数:" + json);
|
||||||
@@ -1469,7 +1557,10 @@ public class AppCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// app主题网站配置审核
|
// app主题网站配置审核
|
||||||
public void auditAppTopicDomainCfg(AppTopicDomainCfg entity, Integer isAudit) {
|
public void auditAppTopicDomainCfg(AppTopicDomainCfg entity, Integer isAudit,Integer opAction) {
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
List<MaatCfg> configCompileList = new ArrayList();
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
@@ -1536,7 +1627,7 @@ public class AppCfgService extends BaseService {
|
|||||||
maatBean.setAuditTime(entity.getAuditTime());
|
maatBean.setAuditTime(entity.getAuditTime());
|
||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(opAction);
|
||||||
// 调用服务接口下发配置数据
|
// 调用服务接口下发配置数据
|
||||||
String json = gsonToJson(maatBean);
|
String json = gsonToJson(maatBean);
|
||||||
logger.info("app主题网站配置下发配置参数:" + json);
|
logger.info("app主题网站配置下发配置参数:" + json);
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
//新增或保存复杂特征配置
|
//新增或保存复杂特征配置
|
||||||
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
||||||
public void saveOrUpdateAppFeatureCfg(AppFeatureIndex entity) throws Exception {
|
public void saveOrUpdateAppFeatureCfg(AppFeatureIndex entity) throws Exception {
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
if (entity.getCfgId() == null) {
|
if (entity.getCfgId() == null) {
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -166,6 +170,11 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException(e.getMessage());
|
throw new MaatConvertException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAppFeatureCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -243,6 +252,11 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAppFeatureCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,7 +300,11 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
cfg.setCfgKeywords(keyword);
|
cfg.setCfgKeywords(keyword);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void auditAppFeatureCfg(AppFeatureIndex entity, Integer isAudit) {
|
public void auditAppFeatureCfg(AppFeatureIndex entity, Integer isAudit,Integer opAction) {
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
List<MaatCfg> configCompileList = new ArrayList();
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
@@ -421,7 +439,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
maatBean.setAuditTime(entity.getAuditTime());
|
maatBean.setAuditTime(entity.getAuditTime());
|
||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(opAction);
|
||||||
// 调用服务接口下发配置数据
|
// 调用服务接口下发配置数据
|
||||||
String json = gsonToJson(maatBean);
|
String json = gsonToJson(maatBean);
|
||||||
logger.info("app 特征配置下发配置参数:" + json);
|
logger.info("app 特征配置下发配置参数:" + json);
|
||||||
|
|||||||
@@ -71,10 +71,14 @@ public class DdosCfgService extends BaseService{
|
|||||||
return ddosCfgDao.getDdosIpCfg(cfgId,compileId);
|
return ddosCfgDao.getDdosIpCfg(cfgId,compileId);
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveOrUpdate(DdosIpCfg entity){
|
public void saveOrUpdate(DdosIpCfg entity) throws Exception{
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
String antiddosProtocol = entity.getAntiddosProtocol();
|
String antiddosProtocol = entity.getAntiddosProtocol();
|
||||||
Long bpsThreadshold = entity.getBpsThreadshold();
|
Long bpsThreadshold = entity.getBpsThreadshold();
|
||||||
Long ppsThreadshold = entity.getPpsThreadshold();
|
Long ppsThreadshold = entity.getPpsThreadshold();
|
||||||
@@ -116,7 +120,11 @@ public class DdosCfgService extends BaseService{
|
|||||||
}else {
|
}else {
|
||||||
throw new RuntimeException("Could not get compileId!");
|
throw new RuntimeException("Could not get compileId!");
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
audit(entity.getIsAudit(), isValid, entity.getFunctionId(),String.valueOf(entity.getCfgId()), new Date(),Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
//修改
|
//修改
|
||||||
}else{
|
}else{
|
||||||
Date editTime=new Date();
|
Date editTime=new Date();
|
||||||
@@ -126,6 +134,11 @@ public class DdosCfgService extends BaseService{
|
|||||||
entity.setEditTime(editTime);
|
entity.setEditTime(editTime);
|
||||||
|
|
||||||
ddosCfgDao.update(entity);
|
ddosCfgDao.update(entity);
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
audit(entity.getIsAudit(), isValid, entity.getFunctionId(),String.valueOf(entity.getCfgId()), new Date(),Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +241,7 @@ public class DdosCfgService extends BaseService{
|
|||||||
|
|
||||||
}*/
|
}*/
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime) throws Exception{
|
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime,Integer opAction) throws Exception{
|
||||||
DdosIpCfg entity = new DdosIpCfg();
|
DdosIpCfg entity = new DdosIpCfg();
|
||||||
|
|
||||||
entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id),entity.getCompileId());
|
entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id),entity.getCompileId());
|
||||||
@@ -308,7 +321,7 @@ public class DdosCfgService extends BaseService{
|
|||||||
maatBean.setAuditTime(auditTime);
|
maatBean.setAuditTime(auditTime);
|
||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(opAction);
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("ddos 配置下发配置参数:"+json);
|
logger.info("ddos 配置下发配置参数:"+json);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.nis.domain.maat.ToMaatResult;
|
|||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.configuration.DnsIpCfgDao;
|
import com.nis.web.dao.configuration.DnsIpCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.BaseService;
|
import com.nis.web.service.BaseService;
|
||||||
@@ -64,6 +65,10 @@ public class DnsIpCfgService extends BaseService{
|
|||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
@@ -102,6 +107,11 @@ public class DnsIpCfgService extends BaseService{
|
|||||||
entity.setEditTime(editTime);
|
entity.setEditTime(editTime);
|
||||||
dnsIpCfgDao.update(entity);
|
dnsIpCfgDao.update(entity);
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()), new Date());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import com.nis.domain.configuration.DnsResStrategy;
|
|||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.configuration.DnsResStrategyDao;
|
import com.nis.web.dao.configuration.DnsResStrategyDao;
|
||||||
import com.nis.web.dao.configuration.StringCfgDao;
|
import com.nis.web.dao.configuration.StringCfgDao;
|
||||||
@@ -86,6 +87,10 @@ public class DnsResStrategyService extends BaseService{
|
|||||||
public void saveOrUpdate(DnsResStrategy entity){
|
public void saveOrUpdate(DnsResStrategy entity){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
List<DnsResStrategy> list = new ArrayList<DnsResStrategy>();
|
List<DnsResStrategy> list = new ArrayList<DnsResStrategy>();
|
||||||
if( entity.getCfgId()!=null && !"".equals(entity.getCfgId())){
|
if( entity.getCfgId()!=null && !"".equals(entity.getCfgId())){
|
||||||
list=dnsResStrategyDao.findList(entity.getCfgId(),null,null);
|
list=dnsResStrategyDao.findList(entity.getCfgId(),null,null);
|
||||||
@@ -112,6 +117,11 @@ public class DnsResStrategyService extends BaseService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dnsResStrategyDao.insert(entity);
|
dnsResStrategyDao.insert(entity);
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()), new Date());
|
||||||
|
}
|
||||||
//修改
|
//修改
|
||||||
}else{
|
}else{
|
||||||
Date editTime=new Date();
|
Date editTime=new Date();
|
||||||
@@ -121,6 +131,11 @@ public class DnsResStrategyService extends BaseService{
|
|||||||
entity.setEditTime(editTime);
|
entity.setEditTime(editTime);
|
||||||
|
|
||||||
dnsResStrategyDao.update(entity);
|
dnsResStrategyDao.update(entity);
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()), new Date());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,8 +172,8 @@ public class DnsResStrategyService extends BaseService{
|
|||||||
cfg.setCfgId(Long.valueOf(id));
|
cfg.setCfgId(Long.valueOf(id));
|
||||||
cfg.setIsValid(isValid);
|
cfg.setIsValid(isValid);
|
||||||
cfg.setIsAudit(isAudit);
|
cfg.setIsAudit(isAudit);
|
||||||
cfg.setEditTime(auditTime);
|
// cfg.setEditTime(auditTime);
|
||||||
cfg.setEditorId(UserUtils.getUser().getId());
|
// cfg.setEditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditTime(auditTime);
|
cfg.setAuditTime(auditTime);
|
||||||
dnsResStrategyDao.update(cfg);
|
dnsResStrategyDao.update(cfg);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.nis.domain.configuration.PxyObjTrustedCaCrl;
|
|||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.basics.ServiceDictInfoDao;
|
import com.nis.web.dao.basics.ServiceDictInfoDao;
|
||||||
import com.nis.web.dao.configuration.PxyObjKeyringDao;
|
import com.nis.web.dao.configuration.PxyObjKeyringDao;
|
||||||
@@ -100,6 +101,10 @@ public class PxyObjKeyringService extends BaseService{
|
|||||||
public void saveOrUpdate(PxyObjKeyring entity){
|
public void saveOrUpdate(PxyObjKeyring entity){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
entity.setIsAudit(0);
|
entity.setIsAudit(0);
|
||||||
//新增
|
//新增
|
||||||
@@ -128,11 +133,21 @@ public class PxyObjKeyringService extends BaseService{
|
|||||||
|
|
||||||
pxyObjKeyringDao.update(entity);
|
pxyObjKeyringDao.update(entity);
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()), new Date());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void trustedCertsaveOrUpdate(PxyObjTrustedCaCert entity){
|
public void trustedCertsaveOrUpdate(PxyObjTrustedCaCert entity) throws InterruptedException{
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
entity.setIsAudit(0);
|
entity.setIsAudit(0);
|
||||||
//新增
|
//新增
|
||||||
@@ -162,11 +177,16 @@ public class PxyObjKeyringService extends BaseService{
|
|||||||
//修改主表cert配置时,需要修改子表crl配置信息
|
//修改主表cert配置时,需要修改子表crl配置信息
|
||||||
PxyObjTrustedCaCrl crlCfg =new PxyObjTrustedCaCrl();
|
PxyObjTrustedCaCrl crlCfg =new PxyObjTrustedCaCrl();
|
||||||
BeanUtils.copyProperties(entity, crlCfg, new String[]{"cfgId","serviceId","compileId","cfgType"});
|
BeanUtils.copyProperties(entity, crlCfg, new String[]{"cfgId","serviceId","compileId","cfgType"});
|
||||||
entity=pxyObjKeyringDao.getPxyObjTrustedCaCert(entity.getCfgId());
|
PxyObjTrustedCaCert cert=pxyObjKeyringDao.getPxyObjTrustedCaCert(entity.getCfgId());
|
||||||
crlCfg.setCertId(entity.getCompileId());
|
crlCfg.setCertId(cert.getCompileId());
|
||||||
pxyObjKeyringDao.updatePxyObjTrustedCaCrl(crlCfg);
|
pxyObjKeyringDao.updatePxyObjTrustedCaCrl(crlCfg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
trustedCertAudit(entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()), new Date());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void trustedCrlsaveOrUpdate(PxyObjTrustedCaCrl entity){
|
public void trustedCrlsaveOrUpdate(PxyObjTrustedCaCrl entity){
|
||||||
@@ -320,8 +340,8 @@ public class PxyObjKeyringService extends BaseService{
|
|||||||
cfg.setCfgId(Long.valueOf(id));
|
cfg.setCfgId(Long.valueOf(id));
|
||||||
cfg.setIsValid(isValid);
|
cfg.setIsValid(isValid);
|
||||||
cfg.setIsAudit(isAudit);
|
cfg.setIsAudit(isAudit);
|
||||||
cfg.setEditTime(auditTime);
|
// cfg.setEditTime(auditTime);
|
||||||
cfg.setEditorId(UserUtils.getUser().getId());
|
// cfg.setEditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditTime(auditTime);
|
cfg.setAuditTime(auditTime);
|
||||||
pxyObjKeyringDao.update(cfg);
|
pxyObjKeyringDao.update(cfg);
|
||||||
@@ -402,8 +422,8 @@ public class PxyObjKeyringService extends BaseService{
|
|||||||
cfg.setCfgId(Long.valueOf(id));
|
cfg.setCfgId(Long.valueOf(id));
|
||||||
cfg.setIsValid(isValid);
|
cfg.setIsValid(isValid);
|
||||||
cfg.setIsAudit(isAudit);
|
cfg.setIsAudit(isAudit);
|
||||||
cfg.setEditTime(auditTime);
|
// cfg.setEditTime(auditTime);
|
||||||
cfg.setEditorId(UserUtils.getUser().getId());
|
// cfg.setEditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
cfg.setAuditTime(auditTime);
|
cfg.setAuditTime(auditTime);
|
||||||
//修改主表cert 配置状态
|
//修改主表cert 配置状态
|
||||||
|
|||||||
@@ -152,6 +152,8 @@ var reSort=function(obj,index){
|
|||||||
<input type="hidden" id="compileId" name="compileId" value="0">
|
<input type="hidden" id="compileId" name="compileId" value="0">
|
||||||
<input type="hidden" id="requestId" name="requestId" value="0">
|
<input type="hidden" id="requestId" name="requestId" value="0">
|
||||||
<input type="hidden" id="asnIpGroup" name="asnIpGroup" value="0">
|
<input type="hidden" id="asnIpGroup" name="asnIpGroup" value="0">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<c:forEach items="${serviceList}" var="service">
|
<c:forEach items="${serviceList}" var="service">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
||||||
<input type="hidden" id="action" name="action" value="${service.action}">
|
<input type="hidden" id="action" name="action" value="${service.action}">
|
||||||
@@ -429,7 +431,23 @@ var reSort=function(obj,index){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,10 +97,17 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<c:if test="${_cfg.isAudit ne 1}">
|
<c:choose>
|
||||||
<input type="hidden" name="isValid" value="0">
|
<c:when test="${_cfg.isAudit ne 1}">
|
||||||
<input type="hidden" name="isAudit" value="0">
|
<input type="hidden" name="isValid" value="0">
|
||||||
</c:if>
|
<input type="hidden" name="isAudit" value="0">
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
<input type="hidden" id="regionId" name="regionId" value="${_cfg.regionId}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||||
<input type="hidden" id="requestId" name="requestId" value="${_cfg.requestId}">
|
<input type="hidden" id="requestId" name="requestId" value="${_cfg.requestId}">
|
||||||
@@ -377,7 +384,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||||
@@ -378,7 +380,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||||
@@ -301,7 +303,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -260,6 +260,8 @@ function changeKeywordFormate(exprType,obj){
|
|||||||
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||||
@@ -554,9 +556,23 @@ function changeKeywordFormate(exprType,obj){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green">
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
<spring:message code="submit" />
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
</button>
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default">
|
<button id="cancel" type="button" class="btn default">
|
||||||
<spring:message code="cancel" />
|
<spring:message code="cancel" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="exprType" name="exprType" value="0">
|
<input type="hidden" id="exprType" name="exprType" value="0">
|
||||||
<input type="hidden" id="matchMethod" name="matchMethod" value="0">
|
<input type="hidden" id="matchMethod" name="matchMethod" value="0">
|
||||||
@@ -492,7 +494,23 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
||||||
<input type="hidden" id="domainId" name="domainId" value="">
|
<input type="hidden" id="domainId" name="domainId" value="">
|
||||||
@@ -518,7 +520,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -177,6 +177,8 @@ var switchRateLimitType=function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
||||||
<%-- <input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}"> --%>
|
<%-- <input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}"> --%>
|
||||||
@@ -438,7 +440,23 @@ var switchRateLimitType=function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||||
<!-- 配置域类型 -->
|
<!-- 配置域类型 -->
|
||||||
@@ -248,7 +250,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" name="protocolId" value="0">
|
<input type="hidden" name="protocolId" value="0">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||||
@@ -317,7 +319,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -202,6 +202,8 @@ var switchRateLimitType=function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
||||||
<%-- <input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}"> --%>
|
<%-- <input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}"> --%>
|
||||||
@@ -470,7 +472,23 @@ var switchRateLimitType=function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -185,6 +185,8 @@ function privateFileValidate(){
|
|||||||
<form id="cfgFrom" action="${ctx}/proxy/intercept/strateagy/saveOrUpdate" method="post" enctype="multipart/form-data" class="form-horizontal">
|
<form id="cfgFrom" action="${ctx}/proxy/intercept/strateagy/saveOrUpdate" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||||
@@ -398,7 +400,23 @@ function privateFileValidate(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ function certFileValidate(){
|
|||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="cfgType" name="cfgType" value="PXY_OBJ_TRUSTED_CA_CERT">
|
<input type="hidden" id="cfgType" name="cfgType" value="PXY_OBJ_TRUSTED_CA_CERT">
|
||||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||||
@@ -214,7 +216,23 @@ function certFileValidate(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ $(function(){
|
|||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||||
|
|
||||||
@@ -222,7 +224,23 @@ $(function(){
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-offset-3 col-md-8">
|
<div class="col-md-offset-3 col-md-8">
|
||||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
<c:set var="auditPermission" value="false"></c:set>
|
||||||
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||||
|
<shiro:hasPermission name="save:audit:permission">
|
||||||
|
<c:set var="auditPermission" value="true"></c:set>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||||
|
<button id="audit" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button id="save" type="submit" class="btn green">
|
||||||
|
<spring:message code="submit" />
|
||||||
|
</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user