From df9665376f61fb814e8bae4775f7391d4528dbaf Mon Sep 17 00:00:00 2001 From: wangwei Date: Fri, 24 May 2019 19:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=95=B0=E6=8D=AE=E6=97=B6=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/AppCfgController.java | 8 +++- .../configuration/ntc/AvController.java | 8 +++- .../service/configuration/AppCfgService.java | 10 +++++ .../WEB-INF/views/cfg/app/appSslCfgForm.jsp | 44 ++++++++++++++----- 4 files changed, 56 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index 7bedd441b..e69b406c9 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -1262,7 +1262,13 @@ public class AppCfgController extends BaseController { entity.setAppCode(specificService.getSpecServiceCode()); } appCfgService.saveOrUpdateAppSslCfg(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) { e.printStackTrace(); logger.error("saveAppSslCfg failed", e); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java index 1399b9b3d..4fa813bfc 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java @@ -311,7 +311,13 @@ public class AvController extends BaseController { } avCfgService.saveOrUpdateAvFileSample(entity, srcFile); - 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) { logger.error("文件上传失败", e); e.printStackTrace(); diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index fe9376671..d41f0c39f 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -960,6 +960,10 @@ public class AppCfgService extends BaseService { public void saveOrUpdateAppSslCfg(AppSslCertCfg entity) throws Exception { // 设置区域运营商信息 setAreaEffectiveIds(entity); + int isValid=0; + if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) { + isValid=1; + } if (entity.getCfgId() == null) { Integer compileId = 0; try { @@ -1011,6 +1015,12 @@ public class AppCfgService extends BaseService { } } + if(isValid==1) { + entity.setIsAudit(1); + entity.setIsValid(1); + entity.setAuditTime(new Date()); + auditAppSslCfg(entity, entity.getIsAudit()); + } } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp index 946e7af20..6946a33ba 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp @@ -95,6 +95,8 @@ function changeDistrict(obj){ + + @@ -434,18 +436,36 @@ function changeDistrict(obj){ <%-- <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> --%>
-
-
-
-
- - -
-
-
-
-
-
+
+
+
+
+ + + + + + + + + + + + + + +
+
+
+
+
+