stream、DDOS和高级功能模块对某些用户的配置不经过审核直接生效及生效中的配置进行修改的功能

This commit is contained in:
shangguanyanfei
2019-04-19 17:20:32 +08:00
parent 5a5bdddba4
commit 865811b9b2
34 changed files with 729 additions and 189 deletions

View File

@@ -142,14 +142,19 @@ public class AppFeatureCfgController extends BaseController {
entity.setAppCode(specificService.getSpecServiceCode());
}
appMultiFeatureCfgService.saveOrUpdateAppFeatureCfg(entity);
addMessage(redirectAttributes, "success", "save_success");
} catch (Exception e) {
e.printStackTrace();
if (e instanceof MaatConvertException) {
addMessage(redirectAttributes, "error", "request_service_failed");
} else {
addMessage(redirectAttributes, "error", "save_failed");
//配置仅保存
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
} catch (MaatConvertException e) {
logger.error("APP 特征配置下发失败:",e);
addMessage(redirectAttributes, "error", "request_service_failed");
} catch (Exception e) {
logger.error("APP 特征配置保存失败:",e);
addMessage(redirectAttributes, "error", "save_failed");
}
return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + entity.getFunctionId();
@@ -176,11 +181,9 @@ public class AppFeatureCfgController extends BaseController {
entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(id));
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(new Date());
entity.setFunctionId(functionId);
try {
appMultiFeatureCfgService.auditAppFeatureCfg(entity, isAudit);
appMultiFeatureCfgService.auditAppFeatureCfg(entity, isAudit,Constants.INSERT_ACTION);
addMessage(redirectAttributes, "success", "audit_success");
} catch (MaatConvertException e) {
e.printStackTrace();