协议-配置支持对某些用户的配置不经过审核直接生效的流程
This commit is contained in:
@@ -9,8 +9,18 @@ package com.nis.domain.configuration;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvVoipAccountCfg extends BaseStringCfg<AvVoipAccountCfg>{
|
||||
|
||||
private static final String tableName="av_voip_account_cfg";
|
||||
|
||||
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) {
|
||||
try {
|
||||
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) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
@@ -204,7 +210,15 @@ public class AvContentController extends BaseController {
|
||||
Date auditTime = new Date();
|
||||
for (String id : idArray) {
|
||||
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");
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
@@ -614,7 +628,13 @@ public class AvContentController extends BaseController {
|
||||
CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
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) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
@@ -663,7 +683,6 @@ public class AvContentController extends BaseController {
|
||||
HttpServletRequest request) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime = new Date();
|
||||
for (String id : idArray) {
|
||||
try {
|
||||
CfgIndexInfo entity=new CfgIndexInfo();
|
||||
|
||||
@@ -72,7 +72,22 @@ public class BgpCfgController extends BaseController {
|
||||
@RequiresPermissions(value = { "other:bgp:config" })
|
||||
public String saveBgpCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -157,11 +172,11 @@ public class BgpCfgController extends BaseController {
|
||||
entity = bgpCfgService.getBgpCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());*/
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
bgpCfgService.auditBgpCfg(entity, isAudit);
|
||||
bgpCfgService.auditBgpCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -87,7 +87,13 @@ public class FileTransferCfgController extends BaseController {
|
||||
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
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) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
@@ -185,11 +191,11 @@ public class FileTransferCfgController extends BaseController {
|
||||
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||
// entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
fileTransferCfgService.auditFtpCfg(entity, isAudit);
|
||||
fileTransferCfgService.auditFtpCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
@@ -487,7 +493,13 @@ public class FileTransferCfgController extends BaseController {
|
||||
CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
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) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
@@ -585,11 +597,11 @@ public class FileTransferCfgController extends BaseController {
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||
// entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
fileTransferCfgService.auditP2pCfg(entity, isAudit);
|
||||
fileTransferCfgService.auditP2pCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -107,7 +107,12 @@ public class MailCfgController extends BaseController {
|
||||
logger.info("获取文件摘要响应信息:" + 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) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
@@ -205,11 +210,11 @@ public class MailCfgController extends BaseController {
|
||||
entity = mailCfgService.getMailCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());*/
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
mailCfgService.auditMailCfg(entity, isAudit);
|
||||
mailCfgService.auditMailCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -192,9 +192,25 @@ public class WebsiteController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "saveHttpCfg" })
|
||||
@RequiresPermissions(value = { "website:http:config" })
|
||||
public String saveHttpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||
String ids, CfgIndexInfo entity) {
|
||||
websiteCfgService.saveHttpCfg(entity);
|
||||
public String saveHttpCfg( HttpServletRequest request, HttpServletResponse response,
|
||||
String ids, CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -243,11 +259,11 @@ public class WebsiteController extends BaseController {
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());*/
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
websiteCfgService.auditHttpCfg(entity, isAudit);
|
||||
websiteCfgService.auditHttpCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("http配置下发失败:" + e.getMessage());
|
||||
@@ -306,9 +322,24 @@ public class WebsiteController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "saveSslCfg" })
|
||||
@RequiresPermissions(value = { "website:ssl:config" })
|
||||
public String saveSslCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||
String ids, CfgIndexInfo entity) {
|
||||
websiteCfgService.saveSslCfg(entity);
|
||||
public String saveSslCfg(HttpServletRequest request, HttpServletResponse response,
|
||||
String ids, CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -391,11 +422,11 @@ public class WebsiteController extends BaseController {
|
||||
entity = websiteCfgService.getSslCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||
// entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
websiteCfgService.auditSslCfg(entity, isAudit);
|
||||
websiteCfgService.auditSslCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -452,8 +483,23 @@ public class WebsiteController extends BaseController {
|
||||
@RequestMapping(value = { "saveDnsCfg" })
|
||||
@RequiresPermissions(value = { "website:dns:config" })
|
||||
public String saveDnsCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||
String ids, CfgIndexInfo entity) {
|
||||
websiteCfgService.saveDnsCfg(entity);
|
||||
String ids, CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -531,11 +577,11 @@ public class WebsiteController extends BaseController {
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
// entity.setAuditorId(UserUtils.getUser().getId());
|
||||
// entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
websiteCfgService.auditDnsCfg(entity, isAudit);
|
||||
websiteCfgService.auditDnsCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -205,9 +205,8 @@ public class WhiteListController extends CommonController {
|
||||
|
||||
@RequestMapping(value = { "saveHttpUrlCfgs" })
|
||||
public String saveHttpUrlCfgs(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||
CfgIndexInfo entity) {
|
||||
CfgIndexInfo entity) throws Exception {
|
||||
if (!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())) {
|
||||
|
||||
CfgIndexInfo sourceCfg = websiteCfgService
|
||||
.getCfgIndexInfo(entity.getHttpUrlList().get(0).getSourceCompileId());
|
||||
for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) {
|
||||
@@ -217,7 +216,7 @@ public class WhiteListController extends CommonController {
|
||||
BeanUtils.copyProperties(httpUrlCfg, cfg);
|
||||
httpList.add(httpUrlCfg);
|
||||
cfg.setHttpUrlList(httpList);
|
||||
websiteCfgService.saveHttpCfg(cfg);
|
||||
websiteCfgService.saveHttpCfg(cfg);
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + entity.getFunctionId();
|
||||
@@ -249,9 +248,24 @@ public class WhiteListController extends CommonController {
|
||||
}
|
||||
|
||||
@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) {
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -333,11 +347,11 @@ public class WhiteListController extends CommonController {
|
||||
entity = domainService.getDomainCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
/*entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());*/
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
domainService.auditDomainCfg(entity, isAudit);
|
||||
domainService.auditDomainCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -2110,7 +2110,10 @@
|
||||
</where>
|
||||
</select>
|
||||
<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} ,
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
|
||||
@@ -195,6 +195,10 @@ public class AvContentCfgService extends BaseService{
|
||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);//无效
|
||||
entity.setIsAudit(0);//未审核
|
||||
if(entity.getCfgId()==null){
|
||||
@@ -245,6 +249,12 @@ public class AvContentCfgService extends BaseService{
|
||||
logger.info("获取编译ID出错");
|
||||
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{
|
||||
entity.setEditTime(new Date());
|
||||
@@ -293,6 +303,11 @@ public class AvContentCfgService extends BaseService{
|
||||
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
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvVoip(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
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);
|
||||
public void auditAvVoip(CfgIndexInfo entity,Integer isAudit,Integer opAction){
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setAuditTime(new Date());
|
||||
avContentCfgDao.updateCfgValid(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||
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();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
@@ -492,45 +482,65 @@ public class AvContentCfgService extends BaseService{
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
|
||||
if(isAudit==1){
|
||||
/* if(!StringUtil.isEmpty(voipIpList)){
|
||||
Map<String,List> ipMap = cfgConvert(ipRegionList,voipIpList,1,entity,groupRelationList);
|
||||
groupRelationList=ipMap.get("groupList");
|
||||
ipRegionList=ipMap.get("dstList");
|
||||
}*/
|
||||
if(!StringUtil.isEmpty(ipPortList)){
|
||||
Map<String,List> ipMap = cfgConvert(ipRegionList,ipPortList,1,entity,groupRelationList);
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
avContentCfgDao.updateCfgValid(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> ntcMap = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,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");
|
||||
ipRegionList=ipMap.get("dstList");
|
||||
if(ipMap.get("numRegionList")!=null){
|
||||
numRegionList.addAll(ipMap.get("numRegionList"));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(auditTime);
|
||||
maatCfg.setAuditTime(new Date());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
@@ -541,10 +551,10 @@ public class AvContentCfgService extends BaseService{
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(auditTime);
|
||||
maatBean.setAuditTime(new Date());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip 配置下发配置参数:"+json);
|
||||
@@ -558,7 +568,7 @@ public class AvContentCfgService extends BaseService{
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(auditTime);
|
||||
maatBean.setAuditTime(new Date());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
|
||||
@@ -103,6 +103,10 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
public void saveBgpCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
if(entity.getCfgId()==null){
|
||||
@@ -166,6 +170,12 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
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{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
@@ -227,6 +237,11 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
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
|
||||
* @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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
bgpCfgDao.auditCfg(entity);
|
||||
bgpCfgDao.updateBgpAsCfg(entity);
|
||||
bgpCfgDao.updateSubscribeIdCfg(entity);
|
||||
//bgpCfgDao.updateSubscribeIdCfg(entity);
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
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();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
@@ -335,7 +353,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if(entity.getNtcBgpAsCfgList()!=null && entity.getNtcBgpAsCfgList().size()>0){
|
||||
NtcBgpAsCfg cfg = new NtcBgpAsCfg();
|
||||
@@ -393,7 +411,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("BGP配置下发配置参数:"+json);
|
||||
|
||||
@@ -436,7 +436,10 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
}*/
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -480,6 +483,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditDomainCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditTime(new Date());
|
||||
@@ -518,6 +526,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
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){
|
||||
@@ -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
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -634,7 +650,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("domain配置下发配置参数:"+json);
|
||||
|
||||
@@ -119,6 +119,10 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
public void saveFtpCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
if(entity.getCfgId()==null){
|
||||
@@ -168,6 +172,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
logger.info("获取编译ID出错");
|
||||
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{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -219,6 +228,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
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){
|
||||
@@ -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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
fileTransferCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -365,7 +382,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("ftp配置下发配置参数:"+json);
|
||||
@@ -741,6 +758,10 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
public void saveP2pCfg(CfgIndexInfo entity){
|
||||
// 设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
@@ -799,7 +820,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditP2pCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
// 审核未通过状态的配置 修改后状态改为未审核
|
||||
@@ -861,6 +886,12 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
fileTransferCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -1048,7 +1082,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
|
||||
@@ -37,6 +37,7 @@ import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.MailCfgDao;
|
||||
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){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -173,6 +177,11 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditMailCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
@@ -232,6 +241,11 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
||||
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){
|
||||
@@ -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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
mailCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -376,7 +393,7 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("mail配置下发配置参数:"+json);
|
||||
|
||||
@@ -206,10 +206,13 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
websiteCfgDao.saveHttpResHdrCfg(_cfg);
|
||||
}
|
||||
}
|
||||
public void saveHttpCfg(CfgIndexInfo entity){
|
||||
public void saveHttpCfg(CfgIndexInfo entity) throws Exception{
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -285,6 +288,11 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditHttpCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -359,6 +367,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
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){
|
||||
@@ -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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -587,7 +604,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("http配置下发配置参数:"+json);
|
||||
@@ -695,7 +712,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
public void saveSslCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -744,6 +764,11 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditSslCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -789,6 +814,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
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){
|
||||
@@ -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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -939,7 +973,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("ssl配置下发配置参数:"+json);
|
||||
@@ -968,7 +1002,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
public void saveDnsCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -1020,6 +1057,11 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditDnsCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -1068,6 +1110,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
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
|
||||
* @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.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -1217,7 +1268,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("dns配置下发配置参数:"+json);
|
||||
|
||||
@@ -173,6 +173,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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}">
|
||||
|
||||
@@ -391,9 +393,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -173,6 +173,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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}">
|
||||
|
||||
@@ -428,9 +430,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -150,6 +150,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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}">
|
||||
|
||||
@@ -406,9 +408,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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}">
|
||||
|
||||
@@ -430,9 +432,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<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"
|
||||
value="${_cfg.serviceId}">
|
||||
|
||||
@@ -397,9 +399,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -154,6 +154,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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" id="serviceId" name="serviceId"
|
||||
value="${_cfg.serviceId}">
|
||||
@@ -383,9 +385,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -192,6 +192,8 @@
|
||||
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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="httpReqCfgNum" value="${httpReqCfgNum}">
|
||||
@@ -475,9 +477,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -158,6 +158,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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}">
|
||||
|
||||
@@ -383,9 +385,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
@@ -146,6 +146,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<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="sourceCompileId" name="sourceCompileId"
|
||||
@@ -337,9 +339,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user