2019-04-15 18:27
谢谢波总!!!搞定了!
public BigDecimal toBigDecimal(String value, BigDecimal defaultValue) {
try {
if (StrKit.isBlank(value)) {
return defaultValue;
} else {
return new BigDecimal(value);
}
} catch (Exception var3) {
throw new ActionException(400, renderManager.getRenderFactory().getErrorRender(400), "Can not parse the parameter \"" + value + "\" to BigDeciaml value.");
}
}
public BigDecimal getBigDecimal(String name){
return this.toBigDecimal(getPara(name),(BigDecimal) null);
}
public BigDecimal getBigDecimal(String name, BigDecimal defaultValue){
return this.toBigDecimal(getPara(name),defaultValue);