完善修改配置数据时提示信息问题

This commit is contained in:
wangwei
2019-05-24 19:12:37 +08:00
parent 2786ee2fe8
commit f2d29374da
4 changed files with 56 additions and 14 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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());
}
}