MAAT配置监测配置doLog不能为0

This commit is contained in:
zhangdongxu
2018-09-14 15:01:50 +08:00
parent 22f9ce00fb
commit 25c79f999b
2 changed files with 8 additions and 0 deletions

View File

@@ -387,6 +387,11 @@ public enum RestBusinessCode {
*/
IsValidNonUniq(4002011, "状态更新操作所有配置的isValid值必须相同"),
/**
* 编译配置的动作(action)为监测(1)时doLog的值不能为0
*/
DoLogIsWrong(4002012, "Maat编译配置的动作(action)为监测(1)时doLog的值不能为0"),
/**
* 配置分组中同一groupId不能重复出现多次
*/

View File

@@ -498,6 +498,9 @@ public class CompileVal {
if (null == configCompile.getDoLog()) {
throw new RestServiceException("编译配置id为" + compileId + "的编译配置中doLog不能为空",
RestBusinessCode.DoLogIsNull.getValue());
}else if ("1".equals(configCompile.getAction().toString())&&configCompile.getDoLog().toString().equals("0")) {
throw new RestServiceException("编译配置id为" + compileId + "的配置,动作(action)为监测(1)时doLog的值不能为0",
RestBusinessCode.DoLogIsWrong.getValue());
}
if (null == configCompile.getEffectiveRange() || configCompile.getEffectiveRange().equals("")) {
throw new RestServiceException("编译配置id为" + compileId + "的编译配置中effectiveRange不能为空",