协议-配置支持对某些用户的配置不经过审核直接生效的流程
This commit is contained in:
@@ -9,8 +9,18 @@ package com.nis.domain.configuration;
|
|||||||
* @version V1.0
|
* @version V1.0
|
||||||
*/
|
*/
|
||||||
public class AvVoipAccountCfg extends BaseStringCfg<AvVoipAccountCfg>{
|
public class AvVoipAccountCfg extends BaseStringCfg<AvVoipAccountCfg>{
|
||||||
|
private static final String tableName="av_voip_account_cfg";
|
||||||
|
|
||||||
private static final long serialVersionUID = -7398698517584394431L;
|
private static final long serialVersionUID = -7398698517584394431L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initDefaultValue() {
|
||||||
|
super.initDefaultValue();
|
||||||
|
this.exprType=0;
|
||||||
|
this.matchMethod=0;
|
||||||
|
}
|
||||||
|
public static String getTablename() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,13 @@ public class AvContentController extends BaseController {
|
|||||||
CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
|
CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
|
||||||
try {
|
try {
|
||||||
avContentCfgService.saveOrUpdateAvVoip(cfg);
|
avContentCfgService.saveOrUpdateAvVoip(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 (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -204,7 +210,15 @@ public class AvContentController extends BaseController {
|
|||||||
Date auditTime = new Date();
|
Date auditTime = new Date();
|
||||||
for (String id : idArray) {
|
for (String id : idArray) {
|
||||||
try {
|
try {
|
||||||
avContentCfgService.auditAvVoip(isAudit, isValid, functionId, id, auditTime);
|
CfgIndexInfo entity=new CfgIndexInfo();
|
||||||
|
entity.setCfgId(Long.parseLong(id));
|
||||||
|
entity = avContentCfgService.getCfgIndexInfo(entity);
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setIsValid(isValid);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
|
entity.setFunctionId(functionId);
|
||||||
|
avContentCfgService.auditAvVoip(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) {
|
||||||
@@ -614,7 +628,13 @@ public class AvContentController extends BaseController {
|
|||||||
CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
|
CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
|
||||||
try {
|
try {
|
||||||
avContentCfgService.saveOrUpdateContUrl(cfg);
|
avContentCfgService.saveOrUpdateContUrl(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 (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -663,7 +683,6 @@ public class AvContentController extends BaseController {
|
|||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
if (!StringUtil.isEmpty(ids)) {
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = ids.split(",");
|
||||||
Date auditTime = new Date();
|
|
||||||
for (String id : idArray) {
|
for (String id : idArray) {
|
||||||
try {
|
try {
|
||||||
CfgIndexInfo entity=new CfgIndexInfo();
|
CfgIndexInfo entity=new CfgIndexInfo();
|
||||||
|
|||||||
@@ -72,7 +72,22 @@ public class BgpCfgController extends BaseController {
|
|||||||
@RequiresPermissions(value = { "other:bgp:config" })
|
@RequiresPermissions(value = { "other:bgp:config" })
|
||||||
public String saveBgpCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
|
public String saveBgpCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
|
||||||
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
||||||
bgpCfgService.saveBgpCfg(entity);
|
try {
|
||||||
|
bgpCfgService.saveBgpCfg(entity);
|
||||||
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ip白名单配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ip白名单配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + entity.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,11 +172,11 @@ public class BgpCfgController extends BaseController {
|
|||||||
entity = bgpCfgService.getBgpCfg(Long.parseLong(id), null);
|
entity = bgpCfgService.getBgpCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
entity.setAuditTime(new Date());*/
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
bgpCfgService.auditBgpCfg(entity, isAudit);
|
bgpCfgService.auditBgpCfg(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();
|
||||||
|
|||||||
@@ -87,7 +87,13 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
||||||
try {
|
try {
|
||||||
fileTransferCfgService.saveFtpCfg(entity);
|
fileTransferCfgService.saveFtpCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -185,11 +191,11 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id), null);
|
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
// entity.setAuditTime(new Date());
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
fileTransferCfgService.auditFtpCfg(entity, isAudit);
|
fileTransferCfgService.auditFtpCfg(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) {
|
||||||
@@ -487,7 +493,13 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
||||||
try {
|
try {
|
||||||
fileTransferCfgService.saveP2pCfg(entity);
|
fileTransferCfgService.saveP2pCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -585,11 +597,11 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id), null);
|
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
// entity.setAuditTime(new Date());
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
fileTransferCfgService.auditP2pCfg(entity, isAudit);
|
fileTransferCfgService.auditP2pCfg(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();
|
||||||
|
|||||||
@@ -107,7 +107,12 @@ public class MailCfgController extends BaseController {
|
|||||||
logger.info("获取文件摘要响应信息:" + result);
|
logger.info("获取文件摘要响应信息:" + result);
|
||||||
}
|
}
|
||||||
mailCfgService.saveMailCfg(entity, result);
|
mailCfgService.saveMailCfg(entity, result);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
@@ -205,11 +210,11 @@ public class MailCfgController extends BaseController {
|
|||||||
entity = mailCfgService.getMailCfg(Long.parseLong(id), null);
|
entity = mailCfgService.getMailCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
entity.setAuditTime(new Date());*/
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
mailCfgService.auditMailCfg(entity, isAudit);
|
mailCfgService.auditMailCfg(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();
|
||||||
|
|||||||
@@ -192,9 +192,25 @@ public class WebsiteController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "saveHttpCfg" })
|
@RequestMapping(value = { "saveHttpCfg" })
|
||||||
@RequiresPermissions(value = { "website:http:config" })
|
@RequiresPermissions(value = { "website:http:config" })
|
||||||
public String saveHttpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
public String saveHttpCfg( HttpServletRequest request, HttpServletResponse response,
|
||||||
String ids, CfgIndexInfo entity) {
|
String ids, CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||||
websiteCfgService.saveHttpCfg(entity);
|
|
||||||
|
try {
|
||||||
|
websiteCfgService.saveHttpCfg(entity);
|
||||||
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ip白名单配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ip白名单配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + entity.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,11 +259,11 @@ public class WebsiteController extends BaseController {
|
|||||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(id), null);
|
entity = websiteCfgService.getHttpCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
entity.setAuditTime(new Date());*/
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
websiteCfgService.auditHttpCfg(entity, isAudit);
|
websiteCfgService.auditHttpCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||||
addMessage(redirectAttributes, "success", "audit_success");
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
} catch (MaatConvertException e) {
|
} catch (MaatConvertException e) {
|
||||||
logger.error("http配置下发失败:" + e.getMessage());
|
logger.error("http配置下发失败:" + e.getMessage());
|
||||||
@@ -306,9 +322,24 @@ public class WebsiteController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "saveSslCfg" })
|
@RequestMapping(value = { "saveSslCfg" })
|
||||||
@RequiresPermissions(value = { "website:ssl:config" })
|
@RequiresPermissions(value = { "website:ssl:config" })
|
||||||
public String saveSslCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
public String saveSslCfg(HttpServletRequest request, HttpServletResponse response,
|
||||||
String ids, CfgIndexInfo entity) {
|
String ids, CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||||
websiteCfgService.saveSslCfg(entity);
|
try {
|
||||||
|
websiteCfgService.saveSslCfg(entity);
|
||||||
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ip白名单配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ip白名单配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + entity.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,11 +422,11 @@ public class WebsiteController extends BaseController {
|
|||||||
entity = websiteCfgService.getSslCfg(Long.parseLong(id), null);
|
entity = websiteCfgService.getSslCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
// entity.setAuditTime(new Date());
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
websiteCfgService.auditSslCfg(entity, isAudit);
|
websiteCfgService.auditSslCfg(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();
|
||||||
@@ -452,8 +483,23 @@ public class WebsiteController extends BaseController {
|
|||||||
@RequestMapping(value = { "saveDnsCfg" })
|
@RequestMapping(value = { "saveDnsCfg" })
|
||||||
@RequiresPermissions(value = { "website:dns:config" })
|
@RequiresPermissions(value = { "website:dns:config" })
|
||||||
public String saveDnsCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
public String saveDnsCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||||
String ids, CfgIndexInfo entity) {
|
String ids, CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||||
websiteCfgService.saveDnsCfg(entity);
|
try {
|
||||||
|
websiteCfgService.saveDnsCfg(entity);
|
||||||
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ip白名单配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ip白名单配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + entity.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,11 +577,11 @@ public class WebsiteController extends BaseController {
|
|||||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(id), null);
|
entity = websiteCfgService.getDnsCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
// entity.setAuditTime(new Date());
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
websiteCfgService.auditDnsCfg(entity, isAudit);
|
websiteCfgService.auditDnsCfg(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();
|
||||||
|
|||||||
@@ -205,9 +205,8 @@ public class WhiteListController extends CommonController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "saveHttpUrlCfgs" })
|
@RequestMapping(value = { "saveHttpUrlCfgs" })
|
||||||
public String saveHttpUrlCfgs(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
public String saveHttpUrlCfgs(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||||
CfgIndexInfo entity) {
|
CfgIndexInfo entity) throws Exception {
|
||||||
if (!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())) {
|
if (!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())) {
|
||||||
|
|
||||||
CfgIndexInfo sourceCfg = websiteCfgService
|
CfgIndexInfo sourceCfg = websiteCfgService
|
||||||
.getCfgIndexInfo(entity.getHttpUrlList().get(0).getSourceCompileId());
|
.getCfgIndexInfo(entity.getHttpUrlList().get(0).getSourceCompileId());
|
||||||
for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) {
|
for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) {
|
||||||
@@ -249,9 +248,24 @@ public class WhiteListController extends CommonController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = { "domain/save" })
|
@RequestMapping(value = { "domain/save" })
|
||||||
public String saveOrUpdateDomain(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
public String saveOrUpdateDomain(RedirectAttributes redirectAttributes, HttpServletRequest request, HttpServletResponse response,
|
||||||
String ids, CfgIndexInfo entity) {
|
String ids, CfgIndexInfo entity) {
|
||||||
domainService.saveDomainCfg(entity);
|
try {
|
||||||
|
domainService.saveDomainCfg(entity);
|
||||||
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
|
} catch (MaatConvertException e) {
|
||||||
|
logger.error("ip白名单配置下发失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("ip白名单配置保存失败:",e);
|
||||||
|
addMessage(redirectAttributes, "error", "save_failed");
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + entity.getFunctionId();
|
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + entity.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,11 +347,11 @@ public class WhiteListController extends CommonController {
|
|||||||
entity = domainService.getDomainCfg(Long.parseLong(id), null);
|
entity = domainService.getDomainCfg(Long.parseLong(id), null);
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
entity.setAuditTime(new Date());*/
|
||||||
entity.setFunctionId(functionId);
|
entity.setFunctionId(functionId);
|
||||||
try {
|
try {
|
||||||
domainService.auditDomainCfg(entity, isAudit);
|
domainService.auditDomainCfg(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();
|
||||||
|
|||||||
@@ -2110,7 +2110,10 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
|
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},is_audit = #{isAudit,jdbcType=INTEGER},
|
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||||
|
<if test="isAudit != null">
|
||||||
|
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||||
|
|||||||
@@ -195,6 +195,10 @@ public class AvContentCfgService extends BaseService{
|
|||||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);//未审核
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
@@ -245,6 +249,12 @@ public class AvContentCfgService extends BaseService{
|
|||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAvVoip(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -293,6 +303,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditAvVoip(entity,entity.getIsAudit(), Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,40 +462,15 @@ public class AvContentCfgService extends BaseService{
|
|||||||
* @param functionId
|
* @param functionId
|
||||||
*/
|
*/
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void auditAvVoip(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
public void auditAvVoip(CfgIndexInfo entity,Integer isAudit,Integer opAction){
|
||||||
CfgIndexInfo entity = new CfgIndexInfo();
|
|
||||||
|
|
||||||
List<CfgIndexInfo> list = new ArrayList();
|
|
||||||
//List<AvVoipIpCfg> voipIpList = new ArrayList();
|
|
||||||
List<IpPortCfg> ipPortList =new ArrayList();
|
|
||||||
List <NtcSubscribeIdCfg> ntcList = new ArrayList();
|
|
||||||
List<AvVoipAccountCfg> accountList = new ArrayList();
|
|
||||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
|
||||||
|
|
||||||
CfgIndexInfo searchCfg=new CfgIndexInfo();
|
|
||||||
searchCfg.setCfgId(Long.parseLong(id));
|
|
||||||
|
|
||||||
entity = avContentCfgDao.getCfgIndexInfo(searchCfg);
|
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
entity.setIsValid(isValid);
|
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(auditTime);
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
avContentCfgDao.updateAvVoipIp(entity);
|
avContentCfgDao.updateCfgValid(entity);
|
||||||
avContentCfgDao.updateAvVoipAccount(entity);
|
|
||||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
|
||||||
|
|
||||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
|
||||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||||
|
|
||||||
//voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
|
|
||||||
ipPortList = avContentCfgDao.getIpPortList(entity);
|
|
||||||
accountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
|
||||||
ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
|
||||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
|
||||||
|
|
||||||
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();
|
||||||
@@ -492,14 +482,36 @@ public class AvContentCfgService extends BaseService{
|
|||||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||||
|
|
||||||
|
|
||||||
if(isAudit==1){
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
/* if(!StringUtil.isEmpty(voipIpList)){
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
Map<String,List> ipMap = cfgConvert(ipRegionList,voipIpList,1,entity,groupRelationList);
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
groupRelationList=ipMap.get("groupList");
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
ipRegionList=ipMap.get("dstList");
|
avContentCfgDao.updateCfgValid(cfg);
|
||||||
}*/
|
if(isAudit==1){
|
||||||
if(!StringUtil.isEmpty(ipPortList)){
|
Map<String,List> ntcMap = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||||
Map<String,List> ipMap = cfgConvert(ipRegionList,ipPortList,1,entity,groupRelationList);
|
groupRelationList=ntcMap.get("groupList");
|
||||||
|
strRegionList=ntcMap.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getVoipAccounts()!=null && entity.getVoipAccounts().size()>0){
|
||||||
|
AvVoipAccountCfg cfg = new AvVoipAccountCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(AvVoipAccountCfg.getTablename());
|
||||||
|
avContentCfgDao.updateCfgValid(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> urlMap = cfgConvert(strRegionList,entity.getVoipAccounts(),2,entity,groupRelationList);
|
||||||
|
groupRelationList=urlMap.get("groupList");
|
||||||
|
strRegionList=urlMap.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getIpPortList())){
|
||||||
|
IpPortCfg cfg = new IpPortCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||||
|
cfg.setTableName(IpPortCfg.getTablename());
|
||||||
|
avContentCfgDao.updateCfgValid(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> ipMap = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
|
||||||
groupRelationList=ipMap.get("groupList");
|
groupRelationList=ipMap.get("groupList");
|
||||||
ipRegionList=ipMap.get("dstList");
|
ipRegionList=ipMap.get("dstList");
|
||||||
if(ipMap.get("numRegionList")!=null){
|
if(ipMap.get("numRegionList")!=null){
|
||||||
@@ -507,30 +519,28 @@ public class AvContentCfgService extends BaseService{
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!StringUtil.isEmpty(ntcList)){
|
|
||||||
Map<String,List> ntcMap = cfgConvert(strRegionList,ntcList,2,entity,groupRelationList);
|
|
||||||
groupRelationList=ntcMap.get("groupList");
|
|
||||||
strRegionList=ntcMap.get("dstList");
|
|
||||||
}
|
|
||||||
if(!StringUtil.isEmpty(accountList)){
|
|
||||||
Map<String,List> accountMap = cfgConvert(strRegionList,accountList,2,entity,groupRelationList);
|
|
||||||
groupRelationList=accountMap.get("groupList");
|
|
||||||
strRegionList=accountMap.get("dstList");
|
|
||||||
}
|
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
|
||||||
Map<String,List> areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
|
||||||
groupRelationList=areaMap.get("groupList");
|
|
||||||
areaIpRegionList=areaMap.get("dstList");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//保存区域IP信息
|
||||||
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(AreaIpCfg.getTablename());
|
||||||
|
avContentCfgDao.updateCfgValid(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
areaIpRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
maatCfg.initDefaultValue();
|
maatCfg.initDefaultValue();
|
||||||
BeanUtils.copyProperties(entity, maatCfg);
|
BeanUtils.copyProperties(entity, maatCfg);
|
||||||
maatCfg.setAction(entity.getAction());
|
maatCfg.setAction(entity.getAction());
|
||||||
maatCfg.setAuditTime(auditTime);
|
maatCfg.setAuditTime(new Date());
|
||||||
maatCfg.setIpRegionList(ipRegionList);
|
maatCfg.setIpRegionList(ipRegionList);
|
||||||
maatCfg.setStrRegionList(strRegionList);
|
maatCfg.setStrRegionList(strRegionList);
|
||||||
maatCfg.setNumRegionList(numRegionList);
|
maatCfg.setNumRegionList(numRegionList);
|
||||||
@@ -541,10 +551,10 @@ public class AvContentCfgService extends BaseService{
|
|||||||
maatCfg.setIsValid(entity.getIsValid());
|
maatCfg.setIsValid(entity.getIsValid());
|
||||||
configCompileList.add(maatCfg);
|
configCompileList.add(maatCfg);
|
||||||
maatBean.setConfigCompileList(configCompileList);
|
maatBean.setConfigCompileList(configCompileList);
|
||||||
maatBean.setAuditTime(auditTime);
|
maatBean.setAuditTime(new Date());
|
||||||
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("voip 配置下发配置参数:"+json);
|
logger.info("voip 配置下发配置参数:"+json);
|
||||||
@@ -558,7 +568,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
maatCfg.setIsValid(0);//无效
|
maatCfg.setIsValid(0);//无效
|
||||||
configCompileList.add(maatCfg);
|
configCompileList.add(maatCfg);
|
||||||
maatBean.setConfigCompileList(configCompileList);
|
maatBean.setConfigCompileList(configCompileList);
|
||||||
maatBean.setAuditTime(auditTime);
|
maatBean.setAuditTime(new Date());
|
||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
public void saveBgpCfg(CfgIndexInfo entity){
|
public void saveBgpCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
@@ -166,6 +170,12 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditBgpCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -227,6 +237,11 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditBgpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -292,12 +307,15 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
* @param isAudit
|
* @param isAudit
|
||||||
* @throws MaatConvertException
|
* @throws MaatConvertException
|
||||||
*/
|
*/
|
||||||
public void auditBgpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditBgpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
bgpCfgDao.auditCfg(entity);
|
bgpCfgDao.auditCfg(entity);
|
||||||
bgpCfgDao.updateBgpAsCfg(entity);
|
bgpCfgDao.updateBgpAsCfg(entity);
|
||||||
bgpCfgDao.updateSubscribeIdCfg(entity);
|
//bgpCfgDao.updateSubscribeIdCfg(entity);
|
||||||
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();
|
||||||
@@ -325,7 +343,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
/*if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
@@ -335,7 +353,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if(entity.getNtcBgpAsCfgList()!=null && entity.getNtcBgpAsCfgList().size()>0){
|
if(entity.getNtcBgpAsCfgList()!=null && entity.getNtcBgpAsCfgList().size()>0){
|
||||||
NtcBgpAsCfg cfg = new NtcBgpAsCfg();
|
NtcBgpAsCfg cfg = new NtcBgpAsCfg();
|
||||||
@@ -393,7 +411,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
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("BGP配置下发配置参数:"+json);
|
logger.info("BGP配置下发配置参数:"+json);
|
||||||
|
|||||||
@@ -436,7 +436,10 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
}*/
|
}*/
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
|
|
||||||
@@ -480,6 +483,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditDomainCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -518,6 +526,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditDomainCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void updateDomainCfgValid(Integer isValid,String ids,Integer functionId){
|
public void updateDomainCfgValid(Integer isValid,String ids,Integer functionId){
|
||||||
@@ -559,10 +572,13 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void auditDomainCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditDomainCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
websiteCfgDao.auditCfg(entity);
|
websiteCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -634,7 +650,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
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("domain配置下发配置参数:"+json);
|
logger.info("domain配置下发配置参数:"+json);
|
||||||
|
|||||||
@@ -119,6 +119,10 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
public void saveFtpCfg(CfgIndexInfo entity){
|
public void saveFtpCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
@@ -168,6 +172,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditFtpCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
@@ -219,6 +228,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditFtpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void updateFtpCfgValid(Integer isValid,String ids,Integer functionId){
|
public void updateFtpCfgValid(Integer isValid,String ids,Integer functionId){
|
||||||
@@ -266,9 +280,12 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void auditFtpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditFtpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
fileTransferCfgDao.auditCfg(entity);
|
fileTransferCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -365,7 +382,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
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("ftp配置下发配置参数:"+json);
|
logger.info("ftp配置下发配置参数:"+json);
|
||||||
@@ -741,6 +758,10 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
public void saveP2pCfg(CfgIndexInfo entity){
|
public void saveP2pCfg(CfgIndexInfo entity){
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
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 {
|
||||||
@@ -799,7 +820,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditP2pCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// 审核未通过状态的配置 修改后状态改为未审核
|
// 审核未通过状态的配置 修改后状态改为未审核
|
||||||
@@ -861,6 +886,12 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditP2pCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -915,9 +946,12 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void auditP2pCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditP2pCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
fileTransferCfgDao.auditCfg(entity);
|
fileTransferCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -1048,7 +1082,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
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);
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import com.nis.util.ConfigServiceUtil;
|
|||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.FileUtils;
|
import com.nis.util.FileUtils;
|
||||||
import com.nis.util.JsonMapper;
|
import com.nis.util.JsonMapper;
|
||||||
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||||
import com.nis.web.dao.configuration.MailCfgDao;
|
import com.nis.web.dao.configuration.MailCfgDao;
|
||||||
import com.nis.web.dao.configuration.StringCfgDao;
|
import com.nis.web.dao.configuration.StringCfgDao;
|
||||||
@@ -108,7 +109,10 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
public void saveMailCfg(CfgIndexInfo entity,ToMaatResult result){
|
public void saveMailCfg(CfgIndexInfo entity,ToMaatResult result){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
|
|
||||||
@@ -173,6 +177,11 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditMailCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
@@ -232,6 +241,11 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditMailCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void updateMailCfgValid(Integer isValid,String ids,Integer functionId){
|
public void updateMailCfgValid(Integer isValid,String ids,Integer functionId){
|
||||||
@@ -278,9 +292,12 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void auditMailCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditMailCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
mailCfgDao.auditCfg(entity);
|
mailCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -376,7 +393,7 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
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("mail配置下发配置参数:"+json);
|
logger.info("mail配置下发配置参数:"+json);
|
||||||
|
|||||||
@@ -206,10 +206,13 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
websiteCfgDao.saveHttpResHdrCfg(_cfg);
|
websiteCfgDao.saveHttpResHdrCfg(_cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void saveHttpCfg(CfgIndexInfo entity){
|
public void saveHttpCfg(CfgIndexInfo entity) throws Exception{
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
|
|
||||||
@@ -285,6 +288,11 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditHttpCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
@@ -359,6 +367,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditHttpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void updateHttpCfgValid(Integer isValid,String ids,Integer functionId){
|
public void updateHttpCfgValid(Integer isValid,String ids,Integer functionId){
|
||||||
@@ -422,9 +436,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void auditHttpCfg(CfgIndexInfo entity,Integer isAudit) throws Exception{
|
public void auditHttpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws Exception{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
websiteCfgDao.auditCfg(entity);
|
websiteCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -587,7 +604,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
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("http配置下发配置参数:"+json);
|
logger.info("http配置下发配置参数:"+json);
|
||||||
@@ -695,7 +712,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
public void saveSslCfg(CfgIndexInfo entity){
|
public void saveSslCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
|
|
||||||
@@ -744,6 +764,11 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditSslCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
@@ -789,6 +814,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditSslCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void updateSslCfgValid(Integer isValid,String ids,Integer functionId){
|
public void updateSslCfgValid(Integer isValid,String ids,Integer functionId){
|
||||||
@@ -835,9 +866,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void auditSslCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditSslCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
websiteCfgDao.auditCfg(entity);
|
websiteCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -939,7 +973,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
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.UPDATE_ACTION);
|
maatBean.setOpAction(opAction);
|
||||||
//调用服务接口取消配置
|
//调用服务接口取消配置
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("ssl配置下发配置参数:"+json);
|
logger.info("ssl配置下发配置参数:"+json);
|
||||||
@@ -968,7 +1002,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
public void saveDnsCfg(CfgIndexInfo entity){
|
public void saveDnsCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
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);
|
||||||
|
|
||||||
@@ -1020,6 +1057,11 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditDnsCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
@@ -1068,6 +1110,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
auditDnsCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -1126,9 +1174,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
* @param isAudit
|
* @param isAudit
|
||||||
* @throws MaatConvertException
|
* @throws MaatConvertException
|
||||||
*/
|
*/
|
||||||
public void auditDnsCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
public void auditDnsCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
|
entity.setIsAudit(isAudit);
|
||||||
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
websiteCfgDao.auditCfg(entity);
|
websiteCfgDao.auditCfg(entity);
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -1217,7 +1268,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
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("dns配置下发配置参数:"+json);
|
logger.info("dns配置下发配置参数:"+json);
|
||||||
|
|||||||
@@ -173,6 +173,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
|
|
||||||
@@ -391,9 +393,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -173,6 +173,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
|
|
||||||
@@ -428,9 +430,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -150,6 +150,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
|
|
||||||
@@ -406,9 +408,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -176,6 +176,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
|
|
||||||
@@ -430,9 +432,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -141,6 +141,8 @@
|
|||||||
<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="doBlackList" value="1">
|
<input type="hidden" name="doBlackList" value="1">
|
||||||
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
|
|
||||||
@@ -397,9 +399,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -154,6 +154,8 @@
|
|||||||
<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="doBlackList" value="0">
|
<input type="hidden" name="doBlackList" value="0">
|
||||||
<input type="hidden" id="serviceId" name="serviceId"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
@@ -383,9 +385,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -192,6 +192,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="httpReqCfgNum" value="${httpReqCfgNum}">
|
<input type="hidden" id="httpReqCfgNum" value="${httpReqCfgNum}">
|
||||||
@@ -475,9 +477,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -158,6 +158,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
|
|
||||||
@@ -383,9 +385,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -146,6 +146,8 @@
|
|||||||
<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"
|
<input type="hidden" id="serviceId" name="serviceId"
|
||||||
value="${_cfg.serviceId}">
|
value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="sourceCompileId" name="sourceCompileId"
|
<input type="hidden" id="sourceCompileId" name="sourceCompileId"
|
||||||
@@ -337,9 +339,23 @@
|
|||||||
<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>
|
||||||
|
|||||||
Reference in New Issue
Block a user