Authored by chenchao

change price format

... ... @@ -13,7 +13,8 @@ import java.util.regex.Pattern;
* Created by chunhua.zhang@yoho.cn on 2015/12/15.
*/
public class BigDecimalHelper {
public static final String FORMAT_TWOBITAFTERPOINT = "##0.00";
public static final String FORMAT_TWOBITAFTERPOINT = "##0.00",
FORMAT_NOPOINT = "##0";
private static Map<String,DecimalFormat> DecimalFormatCache = new HashMap<>();
... ... @@ -95,7 +96,7 @@ public class BigDecimalHelper {
}
public static void main(String[] args) {
System.out.println(formatNumber(new BigDecimal(111123.0011D), FORMAT_NOPOINT));
System.out.println(isDigitalNumber("11111"));
System.out.println(isDigitalNumber("1111.00"));
System.out.println(isDigitalNumber("1111.0"));
... ...
... ... @@ -4,6 +4,7 @@ import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.common.ButtonShow;
import com.yohobuy.ufo.model.order.common.SellerType;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohoufo.common.utils.BigDecimalHelper;
import com.yohoufo.order.common.Payment;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.product.response.StorageDataResp;
... ... @@ -88,7 +89,7 @@ public interface AbsSellerOrderViewService {
}
default String buildLeastPriceTips(BigDecimal leastPrice){
return "当前尺码最低售价¥" + leastPrice.toPlainString();
return "该尺码最低售价¥" + BigDecimalHelper.formatNumber(leastPrice, BigDecimalHelper.FORMAT_NOPOINT);
}
... ...