修改maat通用配置存储接口

This commit is contained in:
zhangdongxu
2018-05-25 19:37:05 +08:00
parent cef29b03ad
commit 83ccdc4e9c
15 changed files with 352 additions and 66 deletions

View File

@@ -0,0 +1,56 @@
/**
*
*/
package com.nis.util;
/**
* @ClassName:CamelUnderlineUtil
* @Description:TODO(这里用一句话描述这个类的作用)
* @author (zdx)
* @date 2018年5月25日 下午4:44:54
* @version V1.0
*/
public class CamelUnderlineUtil {
private static final char UNDERLINE ='_';
public static String camelToUnderline(String param) {
if (StringUtil.isEmpty(param)) {
return "";
}
StringBuilder sb = new StringBuilder();
int len = param.length();
for (int i = 0; i < len; i++) {
char c = param.charAt(i);
if (Character.isUpperCase(c)) {
sb.append(UNDERLINE);
sb.append(Character.toLowerCase(c));
} else {
sb.append(c);
}
}
return sb.toString();
}
public static String underlineToCamel(String param){
if (StringUtil.isEmpty(param)) {
return "";
}
StringBuilder sb = new StringBuilder();
int len = param.length();
for (int i = 0; i < len; i++) {
char c = param.charAt(i);
if (c==UNDERLINE) {
if(++i<len){
sb.append(Character.toUpperCase(param.charAt(i)));
}
} else {
sb.append(c);
}
}
return sb.toString();
}
}

View File

@@ -447,8 +447,8 @@ public class CompileJudge {
if (null == configCompile.getAction()) {
return "id为" + compileId + "的编译配置中action不能为空";
}
if (null == configCompile.getDoBlackList()) {
return "id为" + compileId + "的编译配置中doBlackList不能为空";
if (null == configCompile.getDoBlacklist()) {
return "id为" + compileId + "的编译配置中doBlacklist不能为空";
}
if (null == configCompile.getDoLog()) {
return "id为" + compileId + "的编译配置中doLog不能为空";

View File

@@ -423,8 +423,8 @@ public class CompileVal {
if (null == configCompile.getAction()) {
return "id为" + compileId + "的编译配置中action不能为空";
}
if (null == configCompile.getDoBlackList()) {
return "id为" + compileId + "的编译配置中doBlackList不能为空";
if (null == configCompile.getDoBlacklist()) {
return "id为" + compileId + "的编译配置中doBlacklist不能为空";
}
if (null == configCompile.getDoLog()) {
return "id为" + compileId + "的编译配置中doLog不能为空";
@@ -686,8 +686,8 @@ public class CompileVal {
&& configCompile.getAction() != 6 && configCompile.getAction() != 7) {
return "编译配置id为" + compileId + "的配置中action的值只能是1(阻断),2(监测),5(封堵白名单),6(监测白名单),7(封堵监测都白名单)";
}
if (configCompile.getDoBlackList() != 1) {
return "编译配置id为" + compileId + "的配置中doBlackList的值只能是1";
if (configCompile.getDoBlacklist() != 1) {
return "编译配置id为" + compileId + "的配置中doBlacklist的值只能是1";
}
if (configCompile.getDoLog() != 0 && configCompile.getDoLog() != 1 && configCompile.getDoLog() != 2) {