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);
	}
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 ) ; }
格式化金额，当pattern为空时，pattern默认为#,##0.00