Commit eef9ad5e authored by yanzg's avatar yanzg

修复bug

parent cca1b7ea
......@@ -47,13 +47,18 @@ public final class CheckerHelper {
public static final String PARAM_NOT_MIN = "param [%s] must be big %d";
public static final String PARAM_NOT_MIN_CH = "参数[%s]和必须大于%d";
public static final String PARAM_NOT_MAX = "param [%s] must be max %d";
public static final String PARAM_NOT_MAX_CH = "param [%s] must be max %d";
public static final String PARAM_NOT_RANGE = "param [%s] must be range %d and %d";
public static final String PARAM_NOT_RANGE_CH = "参数[%s]请在范围%d至%d内";
public static final String PARAM_NOT_MIN_DOUBLE = "param [%s] must be big %f";
public static final String PARAM_NOT_MIN_DOUBLE_CH = "参数[%s]和必须大于%f";
public static final String PARAM_NOT_MAX_DOUBLE = "param [%s] must be max %f";
public static final String PARAM_NOT_MAX_DOUBLE_CH = "param [%s] must be max %f";
public static final String PARAM_NOT_RANGE_DOUBLE = "param [%s] must be range %f and %f";
public static final String PARAM_NOT_RANGE_DOUBLE_CH = "参数[%s]请在范围%f至%f内";
public static final String DATE_CHECK_TYPE_DAY = "day";
public static final String DATE_CHECK_TYPE_DAY_CH = "日期";
......@@ -76,6 +81,9 @@ public final class CheckerHelper {
.setEnglishChinese(PARAM_NOT_MIN, PARAM_NOT_MIN_CH)
.setEnglishChinese(PARAM_NOT_MAX, PARAM_NOT_MAX_CH)
.setEnglishChinese(PARAM_NOT_RANGE, PARAM_NOT_RANGE_CH)
.setEnglishChinese(PARAM_NOT_MIN_DOUBLE, PARAM_NOT_MIN_DOUBLE_CH)
.setEnglishChinese(PARAM_NOT_MAX_DOUBLE, PARAM_NOT_MAX_DOUBLE_CH)
.setEnglishChinese(PARAM_NOT_RANGE_DOUBLE, PARAM_NOT_RANGE_DOUBLE_CH)
.setEnglishChinese(DATE_CHECK_TYPE_DAY, DATE_CHECK_TYPE_DAY_CH)
.setEnglishChinese(DATE_CHECK_TYPE_MONTH, DATE_CHECK_TYPE_MONTH_CH)
;
......@@ -499,7 +507,7 @@ public final class CheckerHelper {
return this;
}
if (paramVal < min) {
this.checkResult = language.format(PARAM_NOT_MIN, paramName, min);
this.checkResult = language.format(PARAM_NOT_MIN_DOUBLE, paramName, min);
this.setValid(false);
}
return this;
......@@ -518,7 +526,7 @@ public final class CheckerHelper {
return this;
}
if (paramVal > max) {
this.checkResult = language.format(PARAM_NOT_MAX, paramName, max);
this.checkResult = language.format(PARAM_NOT_MAX_DOUBLE, paramName, max);
this.setValid(false);
}
return this;
......@@ -538,7 +546,7 @@ public final class CheckerHelper {
return this;
}
if (paramVal > max || paramVal < min) {
this.checkResult = language.format(PARAM_NOT_RANGE, paramName, min, max);
this.checkResult = language.format(PARAM_NOT_RANGE_DOUBLE, paramName, min, max);
this.setValid(false);
}
return this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment