code: public static String format(double number, String pattern) {
  		DecimalFormat df = null;
  		if (StringUtils.isEmpty(pattern)) {
  			df = PRETTY_FORMAT.get();
  		} else {
  			df = (DecimalFormat) DecimalFormat.getInstance();
  			df.applyPattern(pattern);
  		}
  
  		return df.format(number);
  	}
docs: 格式化金额，当pattern为空时，pattern默认为#,##0.00